Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR containerservices/resource-manager] [AKS] remove maxPods default #224

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ interface OperationsService {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the List<OperationValueInner> object if successful.
* @return the List<ComputeOperationValueInner> object if successful.
*/
public List<OperationValueInner> list() {
public List<ComputeOperationValueInner> list() {
return listWithServiceResponseAsync().toBlocking().single().body();
}

Expand All @@ -76,20 +76,20 @@ public List<OperationValueInner> list() {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<OperationValueInner>> listAsync(final ServiceCallback<List<OperationValueInner>> serviceCallback) {
public ServiceFuture<List<ComputeOperationValueInner>> listAsync(final ServiceCallback<List<ComputeOperationValueInner>> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
}

/**
* Gets a list of compute operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;OperationValueInner&gt; object
* @return the observable to the List&lt;ComputeOperationValueInner&gt; object
*/
public Observable<List<OperationValueInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<OperationValueInner>>, List<OperationValueInner>>() {
public Observable<List<ComputeOperationValueInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<ComputeOperationValueInner>>, List<ComputeOperationValueInner>>() {
@Override
public List<OperationValueInner> call(ServiceResponse<List<OperationValueInner>> response) {
public List<ComputeOperationValueInner> call(ServiceResponse<List<ComputeOperationValueInner>> response) {
return response.body();
}
});
Expand All @@ -99,21 +99,21 @@ public List<OperationValueInner> call(ServiceResponse<List<OperationValueInner>>
* Gets a list of compute operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;OperationValueInner&gt; object
* @return the observable to the List&lt;ComputeOperationValueInner&gt; object
*/
public Observable<ServiceResponse<List<OperationValueInner>>> listWithServiceResponseAsync() {
public Observable<ServiceResponse<List<ComputeOperationValueInner>>> listWithServiceResponseAsync() {
final String apiVersion = "2018-03-31";
return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<OperationValueInner>>>>() {
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<ComputeOperationValueInner>>>>() {
@Override
public Observable<ServiceResponse<List<OperationValueInner>>> call(Response<ResponseBody> response) {
public Observable<ServiceResponse<List<ComputeOperationValueInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl1<OperationValueInner>> result = listDelegate(response);
List<OperationValueInner> items = null;
ServiceResponse<PageImpl1<ComputeOperationValueInner>> result = listDelegate(response);
List<ComputeOperationValueInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<OperationValueInner>> clientResponse = new ServiceResponse<List<OperationValueInner>>(items, result.response());
ServiceResponse<List<ComputeOperationValueInner>> clientResponse = new ServiceResponse<List<ComputeOperationValueInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
Expand All @@ -122,9 +122,9 @@ public Observable<ServiceResponse<List<OperationValueInner>>> call(Response<Resp
});
}

private ServiceResponse<PageImpl1<OperationValueInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException {
return this.client.restClient().responseBuilderFactory().<PageImpl1<OperationValueInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl1<OperationValueInner>>() { }.getType())
private ServiceResponse<PageImpl1<ComputeOperationValueInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException {
return this.client.restClient().responseBuilderFactory().<PageImpl1<ComputeOperationValueInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl1<ComputeOperationValueInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down