azure_mgmt_compute 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -5
  3. data/lib/generated/azure_mgmt_compute/availability_sets.rb +45 -60
  4. data/lib/generated/azure_mgmt_compute/compute_management_client.rb +55 -4
  5. data/lib/generated/azure_mgmt_compute/container_service_operations.rb +36 -52
  6. data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +3 -3
  7. data/lib/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  8. data/lib/generated/azure_mgmt_compute/models/data_disk_image.rb +3 -3
  9. data/lib/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  10. data/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
  11. data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +1 -1
  12. data/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +1 -1
  13. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +3 -3
  14. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
  15. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -2
  16. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +1 -1
  17. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
  18. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +1 -1
  19. data/lib/generated/azure_mgmt_compute/usage_operations.rb +20 -27
  20. data/lib/generated/azure_mgmt_compute/version.rb +1 -1
  21. data/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +27 -36
  22. data/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +27 -40
  23. data/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +45 -60
  24. data/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +92 -135
  25. data/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +159 -231
  26. data/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +9 -12
  27. data/lib/generated/azure_mgmt_compute/virtual_machines.rb +139 -202
  28. metadata +5 -5
@@ -30,9 +30,9 @@ module Azure::ARM::Compute
30
30
  attr_accessor :setting_name
31
31
 
32
32
  # @return [String] XML formatted content that is added to the
33
- # unattend.xml file in the specified pass and component.The XML must be
34
- # less than 4 KB and must include the root element for the setting or
35
- # feature that is being inserted.
33
+ # unattend.xml file in the specified pass and component. The XML must
34
+ # be less than 4 KB and must include the root element for the setting
35
+ # or feature that is being inserted.
36
36
  attr_accessor :content
37
37
 
38
38
 
@@ -23,7 +23,7 @@ module Azure::ARM::Compute
23
23
 
24
24
  # @return [VirtualHardDisk] the Source User Image VirtualHardDisk. This
25
25
  # VirtualHardDisk will be copied before using it to attach to the
26
- # Virtual Machine.If SourceImage is provided, the destination
26
+ # Virtual Machine. If SourceImage is provided, the destination
27
27
  # VirtualHardDisk should not exist.
28
28
  attr_accessor :image
29
29
 
@@ -12,9 +12,9 @@ module Azure::ARM::Compute
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Integer] the LUN number for a data disk.This value is used to
16
- # identify data disk image inside the VMImage therefore it must be
17
- # unique for each data disk.The allowed character for the value is
15
+ # @return [Integer] the LUN number for a data disk. This value is used
16
+ # to identify data disk image inside the VMImage therefore it must be
17
+ # unique for each data disk. The allowed character for the value is
18
18
  # digit.
19
19
  attr_accessor :lun
20
20
 
@@ -27,7 +27,7 @@ module Azure::ARM::Compute
27
27
 
28
28
  # @return [VirtualHardDisk] the Source User Image VirtualHardDisk. This
29
29
  # VirtualHardDisk will be copied before using it to attach to the
30
- # Virtual Machine.If SourceImage is provided, the destination
30
+ # Virtual Machine. If SourceImage is provided, the destination
31
31
  # VirtualHardDisk should not exist.
32
32
  attr_accessor :image
33
33
 
@@ -19,7 +19,7 @@ module Azure::ARM::Compute
19
19
  attr_accessor :path
20
20
 
21
21
  # @return [String] Certificate public key used to authenticate with VM
22
- # through SSH.The certificate must be in Pem format with or without
22
+ # through SSH. The certificate must be in Pem format with or without
23
23
  # headers.
24
24
  attr_accessor :key_data
25
25
 
@@ -24,7 +24,7 @@ module Azure::ARM::Compute
24
24
  attr_accessor :handler_schema
25
25
 
26
26
  # @return [Boolean] whether the extension can be used on xRP
27
- # VMScaleSets.By default existing extensions are usable on scalesets,
27
+ # VMScaleSets. By default existing extensions are usable on scalesets,
28
28
  # but there might be cases where a publisher wants to explicitly
