azure_mgmt_network 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 (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_network/application_gateways.rb +85 -112
  3. data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +47 -62
  4. data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +47 -62
  5. data/lib/generated/azure_mgmt_network/express_route_circuits.rb +112 -148
  6. data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +20 -26
  7. data/lib/generated/azure_mgmt_network/load_balancers.rb +67 -88
  8. data/lib/generated/azure_mgmt_network/local_network_gateways.rb +47 -62
  9. data/lib/generated/azure_mgmt_network/network_interfaces.rb +134 -176
  10. data/lib/generated/azure_mgmt_network/network_management_client.rb +64 -16
  11. data/lib/generated/azure_mgmt_network/network_security_groups.rb +67 -88
  12. data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +67 -88
  13. data/lib/generated/azure_mgmt_network/route_tables.rb +67 -88
  14. data/lib/generated/azure_mgmt_network/routes.rb +47 -62
  15. data/lib/generated/azure_mgmt_network/security_rules.rb +47 -62
  16. data/lib/generated/azure_mgmt_network/subnets.rb +47 -62
  17. data/lib/generated/azure_mgmt_network/usages.rb +20 -26
  18. data/lib/generated/azure_mgmt_network/version.rb +1 -1
  19. data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +74 -98
  20. data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +65 -86
  21. data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +47 -62
  22. data/lib/generated/azure_mgmt_network/virtual_networks.rb +76 -100
  23. metadata +5 -5
@@ -125,30 +125,27 @@ module Azure::ARM::Network
125
125
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
126
126
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
127
127
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'
128
+
129
+ request_url = @base_url || @client.base_url
130
+
128
131
  options = {
129
132
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
130
133
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'virtualNetworkPeeringName' => virtual_network_peering_name,'subscriptionId' => @client.subscription_id},
131
134
  query_params: {'api-version' => @client.api_version},
132
- headers: request_headers.merge(custom_headers || {})
135
+ headers: request_headers.merge(custom_headers || {}),
136
+ base_url: request_url
133
137
  }
138
+ promise = @client.make_request_async(:delete, path_template, options)
134
139
 
135
- request_url = @base_url || @client.base_url
136
-
137
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
138
- promise = request.run_promise do |req|
139
- @client.credentials.sign_request(req) unless @client.credentials.nil?
140
- end
141
-
142
- promise = promise.then do |http_response|
140
+ promise = promise.then do |result|
141
+ http_response = result.response
143
142
  status_code = http_response.status
144
143
  response_content = http_response.body
145
144
  unless status_code == 200 || status_code == 204 || status_code == 202
146
145
  error_model = JSON.load(response_content)
147
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
146
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
148
147
  end
149
148
 
150
- # Create Result
151
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
152
149
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
153
150
 
154
151
  result
@@ -219,30 +216,27 @@ module Azure::ARM::Network
219
216
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
220
217
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
221
218
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'
219
+
220
+ request_url = @base_url || @client.base_url
221
+
222
222
  options = {
223
223
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
224
224
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'virtualNetworkPeeringName' => virtual_network_peering_name,'subscriptionId' => @client.subscription_id},
225
225
  query_params: {'api-version' => @client.api_version},
226
- headers: request_headers.merge(custom_headers || {})
226
+ headers: request_headers.merge(custom_headers || {}),
227
+ base_url: request_url
227
228
  }
229
+ promise = @client.make_request_async(:get, path_template, options)
228
230
 
229
- request_url = @base_url || @client.base_url
230
-
231
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
232
- promise = request.run_promise do |req|
233
- @client.credentials.sign_request(req) unless @client.credentials.nil?
234
- end
235
-
236
- promise = promise.then do |http_response|
231
+ promise = promise.then do |result|
232
+ http_response = result.response
237
233
  status_code = http_response.status
238
234
  response_content = http_response.body
239
235
  unless status_code == 200
240
236
  error_model = JSON.load(response_content)
241
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
237
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
242
238
  end
243
239
 
244
- # Create Result
245
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
246
240
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
247
241
  # Deserialize Response
248
242
  if status_code == 200
@@ -384,31 +378,28 @@ module Azure::ARM::Network
384
378
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
385
379
 
386
380
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'
381
+
382
+ request_url = @base_url || @client.base_url
383
+
387
384
  options = {
388
385
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
389
386
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'virtualNetworkPeeringName' => virtual_network_peering_name,'subscriptionId' => @client.subscription_id},
390
387
  query_params: {'api-version' => @client.api_version},
391
388
  body: request_content,
392
- headers: request_headers.merge(custom_headers || {})
389
+ headers: request_headers.merge(custom_headers || {}),
390
+ base_url: request_url
393
391
  }
392
+ promise = @client.make_request_async(:put, path_template, options)
394
393
 
