Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

[AutoPR containerservices/resource-manager] [AKS] add new 2018-03-31 API #1311

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion azure_sdk/lib/azure_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

require 'latest/latest_profile_client'
require 'v2017_03_09/v2017_03_09_profile_client'
require 'latest/latest_profile_client'
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ def make_request_async(method, path, options = {})
fail ArgumentError, 'path is nil' if path.nil?

request_url = options[:base_url] || @base_url
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
@request_headers['Content-Type'] = options[:headers]['Content-Type']
end

request_headers = @request_headers
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
Expand All @@ -125,7 +122,9 @@ def make_request_async(method, path, options = {})
#
def add_telemetry
sdk_information = 'azure_mgmt_container_service'
sdk_information = "#{sdk_information}/0.17.0"
if defined? Azure::ContainerService::Mgmt::V2016_03_30::VERSION
sdk_information = "#{sdk_information}/#{Azure::ContainerService::Mgmt::V2016_03_30::VERSION}"
end
add_user_agent_information(sdk_information)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def initialize(client)
#
# @return [ContainerServiceListResult] operation results.
#
def list(custom_headers:nil)
response = list_async(custom_headers:custom_headers).value!
def list(custom_headers = nil)
response = list_async(custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -46,8 +46,8 @@ def list(custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_with_http_info(custom_headers:nil)
list_async(custom_headers:custom_headers).value!
def list_with_http_info(custom_headers = nil)
list_async(custom_headers).value!
end

#
Expand All @@ -60,13 +60,12 @@ def list_with_http_info(custom_headers:nil)
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_async(custom_headers:nil)
def list_async(custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -125,8 +124,8 @@ def list_async(custom_headers:nil)
#
# @return [ContainerService] operation results.
#
def create_or_update(resource_group_name, container_service_name, parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
def create_or_update(resource_group_name, container_service_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -142,9 +141,9 @@ def create_or_update(resource_group_name, container_service_name, parameters, cu
# @return [Concurrent::Promise] promise which provides async access to http
# response.
#
def create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:nil)
def create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers = nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers)
promise = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers)

promise = promise.then do |response|
# Defining deserialization method.
Expand Down Expand Up @@ -174,8 +173,8 @@ def create_or_update_async(resource_group_name, container_service_name, paramete
#
# @return [ContainerService] operation results.
#
def get(resource_group_name, container_service_name, custom_headers:nil)
response = get_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
def get(resource_group_name, container_service_name, custom_headers = nil)
response = get_async(resource_group_name, container_service_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -193,8 +192,8 @@ def get(resource_group_name, container_service_name, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(resource_group_name, container_service_name, custom_headers:nil)
get_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
def get_with_http_info(resource_group_name, container_service_name, custom_headers = nil)
get_async(resource_group_name, container_service_name, custom_headers).value!
end

#
Expand All @@ -211,15 +210,14 @@ def get_with_http_info(resource_group_name, container_service_name, custom_heade
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(resource_group_name, container_service_name, custom_headers:nil)
def get_async(resource_group_name, container_service_name, custom_headers = nil)
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -277,8 +275,8 @@ def get_async(resource_group_name, container_service_name, custom_headers:nil)
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
def delete(resource_group_name, container_service_name, custom_headers:nil)
response = delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
def delete(resource_group_name, container_service_name, custom_headers = nil)
response = delete_async(resource_group_name, container_service_name, custom_headers).value!
nil
end

Expand All @@ -292,9 +290,9 @@ def delete(resource_group_name, container_service_name, custom_headers:nil)
# @return [Concurrent::Promise] promise which provides async access to http
# response.
#
def delete_async(resource_group_name, container_service_name, custom_headers:nil)
def delete_async(resource_group_name, container_service_name, custom_headers = nil)
# Send request
promise = begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers)
promise = begin_delete_async(resource_group_name, container_service_name, custom_headers)

promise = promise.then do |response|
# Defining deserialization method.
Expand All @@ -320,8 +318,8 @@ def delete_async(resource_group_name, container_service_name, custom_headers:nil
#
# @return [ContainerServiceListResult] operation results.
#
def list_by_resource_group(resource_group_name, custom_headers:nil)
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
def list_by_resource_group(resource_group_name, custom_headers = nil)
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -337,8 +335,8 @@ def list_by_resource_group(resource_group_name, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
list_by_resource_group_async(resource_group_name, custom_headers).value!
end

#
Expand All @@ -353,14 +351,13 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:ni
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
def list_by_resource_group_async(resource_group_name, custom_headers = nil)
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -419,8 +416,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
#
# @return [ContainerService] operation results.
#
def begin_create_or_update(resource_group_name, container_service_name, parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update(resource_group_name, container_service_name, parameters, custom_headers = nil)
response = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -438,8 +435,8 @@ def begin_create_or_update(resource_group_name, container_service_name, paramete
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers = nil)
begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
end

#
Expand All @@ -456,7 +453,7 @@ def begin_create_or_update_with_http_info(resource_group_name, container_service
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:nil)
def begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers = nil)
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
fail ArgumentError, 'parameters is nil' if parameters.nil?
Expand All @@ -465,12 +462,13 @@ def begin_create_or_update_async(resource_group_name, container_service_name, pa


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Serialize Request
request_mapper = Azure::ContainerService::Mgmt::V2016_03_30::Models::ContainerService.mapper()
request_content = @client.serialize(request_mapper, parameters)
Expand Down Expand Up @@ -551,8 +549,8 @@ def begin_create_or_update_async(resource_group_name, container_service_name, pa
# will be added to the HTTP request.
#
#
def begin_delete(resource_group_name, container_service_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
def begin_delete(resource_group_name, container_service_name, custom_headers = nil)
response = begin_delete_async(resource_group_name, container_service_name, custom_headers).value!
nil
end

Expand All @@ -571,8 +569,8 @@ def begin_delete(resource_group_name, container_service_name, custom_headers:nil
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def begin_delete_with_http_info(resource_group_name, container_service_name, custom_headers:nil)
begin_delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
def begin_delete_with_http_info(resource_group_name, container_service_name, custom_headers = nil)
begin_delete_async(resource_group_name, container_service_name, custom_headers).value!
end

#
Expand All @@ -590,15 +588,14 @@ def begin_delete_with_http_info(resource_group_name, container_service_name, cus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def begin_delete_async(resource_group_name, container_service_name, custom_headers:nil)
def begin_delete_async(resource_group_name, container_service_name, custom_headers = nil)
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ class ContainerService < Resource
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'ContainerService',
type: {
name: 'Composite',
class_name: 'ContainerService',
model_properties: {
id: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'id',
Expand All @@ -61,7 +59,6 @@ def self.mapper()
}
},
name: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'name',
Expand All @@ -70,7 +67,6 @@ def self.mapper()
}
},
type: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'type',
Expand All @@ -79,21 +75,18 @@ def self.mapper()
}
},
location: {
client_side_validation: true,
required: true,
serialized_name: 'location',
type: {
name: 'String'
}
},
tags: {
client_side_validation: true,
required: false,
serialized_name: 'tags',
type: {
name: 'Dictionary',
value: {
client_side_validation: true,
required: false,
serialized_name: 'StringElementType',
type: {
Expand All @@ -103,7 +96,6 @@ def self.mapper()
}
},
provisioning_state: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'properties.provisioningState',
Expand All @@ -112,7 +104,6 @@ def self.mapper()
}
},
orchestrator_profile: {
client_side_validation: true,
required: false,
serialized_name: 'properties.orchestratorProfile',
type: {
Expand All @@ -121,7 +112,6 @@ def self.mapper()
}
},
master_profile: {
client_side_validation: true,
required: true,
serialized_name: 'properties.masterProfile',
type: {
Expand All @@ -130,13 +120,11 @@ def self.mapper()
}
},
agent_pool_profiles: {
client_side_validation: true,
required: true,
serialized_name: 'properties.agentPoolProfiles',
type: {
name: 'Sequence',
element: {
client_side_validation: true,
required: false,
serialized_name: 'ContainerServiceAgentPoolProfileElementType',
type: {
Expand All @@ -147,7 +135,6 @@ def self.mapper()
}
},
windows_profile: {
client_side_validation: true,
required: false,
serialized_name: 'properties.windowsProfile',
type: {
Expand All @@ -156,7 +143,6 @@ def self.mapper()
}
},
linux_profile: {
client_side_validation: true,
required: true,
serialized_name: 'properties.linuxProfile',
type: {
Expand All @@ -165,7 +151,6 @@ def self.mapper()
}
},
diagnostics_profile: {
client_side_validation: true,
required: false,
serialized_name: 'properties.diagnosticsProfile',
type: {
Expand Down
Loading