azure_mgmt_compute 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/azure_mgmt_compute.gemspec +3 -11
- data/lib/azure_mgmt_compute/availability_sets.rb +226 -241
- data/lib/azure_mgmt_compute/compute_management_client.rb +26 -11
- data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +8 -11
- data/lib/azure_mgmt_compute/models/api_entity_reference.rb +58 -0
- data/lib/azure_mgmt_compute/models/api_error.rb +4 -6
- data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/availability_set_properties.rb +9 -11
- data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +67 -0
- data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +65 -0
- data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +3 -6
- data/lib/azure_mgmt_compute/models/compute_operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/data_disk.rb +27 -26
- data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -3
- data/lib/azure_mgmt_compute/models/delete_operation_result.rb +6 -5
- data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +62 -0
- data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +81 -0
- data/lib/azure_mgmt_compute/models/disk_instance_view.rb +4 -6
- data/lib/azure_mgmt_compute/models/hardware_profile.rb +15 -9
- data/lib/azure_mgmt_compute/models/image_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/inner_error.rb +1 -3
- data/lib/azure_mgmt_compute/models/instance_view_status.rb +3 -5
- data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +74 -0
- data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +75 -0
- data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -3
- data/lib/azure_mgmt_compute/models/list_usages_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/osdisk.rb +54 -26
- data/lib/azure_mgmt_compute/models/osdisk_image.rb +4 -6
- data/lib/azure_mgmt_compute/models/osprofile.rb +4 -6
- data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/plan.rb +1 -3
- data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/purchase_plan.rb +4 -4
- data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/sku.rb +75 -0
- data/lib/azure_mgmt_compute/models/ssh_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -3
- data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/storage_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/{usage_unit.rb → upgrade_mode.rb} +5 -4
- data/lib/azure_mgmt_compute/models/upgrade_policy.rb +60 -0
- data/lib/azure_mgmt_compute/models/usage.rb +7 -9
- data/lib/azure_mgmt_compute/models/usage_name.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_secret_group.rb +6 -8
- data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +68 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +56 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +9 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +28 -14
- data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +29 -5
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +108 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +116 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +125 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +79 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +127 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +80 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +129 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +147 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +90 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +165 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +87 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +59 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +202 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +114 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +190 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +53 -45
- data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +68 -0
- data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +4 -6
- data/lib/azure_mgmt_compute/models/win_rmlistener.rb +3 -5
- data/lib/azure_mgmt_compute/models/windows_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/module_definition.rb +5 -3
- data/lib/azure_mgmt_compute/usage_operations.rb +75 -42
- data/lib/azure_mgmt_compute/version.rb +5 -3
- data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +71 -158
- data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +66 -149
- data/lib/azure_mgmt_compute/virtual_machine_images.rb +121 -264
- data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +750 -0
- data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +1327 -0
- data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +75 -42
- data/lib/azure_mgmt_compute/virtual_machines.rb +397 -623
- data/lib/azure_mgmt_compute.rb +57 -18
- metadata +50 -128
- data/.gitignore +0 -10
- data/.travis.yml +0 -3
- data/Gemfile +0 -17
@@ -1,11 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::Compute
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# The Compute Management Client.
|
9
9
|
#
|
10
10
|
class VirtualMachineSizes
|
11
11
|
include Azure::ARM::Compute::Models
|
@@ -24,6 +24,7 @@ module Azure::ARM::Compute
|
|
24
24
|
|
25
25
|
#
|
26
26
|
# Lists virtual-machine-sizes available in a location for a subscription.
|
27
|
+
#
|
27
28
|
# @param location [String] The location upon which virtual-machine-sizes is
|
28
29
|
# queried.
|
29
30
|
# @param [Hash{String => String}] The hash of custom headers need to be
|
@@ -36,71 +37,103 @@ module Azure::ARM::Compute
|
|
36
37
|
fail ArgumentError, 'location is nil' if location.nil?
|
37
38
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
38
39
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
39
|
-
|
40
|
-
path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes"
|
41
|
-
path['{location}'] = ERB::Util.url_encode(location) if path.include?('{location}')
|
42
|
-
path['{subscriptionId}'] = ERB::Util.url_encode(@client.subscription_id) if path.include?('{subscriptionId}')
|
43
|
-
url = URI.join(@client.base_url, path)
|
44
|
-
properties = {}
|
45
|
-
properties['api-version'] = ERB::Util.url_encode(@client.api_version.to_s) unless @client.api_version.nil?
|
46
|
-
unless url.query.nil?
|
47
|
-
url.query.split('&').each do |url_item|
|
48
|
-
url_items_parts = url_item.split('=')
|
49
|
-
properties[url_items_parts[0]] = url_items_parts[1]
|
50
|
-
end
|
51
|
-
end
|
52
|
-
properties.reject!{ |key, value| value.nil? }
|
53
|
-
url.query = properties.map{ |key, value| "#{key}=#{value}" }.compact.join('&')
|
54
|
-
fail URI::Error unless url.to_s =~ /\A#{URI::regexp}\z/
|
55
|
-
corrected_url = url.to_s.gsub(/([^:])\/\//, '\1/')
|
56
|
-
url = URI.parse(corrected_url)
|
57
|
-
|
58
|
-
connection = Faraday.new(:url => url) do |faraday|
|
59
|
-
faraday.use MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02
|
60
|
-
faraday.use :cookie_jar
|
61
|
-
faraday.adapter Faraday.default_adapter
|
62
|
-
end
|
63
|
-
request_headers = Hash.new
|
40
|
+
request_headers = {}
|
64
41
|
|
65
42
|
# Set Headers
|
66
43
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
67
|
-
request_headers[
|
44
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
45
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'
|
46
|
+
options = {
|
47
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
48
|
+
path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
|
49
|
+
query_params: {'api-version' => @client.api_version},
|
50
|
+
headers: request_headers.merge(custom_headers || {})
|
51
|
+
}
|
52
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
|
53
|
+
promise = request.run_promise do |req|
|
54
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
55
|
+
end
|
68
56
|
|
69
|
-
|
70
|
-
|
71
|
-
|
57
|
+
promise = promise.then do |http_response|
|
58
|
+
status_code = http_response.status
|
59
|
+
response_content = http_response.body
|
60
|
+
unless status_code == 200
|
61
|
+
error_model = JSON.load(response_content)
|
62
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
72
63
|
end
|
73
|
-
end
|
74
64
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
65
|
+
# Create Result
|
66
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
67
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
68
|
+
# Deserialize Response
|
69
|
+
if status_code == 200
|
70
|
+
begin
|
71
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
72
|
+
unless parsed_response.nil?
|
73
|
+
parsed_response = VirtualMachineSizeListResult.deserialize_object(parsed_response)
|
74
|
+
end
|
75
|
+
result.body = parsed_response
|
76
|
+
rescue Exception => e
|
77
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
78
|
+
end
|
80
79
|
end
|
80
|
+
|
81
|
+
result
|
82
|
+
end
|
83
|
+
|
84
|
+
promise.execute
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# Lists virtual-machine-sizes available in a location for a subscription.
|
89
|
+
#
|
90
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
91
|
+
# call to List operation.
|
92
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
93
|
+
# applied to HTTP request.
|
94
|
+
#
|
95
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
96
|
+
# response.
|
97
|
+
#
|
98
|
+
def list_next(next_page_link, custom_headers = nil)
|
99
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
100
|
+
request_headers = {}
|
101
|
+
|
102
|
+
# Set Headers
|
103
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
104
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
105
|
+
path_template = '{nextLink}'
|
106
|
+
options = {
|
107
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
108
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
109
|
+
headers: request_headers.merge(custom_headers || {})
|
110
|
+
}
|
111
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
|
112
|
+
promise = request.run_promise do |req|
|
113
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
81
114
|
end
|
82
115
|
|
83
116
|
promise = promise.then do |http_response|
|
84
117
|
status_code = http_response.status
|
85
118
|
response_content = http_response.body
|
86
|
-
unless
|
119
|
+
unless status_code == 200
|
87
120
|
error_model = JSON.load(response_content)
|
88
|
-
fail MsRestAzure::AzureOperationError.new(
|
121
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
89
122
|
end
|
90
123
|
|
91
124
|
# Create Result
|
92
|
-
result = MsRestAzure::AzureOperationResponse.new(
|
125
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
93
126
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
94
127
|
# Deserialize Response
|
95
128
|
if status_code == 200
|
96
129
|
begin
|
97
|
-
parsed_response = JSON.load(response_content)
|
130
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
131
|
unless parsed_response.nil?
|
99
132
|
parsed_response = VirtualMachineSizeListResult.deserialize_object(parsed_response)
|
100
133
|
end
|
101
134
|
result.body = parsed_response
|
102
135
|
rescue Exception => e
|
103
|
-
fail MsRest::DeserializationError.new(
|
136
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
104
137
|
end
|
105
138
|
end
|
106
139
|
|