395
- request_url = @base_url || @client.base_url
396
-
397
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
398
- promise = request.run_promise do |req|
399
- @client.credentials.sign_request(req) unless @client.credentials.nil?
400
- end
401
-
402
- promise = promise.then do |http_response|
394
+ promise = promise.then do |result|
395
+ http_response = result.response
403
396
  status_code = http_response.status
404
397
  response_content = http_response.body
405
398
  unless status_code == 200 || status_code == 201
406
399
  error_model = JSON.load(response_content)
407
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
400
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
408
401
  end
409
402
 
410
- # Create Result
411
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
412
403
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
413
404
  # Deserialize Response
414
405
  if status_code == 200
@@ -453,8 +444,8 @@ module Azure::ARM::Network
453
444
  response = list_async(resource_group_name, virtual_network_name, custom_headers).value!
454
445
  unless response.nil?
455
446
  page = response.body
456
- page.next_method = Proc.new do |next_link|
457
- list_next_async(next_link, custom_headers)
447
+ page.next_method = Proc.new do |next_page_link|
448
+ list_next_async(next_page_link, custom_headers)
458
449
  end
459
450
  page
460
451
  end
@@ -515,30 +506,27 @@ module Azure::ARM::Network
515
506
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
516
507
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
517
508
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings'
509
+
510
+ request_url = @base_url || @client.base_url
511
+
518
512
  options = {
519
513
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
520
514
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
521
515
  query_params: {'api-version' => @client.api_version},
522
- headers: request_headers.merge(custom_headers || {})
516
+ headers: request_headers.merge(custom_headers || {}),
517
+ base_url: request_url
523
518
  }
519
+ promise = @client.make_request_async(:get, path_template, options)
524
520
 
525
- request_url = @base_url || @client.base_url
526
-
527
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
528
- promise = request.run_promise do |req|
529
- @client.credentials.sign_request(req) unless @client.credentials.nil?
530
- end
531
-
532
- promise = promise.then do |http_response|
521
+ promise = promise.then do |result|
522
+ http_response = result.response
533
523
  status_code = http_response.status
534
524
  response_content = http_response.body
535
525
  unless status_code == 200
536
526
  error_model = JSON.load(response_content)
537
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
527
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
538
528
  end
539
529
 
540
- # Create Result
541
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
542
530
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
543
531
  # Deserialize Response
544
532
  if status_code == 200
@@ -609,29 +597,26 @@ module Azure::ARM::Network
609
597
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
610
598
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
611
599
  path_template = '{nextLink}'
600
+
601
+ request_url = @base_url || @client.base_url
602
+
612
603
  options = {
613
604
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
614
605
  skip_encoding_path_params: {'nextLink' => next_page_link},
615
- headers: request_headers.merge(custom_headers || {})
606
+ headers: request_headers.merge(custom_headers || {}),
607
+ base_url: request_url
616
608
  }
609
+ promise = @client.make_request_async(:get, path_template, options)
617
610
 
618
- request_url = @base_url || @client.base_url
619
-
620
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
621
- promise = request.run_promise do |req|
622
- @client.credentials.sign_request(req) unless @client.credentials.nil?
623
- end
624
-
625
- promise = promise.then do |http_response|
611
+ promise = promise.then do |result|
612
+ http_response = result.response
626
613
  status_code = http_response.status
627
614
  response_content = http_response.body
628
615
  unless status_code == 200
629
616
  error_model = JSON.load(response_content)
630
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
617
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
631
618
  end
632
619
 
633
- # Create Result
634
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
635
620
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
636
621
  # Deserialize Response
637
622
  if status_code == 200
@@ -114,30 +114,27 @@ module Azure::ARM::Network
114
114
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
115
115
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
116
116
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
117
+
118
+ request_url = @base_url || @client.base_url
119
+
117
120
  options = {
118
121
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
119
122
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
120
123
  query_params: {'api-version' => @client.api_version},
121
- headers: request_headers.merge(custom_headers || {})
124
+ headers: request_headers.merge(custom_headers || {}),
125
+ base_url: request_url
122
126
  }
127
+ promise = @client.make_request_async(:delete, path_template, options)
123
128
 
124
- request_url = @base_url || @client.base_url
125
-
126
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
127
- promise = request.run_promise do |req|
128
- @client.credentials.sign_request(req) unless @client.credentials.nil?
129
- end
130
-
131
- promise = promise.then do |http_response|
129
+ promise = promise.then do |result|
130
+ http_response = result.response
132
131
  status_code = http_response.status
133
132
  response_content = http_response.body
134
133
  unless status_code == 202 || status_code == 204 || status_code == 200
135
134
  error_model = JSON.load(response_content)
136
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
135
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
137
136
  end
138
137
 
139
- # Create Result
140
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
141
138
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
142
139
 
143
140
  result