29
29
  # indicate the extension is only enabled for CRP VMs but not VMSS.
30
30
  attr_accessor :vm_scale_set_enabled
@@ -64,7 +64,7 @@ module Azure::ARM::Compute
64
64
  class_name: 'VirtualMachineListResult',
65
65
  model_properties: {
66
66
  value: {
67
- required: false,
67
+ required: true,
68
68
  serialized_name: 'value',
69
69
  type: {
70
70
  name: 'Sequence',
@@ -27,7 +27,7 @@ module Azure::ARM::Compute
27
27
 
28
28
  # @return [Boolean] Specifies whether the Virtual Machine Scale Set
29
29
  # should be overprovisioned.
30
- attr_accessor :over_provision
30
+ attr_accessor :overprovision
31
31
 
32
32
 
33
33
  #
@@ -119,9 +119,9 @@ module Azure::ARM::Compute
119
119
  name: 'String'
120
120
  }
121
121
  },
122
- over_provision: {
122
+ overprovision: {
123
123
  required: false,
124
- serialized_name: 'properties.overProvision',
124
+ serialized_name: 'properties.overprovision',
125
125
  type: {
126
126
  name: 'Boolean'
127
127
  }
@@ -65,7 +65,7 @@ module Azure::ARM::Compute
65
65
  class_name: 'VirtualMachineScaleSetListResult',
66
66
  model_properties: {
67
67
  value: {
68
- required: false,
68
+ required: true,
69
69
  serialized_name: 'value',
70
70
  type: {
71
71
  name: 'Sequence',
@@ -66,8 +66,7 @@ module Azure::ARM::Compute
66
66
  class_name: 'VirtualMachineScaleSetListSkusResult',
67
67
  model_properties: {
68
68
  value: {
69
- required: false,
70
- read_only: true,
69
+ required: true,
71
70
  serialized_name: 'value',
72
71
  type: {
73
72
  name: 'Sequence',
@@ -67,7 +67,7 @@ module Azure::ARM::Compute
67
67
  class_name: 'VirtualMachineScaleSetListWithLinkResult',
68
68
  model_properties: {
69
69
  value: {
70
- required: false,
70
+ required: true,
71
71
  serialized_name: 'value',
72
72
  type: {
73
73
  name: 'Sequence',
@@ -29,7 +29,7 @@ module Azure::ARM::Compute
29
29
 
30
30
  # @return [VirtualHardDisk] the Source User Image VirtualHardDisk. This
31
31
  # VirtualHardDisk will be copied before using it to attach to the
32
- # Virtual Machine.If SourceImage is provided, the destination
32
+ # Virtual Machine. If SourceImage is provided, the destination
33
33
  # VirtualHardDisk should not exist.
34
34
  attr_accessor :image
35
35
 
@@ -66,7 +66,7 @@ module Azure::ARM::Compute
66
66
  class_name: 'VirtualMachineScaleSetVMListResult',
67
67
  model_properties: {
68
68
  value: {
69
- required: false,
69
+ required: true,
70
70
  serialized_name: 'value',
71
71
  type: {
72
72
  name: 'Sequence',
@@ -26,7 +26,6 @@ module Azure::ARM::Compute
26
26
  # Lists compute usages for a subscription.
27
27
  #
28
28
  # @param location [String] The location upon which resource usage is queried.
29
- # @param api_version [String] Client Api Version.
30
29
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
30
  # will be added to the HTTP request.
32
31
  #
@@ -37,8 +36,8 @@ module Azure::ARM::Compute
37
36
  response = list_async(location, custom_headers).value!
38
37
  unless response.nil?
39
38
  page = response.body
40
- page.next_method = Proc.new do |next_link|
41
- list_next_async(next_link, custom_headers)
39
+ page.next_method = Proc.new do |next_page_link|
40
+ list_next_async(next_page_link, custom_headers)
42
41
  end
43
42
  page
44
43
  end
@@ -92,30 +91,27 @@ module Azure::ARM::Compute
92
91
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
93
92
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
94
93
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'
94
+
95
+ request_url = @base_url || @client.base_url
96
+
95
97
  options = {
96
98
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
97
99
  path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
98
100
  query_params: {'api-version' => api_version},
99
- headers: request_headers.merge(custom_headers || {})
101
+ headers: request_headers.merge(custom_headers || {}),
102
+ base_url: request_url
100
103
  }
104
+ promise = @client.make_request_async(:get, path_template, options)
101
105
 
102
- request_url = @base_url || @client.base_url
103
-
104
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
105
- promise = request.run_promise do |req|
106
- @client.credentials.sign_request(req) unless @client.credentials.nil?
107
- end
108
-
109
- promise = promise.then do |http_response|
106
+ promise = promise.then do |result|
107
+ http_response = result.response
110
108
  status_code = http_response.status
111
109
  response_content = http_response.body
112
110
  unless status_code == 200
113
111
  error_model = JSON.load(response_content)
114
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
112
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
115
113
  end
116
114
 
117
- # Create Result
118
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
119
115
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
116
  # Deserialize Response
121
117
  if status_code == 200
@@ -183,29 +179,26 @@ module Azure::ARM::Compute
183
179
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
184
180
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
185
181
  path_template = '{nextLink}'
182
+
183
+ request_url = @base_url || @client.base_url
184
+
186
185
  options = {
187
186
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
187
  skip_encoding_path_params: {'nextLink' => next_page_link},
189
- headers: request_headers.merge(custom_headers || {})
188
+ headers: request_headers.merge(custom_headers || {}),
189
+ base_url: request_url
190
190
  }
191
+ promise = @client.make_request_async(:get, path_template, options)
191
192
 
192
- request_url = @base_url || @client.base_url
193
-
194
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
195
- promise = request.run_promise do |req|
196
- @client.credentials.sign_request(req) unless @client.credentials.nil?
197
- end
198
-
199
- promise = promise.then do |http_response|
193
+ promise = promise.then do |result|
194
+ http_response = result.response
200
195
  status_code = http_response.status
201
196
  response_content = http_response.body
202
197
  unless status_code == 200
203
198
  error_model = JSON.load(response_content)
204
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
199
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
205
200
  end
206
201
 
207
- # Create Result
208
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
209
202
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
210
203
  # Deserialize Response
211
204
  if status_code == 200
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Compute
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
@@ -82,30 +82,27 @@ module Azure::ARM::Compute
82
82
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
83
83
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
84
84
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
85
88
  options = {
86
89
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
90
  path_params: {'location' => location,'publisherName' => publisher_name,'type' => type,'version' => version,'subscriptionId' => @client.subscription_id},
88
91
  query_params: {'api-version' => api_version},
89
- headers: request_headers.merge(custom_headers || {})
92
+ headers: request_headers.merge(custom_headers || {}),
93
+ base_url: request_url
90
94
  }
95
+ promise = @client.make_request_async(:get, path_template, options)
91
96
 
92
- request_url = @base_url || @client.base_url
93
-
94
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
95
- promise = request.run_promise do |req|
96
- @client.credentials.sign_request(req) unless @client.credentials.nil?
97
- end
98
-
99
- promise = promise.then do |http_response|
97
+ promise = promise.then do |result|
98
+ http_response = result.response
100
99
  status_code = http_response.status
101
100
  response_content = http_response.body
102
101
  unless status_code == 200
103
102
  error_model = JSON.load(response_content)
104
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
103
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
105
104
  end
106
105
 
107
- # Create Result
108
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
109
106
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
107
  # Deserialize Response
111
108
  if status_code == 200
@@ -176,30 +173,27 @@ module Azure::ARM::Compute
176
173
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
177
174
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
178
175
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'
176
+
177
+ request_url = @base_url || @client.base_url
178
+
179
179
  options = {
180
180
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
181
181
  path_params: {'location' => location,'publisherName' => publisher_name,'subscriptionId' => @client.subscription_id},
182
182
  query_params: {'api-version' => api_version},
183
- headers: request_headers.merge(custom_headers || {})
183
+ headers: request_headers.merge(custom_headers || {}),
184
+ base_url: request_url
184
185
  }
186
+ promise = @client.make_request_async(:get, path_template, options)
185
187
 
186
- request_url = @base_url || @client.base_url
187
-
188
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
189
- promise = request.run_promise do |req|
190
- @client.credentials.sign_request(req) unless @client.credentials.nil?
191
- end
192
-
193
- promise = promise.then do |http_response|
188
+ promise = promise.then do |result|
189
+ http_response = result.response
194
190
  status_code = http_response.status
195
191
  response_content = http_response.body
196
192
  unless status_code == 200
197
193
  error_model = JSON.load(response_content)
198
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
194
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
199
195
  end
200
196
 
201
- # Create Result
202
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
203
197
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
204
198
  # Deserialize Response
205
199
  if status_code == 200
@@ -297,30 +291,27 @@ module Azure::ARM::Compute
297
291
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
298
292
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
299
293
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'
294
+
295
+ request_url = @base_url || @client.base_url
296
+
300
297
  options = {
301
298
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
302
299
  path_params: {'location' => location,'publisherName' => publisher_name,'type' => type,'subscriptionId' => @client.subscription_id},
303
300
  query_params: {'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => api_version},
304
- headers: request_headers.merge(custom_headers || {})
301
+ headers: request_headers.merge(custom_headers || {}),
302
+ base_url: request_url
305
303
  }
304
+ promise = @client.make_request_async(:get, path_template, options)
306
305
 
307
- request_url = @base_url || @client.base_url
308
-
309
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
310
- promise = request.run_promise do |req|
311
- @client.credentials.sign_request(req) unless @client.credentials.nil?
312
- end
313
-
314
- promise = promise.then do |http_response|
306
+ promise = promise.then do |result|
307
+ http_response = result.response
315
308
  status_code = http_response.status
316
309
  response_content = http_response.body
317
310
  unless status_code == 200
318
311
  error_model = JSON.load(response_content)
319
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
312
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
320
313
  end
321
314
 
322
- # Create Result
323
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
324
315
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
325
316
  # Deserialize Response
326
317
  if status_code == 200
@@ -31,7 +31,6 @@ module Azure::ARM::Compute
31
31
  # @param vm_extension_name [String] The name of the virtual machine extension.
32
32
  # @param extension_parameters [VirtualMachineExtension] Parameters supplied to
33
33
  # the Create Virtual Machine Extension operation.
34
- # @param api_version [String] Client Api Version.
35
34
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
35
  # will be added to the HTTP request.
37
36
  #
@@ -49,7 +48,6 @@ module Azure::ARM::Compute
49
48
  # @param vm_extension_name [String] The name of the virtual machine extension.
50
49
  # @param extension_parameters [VirtualMachineExtension] Parameters supplied to
51
50
  # the Create Virtual Machine Extension operation.
52
- # @param api_version [String] Client Api Version.
53
51
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
52
  # will be added to the HTTP request.
55
53
  #
@@ -148,31 +146,28 @@ module Azure::ARM::Compute
148
146
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
149
147
 
150
148
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'
149
+
150
+ request_url = @base_url || @client.base_url
151
+
151
152
  options = {
152
153
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
153
154
  path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'vmExtensionName' => vm_extension_name,'subscriptionId' => @client.subscription_id},
154
155
  query_params: {'api-version' => api_version},
155
156
  body: request_content,
156
- headers: request_headers.merge(custom_headers || {})
157
+ headers: request_headers.merge(custom_headers || {}),
158
+ base_url: request_url
157
159
  }
160
+ promise = @client.make_request_async(:put, path_template, options)
158
161
 
159
- request_url = @base_url || @client.base_url
160
-
161
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
162
- promise = request.run_promise do |req|
163
- @client.credentials.sign_request(req) unless @client.credentials.nil?
164
- end
165
-
166
- promise = promise.then do |http_response|
162
+ promise = promise.then do |result|
163
+ http_response = result.response
167
164
  status_code = http_response.status
168
165
  response_content = http_response.body
169
166
  unless status_code == 200 || status_code == 201
170
167
  error_model = JSON.load(response_content)
171
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
168
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
172
169
  end
173
170
 
174
- # Create Result
175
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
176
171
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
172
  # Deserialize Response
178
173
  if status_code == 200
@@ -208,7 +203,6 @@ module Azure::ARM::Compute
208
203
  # @param vm_name [String] The name of the virtual machine where the extension
209
204
  # should be deleted.
210
205
  # @param vm_extension_name [String] The name of the virtual machine extension.
211
- # @param api_version [String] Client Api Version.
212
206
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
213
207
  # will be added to the HTTP request.
214
208
  #
@@ -222,7 +216,6 @@ module Azure::ARM::Compute
222
216
  # @param vm_name [String] The name of the virtual machine where the extension
223
217
  # should be deleted.
224
218
  # @param vm_extension_name [String] The name of the virtual machine extension.
225
- # @param api_version [String] Client Api Version.
226
219
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
227
220
  # will be added to the HTTP request.
228
221
  #
@@ -303,30 +296,27 @@ module Azure::ARM::Compute
303
296
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
304
297
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
305
298
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'
299
+
300
+ request_url = @base_url || @client.base_url
301
+
306
302
  options = {
307
303
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
308
304
  path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'vmExtensionName' => vm_extension_name,'subscriptionId' => @client.subscription_id},
309
305
  query_params: {'api-version' => api_version},
310
- headers: request_headers.merge(custom_headers || {})
306
+ headers: request_headers.merge(custom_headers || {}),
307
+ base_url: request_url
311
308
  }
309
+ promise = @client.make_request_async(:delete, path_template, options)
312
310
 
313
- request_url = @base_url || @client.base_url
314
-
315
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
316
- promise = request.run_promise do |req|
317
- @client.credentials.sign_request(req) unless @client.credentials.nil?
318
- end
319
-
320
- promise = promise.then do |http_response|
311
+ promise = promise.then do |result|
312
+ http_response = result.response
321
313
  status_code = http_response.status
322
314
  response_content = http_response.body
323
315
  unless status_code == 202 || status_code == 204
324
316
  error_model = JSON.load(response_content)
325
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
317
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
326
318
  end
327
319
 
328
- # Create Result
329
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
330
320
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
331
321
 
332
322
  result
@@ -397,30 +387,27 @@ module Azure::ARM::Compute
397
387
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
398
388
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
399
389
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'
390
+
391
+ request_url = @base_url || @client.base_url
392
+
400
393
  options = {
401
394
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
402
395
  path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'vmExtensionName' => vm_extension_name,'subscriptionId' => @client.subscription_id},
403
396
  query_params: {'$expand' => expand,'api-version' => api_version},
404
- headers: request_headers.merge(custom_headers || {})
397
+ headers: request_headers.merge(custom_headers || {}),
398
+ base_url: request_url
405
399
  }
400
+ promise = @client.make_request_async(:get, path_template, options)
406
401
 
407
- request_url = @base_url || @client.base_url
408
-
409
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
410
- promise = request.run_promise do |req|
411
- @client.credentials.sign_request(req) unless @client.credentials.nil?
412
- end
413
-
414
- promise = promise.then do |http_response|
402
+ promise = promise.then do |result|
403
+ http_response = result.response
415
404
  status_code = http_response.status
416
405
  response_content = http_response.body
417
406
  unless status_code == 200
418
407
  error_model = JSON.load(response_content)
419
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
408
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
420
409
  end
421
410
 
422
- # Create Result
423
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
424
411
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
425
412
  # Deserialize Response
426
413
  if status_code == 200