@@ -204,30 +201,27 @@ module Azure::ARM::Network
204
201
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
205
202
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
206
203
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
204
+
205
+ request_url = @base_url || @client.base_url
206
+
207
207
  options = {
208
208
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
209
209
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
210
210
  query_params: {'api-version' => @client.api_version,'$expand' => expand},
211
- headers: request_headers.merge(custom_headers || {})
211
+ headers: request_headers.merge(custom_headers || {}),
212
+ base_url: request_url
212
213
  }
214
+ promise = @client.make_request_async(:get, path_template, options)
213
215
 
214
- request_url = @base_url || @client.base_url
215
-
216
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
217
- promise = request.run_promise do |req|
218
- @client.credentials.sign_request(req) unless @client.credentials.nil?
219
- end
220
-
221
- promise = promise.then do |http_response|
216
+ promise = promise.then do |result|
217
+ http_response = result.response
222
218
  status_code = http_response.status
223
219
  response_content = http_response.body
224
220
  unless status_code == 200
225
221
  error_model = JSON.load(response_content)
226
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
222
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
227
223
  end
228
224
 
229
- # Create Result
230
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
231
225
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
232
226
  # Deserialize Response
233
227
  if status_code == 200
@@ -363,31 +357,28 @@ module Azure::ARM::Network
363
357
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
364
358
 
365
359
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
360
+
361
+ request_url = @base_url || @client.base_url
362
+
366
363
  options = {
367
364
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
368
365
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
369
366
  query_params: {'api-version' => @client.api_version},
370
367
  body: request_content,
371
- headers: request_headers.merge(custom_headers || {})
368
+ headers: request_headers.merge(custom_headers || {}),
369
+ base_url: request_url
372
370
  }
371
+ promise = @client.make_request_async(:put, path_template, options)
373
372
 
374
- request_url = @base_url || @client.base_url
375
-
376
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
377
- promise = request.run_promise do |req|
378
- @client.credentials.sign_request(req) unless @client.credentials.nil?
379
- end
380
-
381
- promise = promise.then do |http_response|
373
+ promise = promise.then do |result|
374
+ http_response = result.response
382
375
  status_code = http_response.status
383
376
  response_content = http_response.body
384
377
  unless status_code == 200 || status_code == 201
385
378
  error_model = JSON.load(response_content)
386
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
379
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
387
380
  end
388
381
 
389
- # Create Result
390
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
391
382
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
383
  # Deserialize Response
393
384
  if status_code == 200
@@ -429,8 +420,8 @@ module Azure::ARM::Network
429
420
  response = list_all_async(custom_headers).value!
430
421
  unless response.nil?
431
422
  page = response.body
432
- page.next_method = Proc.new do |next_link|
433
- list_all_next_async(next_link, custom_headers)
423
+ page.next_method = Proc.new do |next_page_link|
424
+ list_all_next_async(next_page_link, custom_headers)
434
425
  end
435
426
  page
436
427
  end
@@ -480,30 +471,27 @@ module Azure::ARM::Network
480
471
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
481
472
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
482
473
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'
474
+
475
+ request_url = @base_url || @client.base_url
476
+
483
477
  options = {
484
478
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
485
479
  path_params: {'subscriptionId' => @client.subscription_id},
486
480
  query_params: {'api-version' => @client.api_version},
487
- headers: request_headers.merge(custom_headers || {})
481
+ headers: request_headers.merge(custom_headers || {}),
482
+ base_url: request_url
488
483
  }
484
+ promise = @client.make_request_async(:get, path_template, options)
489
485
 
490
- request_url = @base_url || @client.base_url
491
-
492
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
493
- promise = request.run_promise do |req|
494
- @client.credentials.sign_request(req) unless @client.credentials.nil?
495
- end
496
-
497
- promise = promise.then do |http_response|
486
+ promise = promise.then do |result|
487
+ http_response = result.response
498
488
  status_code = http_response.status
499
489
  response_content = http_response.body
500
490
  unless status_code == 200
501
491
  error_model = JSON.load(response_content)
502
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
492
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
503
493
  end
504
494
 
505
- # Create Result
506
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
507
495
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
508
496
  # Deserialize Response
509
497
  if status_code == 200
@@ -536,8 +524,8 @@ module Azure::ARM::Network
536
524
  response = list_async(resource_group_name, custom_headers).value!
537
525
  unless response.nil?
538
526
  page = response.body
539
- page.next_method = Proc.new do |next_link|
540
- list_next_async(next_link, custom_headers)
527
+ page.next_method = Proc.new do |next_page_link|
528
+ list_next_async(next_page_link, custom_headers)
541
529
  end
542
530
  page
543
531
  end
@@ -591,30 +579,27 @@ module Azure::ARM::Network
591
579
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
592
580
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
593
581
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'
582
+
583
+ request_url = @base_url || @client.base_url
584
+
594
585
  options = {
595
586
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
596
587
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
597
588
  query_params: {'api-version' => @client.api_version},
598
- headers: request_headers.merge(custom_headers || {})
589
+ headers: request_headers.merge(custom_headers || {}),
590
+ base_url: request_url
599
591
  }
592
+ promise = @client.make_request_async(:get, path_template, options)
600
593
 
601
- request_url = @base_url || @client.base_url
602
-
603
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
604
- promise = request.run_promise do |req|
605
- @client.credentials.sign_request(req) unless @client.credentials.nil?
606
- end
607
-
608
- promise = promise.then do |http_response|
594
+ promise = promise.then do |result|
595
+ http_response = result.response
609
596
  status_code = http_response.status
610
597
  response_content = http_response.body
611
598
  unless status_code == 200
612
599
  error_model = JSON.load(response_content)
613
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
600
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
614
601
  end
615
602
 
616
- # Create Result
617
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
618
603
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
619
604
  # Deserialize Response
620
605
  if status_code == 200
@@ -688,30 +673,27 @@ module Azure::ARM::Network
688
673
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
689
674
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
690
675
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'
676
+
677
+ request_url = @base_url || @client.base_url
678
+
691
679
  options = {
692
680
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
693
681
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
694
682
  query_params: {'ipAddress' => ip_address,'api-version' => @client.api_version},
695
- headers: request_headers.merge(custom_headers || {})
683
+ headers: request_headers.merge(custom_headers || {}),
684
+ base_url: request_url
696
685
  }
686
+ promise = @client.make_request_async(:get, path_template, options)
697
687
 
698
- request_url = @base_url || @client.base_url
699
-
700
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
701
- promise = request.run_promise do |req|
702
- @client.credentials.sign_request(req) unless @client.credentials.nil?
703
- end
704
-
705
- promise = promise.then do |http_response|
688
+ promise = promise.then do |result|
689
+ http_response = result.response
706
690
  status_code = http_response.status
707
691
  response_content = http_response.body
708
692
  unless status_code == 200
709
693
  error_model = JSON.load(response_content)
710
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
694
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
711
695
  end
712
696
 
713
- # Create Result
714
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
715
697
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
716
698
  # Deserialize Response
717
699
  if status_code == 200
@@ -779,29 +761,26 @@ module Azure::ARM::Network
779
761
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
780
762
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
781
763
  path_template = '{nextLink}'
764
+
765
+ request_url = @base_url || @client.base_url
766
+
782
767
  options = {
783
768
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
784
769
  skip_encoding_path_params: {'nextLink' => next_page_link},
785
- headers: request_headers.merge(custom_headers || {})
770
+ headers: request_headers.merge(custom_headers || {}),
771
+ base_url: request_url
786
772
  }
773
+ promise = @client.make_request_async(:get, path_template, options)
787
774
 
788
- request_url = @base_url || @client.base_url
789
-
790
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
791
- promise = request.run_promise do |req|
792
- @client.credentials.sign_request(req) unless @client.credentials.nil?
793
- end
794
-
795
- promise = promise.then do |http_response|
775
+ promise = promise.then do |result|
776
+ http_response = result.response
796
777
  status_code = http_response.status
797
778
  response_content = http_response.body
798
779
  unless status_code == 200
799
780
  error_model = JSON.load(response_content)
800
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
781
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
801
782
  end
802
783
 
803
- # Create Result
804
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
805
784
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
806
785
  # Deserialize Response
807
786
  if status_code == 200
@@ -869,29 +848,26 @@ module Azure::ARM::Network
869
848
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
870
849
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
871
850
  path_template = '{nextLink}'
851
+
852
+ request_url = @base_url || @client.base_url
853
+
872
854
  options = {
873
855
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
874
856
  skip_encoding_path_params: {'nextLink' => next_page_link},
875
- headers: request_headers.merge(custom_headers || {})
857
+ headers: request_headers.merge(custom_headers || {}),
858
+ base_url: request_url
876
859
  }
860
+ promise = @client.make_request_async(:get, path_template, options)
877
861
 
878
- request_url = @base_url || @client.base_url
879
-
880
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
881
- promise = request.run_promise do |req|
882
- @client.credentials.sign_request(req) unless @client.credentials.nil?
883
- end
884
-
885
- promise = promise.then do |http_response|
862
+ promise = promise.then do |result|
863
+ http_response = result.response
886
864
  status_code = http_response.status
887
865
  response_content = http_response.body
888
866
  unless status_code == 200
889
867
  error_model = JSON.load(response_content)
890
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
868
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
891
869
  end
892
870
 
893
- # Create Result
894
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
895
871
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
896
872
  # Deserialize Response
897
873
  if status_code == 200