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
@@ -124,30 +124,27 @@ module Azure::ARM::Network
124
124
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
125
125
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
126
126
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'
127
+
128
+ request_url = @base_url || @client.base_url
129
+
127
130
  options = {
128
131
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
129
132
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'subscriptionId' => @client.subscription_id},
130
133
  query_params: {'api-version' => @client.api_version},
131
- headers: request_headers.merge(custom_headers || {})
134
+ headers: request_headers.merge(custom_headers || {}),
135
+ base_url: request_url
132
136
  }
137
+ promise = @client.make_request_async(:delete, path_template, options)
133
138
 
134
- request_url = @base_url || @client.base_url
135
-
136
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
137
- promise = request.run_promise do |req|
138
- @client.credentials.sign_request(req) unless @client.credentials.nil?
139
- end
140
-
141
- promise = promise.then do |http_response|
139
+ promise = promise.then do |result|
140
+ http_response = result.response
142
141
  status_code = http_response.status
143
142
  response_content = http_response.body
144
143
  unless status_code == 200 || status_code == 202 || status_code == 204
145
144
  error_model = JSON.load(response_content)
146
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
145
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
147
146
  end
148
147
 
149
- # Create Result
150
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
151
148
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
152
149
 
153
150
  result
@@ -215,30 +212,27 @@ module Azure::ARM::Network
215
212
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
216
213
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
217
214
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'
215
+
216
+ request_url = @base_url || @client.base_url
217
+
218
218
  options = {
219
219
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
220
220
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'subscriptionId' => @client.subscription_id},
221
221
  query_params: {'api-version' => @client.api_version},
222
- headers: request_headers.merge(custom_headers || {})
222
+ headers: request_headers.merge(custom_headers || {}),
223
+ base_url: request_url
223
224
  }
225
+ promise = @client.make_request_async(:get, path_template, options)
224
226
 
225
- request_url = @base_url || @client.base_url
226
-
227
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
228
- promise = request.run_promise do |req|
229
- @client.credentials.sign_request(req) unless @client.credentials.nil?
230
- end
231
-
232
- promise = promise.then do |http_response|
227
+ promise = promise.then do |result|
228
+ http_response = result.response
233
229
  status_code = http_response.status
234
230
  response_content = http_response.body
235
231
  unless status_code == 200
236
232
  error_model = JSON.load(response_content)
237
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
233
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
238
234
  end
239
235
 
240
- # Create Result
241
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
242
236
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
243
237
  # Deserialize Response
244
238
  if status_code == 200
@@ -380,31 +374,28 @@ module Azure::ARM::Network
380
374
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
381
375
 
382
376
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'
377
+
378
+ request_url = @base_url || @client.base_url
379
+
383
380
  options = {
384
381
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
385
382
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'subscriptionId' => @client.subscription_id},
386
383
  query_params: {'api-version' => @client.api_version},
387
384
  body: request_content,
388
- headers: request_headers.merge(custom_headers || {})
385
+ headers: request_headers.merge(custom_headers || {}),
386
+ base_url: request_url
389
387
  }
388
+ promise = @client.make_request_async(:put, path_template, options)
390
389
 
391
- request_url = @base_url || @client.base_url
392
-
393
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
394
- promise = request.run_promise do |req|
395
- @client.credentials.sign_request(req) unless @client.credentials.nil?
396
- end
397
-
398
- promise = promise.then do |http_response|
390
+ promise = promise.then do |result|
391
+ http_response = result.response
399
392
  status_code = http_response.status
400
393
  response_content = http_response.body
401
394
  unless status_code == 200 || status_code == 201
402
395
  error_model = JSON.load(response_content)
403
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
396
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
404
397
  end
405
398
 
406
- # Create Result
407
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
408
399
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
409
400
  # Deserialize Response
410
401
  if status_code == 200
@@ -449,8 +440,8 @@ module Azure::ARM::Network
449
440
  response = list_async(resource_group_name, circuit_name, custom_headers).value!
450
441
  unless response.nil?
451
442
  page = response.body
452
- page.next_method = Proc.new do |next_link|
453
- list_next_async(next_link, custom_headers)
443
+ page.next_method = Proc.new do |next_page_link|
444
+ list_next_async(next_page_link, custom_headers)
454
445
  end
455
446
  page
456
447
  end
@@ -511,30 +502,27 @@ module Azure::ARM::Network
511
502
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
512
503
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
513
504
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings'
505
+
506
+ request_url = @base_url || @client.base_url
507
+
514
508
  options = {
515
509
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
516
510
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
517
511
  query_params: {'api-version' => @client.api_version},
518
- headers: request_headers.merge(custom_headers || {})
512
+ headers: request_headers.merge(custom_headers || {}),
513
+ base_url: request_url
519
514
  }
515
+ promise = @client.make_request_async(:get, path_template, options)
520
516
 
521
- request_url = @base_url || @client.base_url
522
-
523
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
524
- promise = request.run_promise do |req|
525
- @client.credentials.sign_request(req) unless @client.credentials.nil?
526
- end
527
-
528
- promise = promise.then do |http_response|
517
+ promise = promise.then do |result|
518
+ http_response = result.response
529
519
  status_code = http_response.status
530
520
  response_content = http_response.body
531
521
  unless status_code == 200
532
522
  error_model = JSON.load(response_content)
533
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
523
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
534
524
  end
535
525
 
536
- # Create Result
537
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
538
526
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
539
527
  # Deserialize Response
540
528
  if status_code == 200
@@ -605,29 +593,26 @@ module Azure::ARM::Network
605
593
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
606
594
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
607
595
  path_template = '{nextLink}'
596
+
597
+ request_url = @base_url || @client.base_url
598
+
608
599
  options = {
609
600
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
610
601
  skip_encoding_path_params: {'nextLink' => next_page_link},
611
- headers: request_headers.merge(custom_headers || {})
602
+ headers: request_headers.merge(custom_headers || {}),
603
+ base_url: request_url
612
604
  }
605
+ promise = @client.make_request_async(:get, path_template, options)
613
606
 
614
- request_url = @base_url || @client.base_url
615
-
616
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
617
- promise = request.run_promise do |req|
618
- @client.credentials.sign_request(req) unless @client.credentials.nil?
619
- end
620
-
621
- promise = promise.then do |http_response|
607
+ promise = promise.then do |result|
608
+ http_response = result.response
622
609
  status_code = http_response.status
623
610
  response_content = http_response.body
624
611
  unless status_code == 200
625
612
  error_model = JSON.load(response_content)
626
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
613
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
627
614
  end
628
615
 
629
- # Create Result
630
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
631
616
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
632
617
  # Deserialize Response
633
618
  if status_code == 200
@@ -118,30 +118,27 @@ module Azure::ARM::Network
118
118
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
119
119
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
120
120
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'
121
+
122
+ request_url = @base_url || @client.base_url
123
+
121
124
  options = {
122
125
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
123
126
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
124
127
  query_params: {'api-version' => @client.api_version},
125
- headers: request_headers.merge(custom_headers || {})
128
+ headers: request_headers.merge(custom_headers || {}),
129
+ base_url: request_url
126
130
  }
131
+ promise = @client.make_request_async(:delete, path_template, options)
127
132
 
128
- request_url = @base_url || @client.base_url
129
-
130
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
131
- promise = request.run_promise do |req|
132
- @client.credentials.sign_request(req) unless @client.credentials.nil?
133
- end
134
-
135
- promise = promise.then do |http_response|
133
+ promise = promise.then do |result|
134
+ http_response = result.response
136
135
  status_code = http_response.status
137
136
  response_content = http_response.body
138
137
  unless status_code == 204 || status_code == 202 || status_code == 200
139
138
  error_model = JSON.load(response_content)
140
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
139
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
141
140
  end
142
141
 
143
- # Create Result
144
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
145
142
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
146
143
 
147
144
  result
@@ -205,30 +202,27 @@ module Azure::ARM::Network
205
202
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
206
203
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
207
204
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'
205
+
206
+ request_url = @base_url || @client.base_url
207
+
208
208
  options = {
209
209
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
210
210
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
211
211
  query_params: {'api-version' => @client.api_version},
212
- headers: request_headers.merge(custom_headers || {})
212
+ headers: request_headers.merge(custom_headers || {}),
213
+ base_url: request_url
213
214
  }
215
+ promise = @client.make_request_async(:get, path_template, options)
214
216
 
215
- request_url = @base_url || @client.base_url
216
-
217
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
218
- promise = request.run_promise do |req|
219
- @client.credentials.sign_request(req) unless @client.credentials.nil?
220
- end
221
-
222
- promise = promise.then do |http_response|
217
+ promise = promise.then do |result|
218
+ http_response = result.response
223
219
  status_code = http_response.status
224
220
  response_content = http_response.body
225
221
  unless status_code == 200
226
222
  error_model = JSON.load(response_content)
227
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
223
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
228
224
  end
229
225
 
230
- # Create Result
231
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
232
226
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
233
227
  # Deserialize Response
234
228
  if status_code == 200
@@ -360,31 +354,28 @@ module Azure::ARM::Network
360
354
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
361
355
 
362
356
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'
357
+
358
+ request_url = @base_url || @client.base_url
359
+
363
360
  options = {
364
361
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
365
362
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
366
363
  query_params: {'api-version' => @client.api_version},
367
364
  body: request_content,
368
- headers: request_headers.merge(custom_headers || {})
365
+ headers: request_headers.merge(custom_headers || {}),
366
+ base_url: request_url
369
367
  }
368
+ promise = @client.make_request_async(:put, path_template, options)
370
369
 
371
- request_url = @base_url || @client.base_url
372
-
373
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
374
- promise = request.run_promise do |req|
375
- @client.credentials.sign_request(req) unless @client.credentials.nil?
376
- end
377
-
378
- promise = promise.then do |http_response|
370
+ promise = promise.then do |result|
371
+ http_response = result.response
379
372
  status_code = http_response.status
380
373
  response_content = http_response.body
381
374
  unless status_code == 201 || status_code == 200
382
375
  error_model = JSON.load(response_content)
383
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
376
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
384
377
  end
385
378
 
386
- # Create Result
387
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
388
379
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
389
380
  # Deserialize Response
390
381
  if status_code == 201
@@ -527,30 +518,27 @@ module Azure::ARM::Network
527
518
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
528
519
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
529
520
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'
521
+
522
+ request_url = @base_url || @client.base_url
523
+
530
524
  options = {
531
525
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
532
526
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'devicePath' => device_path,'subscriptionId' => @client.subscription_id},
533
527
  query_params: {'api-version' => @client.api_version},
534
- headers: request_headers.merge(custom_headers || {})
528
+ headers: request_headers.merge(custom_headers || {}),
529
+ base_url: request_url
535
530
  }
531
+ promise = @client.make_request_async(:post, path_template, options)
536
532
 
537
- request_url = @base_url || @client.base_url
538
-
539
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
540
- promise = request.run_promise do |req|
541
- @client.credentials.sign_request(req) unless @client.credentials.nil?
542
- end
543
-
544
- promise = promise.then do |http_response|
533
+ promise = promise.then do |result|
534
+ http_response = result.response
545
535
  status_code = http_response.status
546
536
  response_content = http_response.body
547
537
  unless status_code == 200 || status_code == 202
548
538
  error_model = JSON.load(response_content)
549
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
539
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
550
540
  end
551
541
 
552
- # Create Result
553
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
554
542
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
555
543
  # Deserialize Response
556
544
  if status_code == 200
@@ -683,30 +671,27 @@ module Azure::ARM::Network
683
671
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
684
672
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
685
673
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'
674
+
675
+ request_url = @base_url || @client.base_url
676
+
686
677
  options = {
687
678
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
688
679
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'devicePath' => device_path,'subscriptionId' => @client.subscription_id},
689
680
  query_params: {'api-version' => @client.api_version},
690
- headers: request_headers.merge(custom_headers || {})
681
+ headers: request_headers.merge(custom_headers || {}),
682
+ base_url: request_url
691
683
  }
684
+ promise = @client.make_request_async(:post, path_template, options)
692
685
 
693
- request_url = @base_url || @client.base_url
694
-
695
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
696
- promise = request.run_promise do |req|
697
- @client.credentials.sign_request(req) unless @client.credentials.nil?
698
- end
699
-
700
- promise = promise.then do |http_response|
686
+ promise = promise.then do |result|
687
+ http_response = result.response
701
688
  status_code = http_response.status
702
689
  response_content = http_response.body
703
690
  unless status_code == 200 || status_code == 202
704
691
  error_model = JSON.load(response_content)
705
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
692
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
706
693
  end
707
694
 
708
- # Create Result
709
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
710
695
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
711
696
  # Deserialize Response
712
697
  if status_code == 200
@@ -839,30 +824,27 @@ module Azure::ARM::Network
839
824
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
840
825
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
841
826
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'
827
+
828
+ request_url = @base_url || @client.base_url
829
+
842
830
  options = {
843
831
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
844
832
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'devicePath' => device_path,'subscriptionId' => @client.subscription_id},
845
833
  query_params: {'api-version' => @client.api_version},
846
- headers: request_headers.merge(custom_headers || {})
834
+ headers: request_headers.merge(custom_headers || {}),
835
+ base_url: request_url
847
836
  }
837
+ promise = @client.make_request_async(:post, path_template, options)
848
838
 
849
- request_url = @base_url || @client.base_url
850
-
851
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
852
- promise = request.run_promise do |req|
853
- @client.credentials.sign_request(req) unless @client.credentials.nil?
854
- end
855
-
856
- promise = promise.then do |http_response|
839
+ promise = promise.then do |result|
840
+ http_response = result.response
857
841
  status_code = http_response.status
858
842
  response_content = http_response.body
859
843
  unless status_code == 200 || status_code == 202
860
844
  error_model = JSON.load(response_content)
861
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
845
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
862
846
  end
863
847
 
864
- # Create Result
865
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
866
848
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
867
849
  # Deserialize Response
868
850
  if status_code == 200
@@ -936,30 +918,27 @@ module Azure::ARM::Network
936
918
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
937
919
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
938
920
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats'
921
+
922
+ request_url = @base_url || @client.base_url
923
+
939
924
  options = {
940
925
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
941
926
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
942
927
  query_params: {'api-version' => @client.api_version},
943
- headers: request_headers.merge(custom_headers || {})
928
+ headers: request_headers.merge(custom_headers || {}),
929
+ base_url: request_url
944
930
  }
931
+ promise = @client.make_request_async(:get, path_template, options)
945
932
 
946
- request_url = @base_url || @client.base_url
947
-
948
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
949
- promise = request.run_promise do |req|
950
- @client.credentials.sign_request(req) unless @client.credentials.nil?
951
- end
952
-
953
- promise = promise.then do |http_response|
933
+ promise = promise.then do |result|
934
+ http_response = result.response
954
935
  status_code = http_response.status
955
936
  response_content = http_response.body
956
937
  unless status_code == 200
957
938
  error_model = JSON.load(response_content)
958
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
939
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
959
940
  end
960
941
 
961
- # Create Result
962
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
963
942
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
964
943
  # Deserialize Response
965
944
  if status_code == 200
@@ -1037,30 +1016,27 @@ module Azure::ARM::Network
1037
1016
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1038
1017
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1039
1018
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats'
1019
+
1020
+ request_url = @base_url || @client.base_url
1021
+
1040
1022
  options = {
1041
1023
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1042
1024
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'peeringName' => peering_name,'subscriptionId' => @client.subscription_id},
1043
1025
  query_params: {'api-version' => @client.api_version},
1044
- headers: request_headers.merge(custom_headers || {})
1026
+ headers: request_headers.merge(custom_headers || {}),
1027
+ base_url: request_url
1045
1028
  }
1029
+ promise = @client.make_request_async(:get, path_template, options)
1046
1030
 
1047
- request_url = @base_url || @client.base_url
1048
-
1049
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1050
- promise = request.run_promise do |req|
1051
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1052
- end
1053
-
1054
- promise = promise.then do |http_response|
1031
+ promise = promise.then do |result|
1032
+ http_response = result.response
1055
1033
  status_code = http_response.status
1056
1034
  response_content = http_response.body
1057
1035
  unless status_code == 200
1058
1036
  error_model = JSON.load(response_content)
1059
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1037
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1060
1038
  end
1061
1039
 
1062
- # Create Result
1063
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1064
1040
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1065
1041
  # Deserialize Response
1066
1042
  if status_code == 200
@@ -1094,8 +1070,8 @@ module Azure::ARM::Network
1094
1070
  response = list_async(resource_group_name, custom_headers).value!
1095
1071
  unless response.nil?
1096
1072
  page = response.body
1097
- page.next_method = Proc.new do |next_link|
1098
- list_next_async(next_link, custom_headers)
1073
+ page.next_method = Proc.new do |next_page_link|
1074
+ list_next_async(next_page_link, custom_headers)
1099
1075
  end
1100
1076
  page
1101
1077
  end
@@ -1152,30 +1128,27 @@ module Azure::ARM::Network
1152
1128
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1153
1129
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1154
1130
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits'
1131
+
1132
+ request_url = @base_url || @client.base_url
1133
+
1155
1134
  options = {
1156
1135
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1157
1136
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1158
1137
  query_params: {'api-version' => @client.api_version},
1159
- headers: request_headers.merge(custom_headers || {})
1138
+ headers: request_headers.merge(custom_headers || {}),
1139
+ base_url: request_url
1160
1140
  }
1141
+ promise = @client.make_request_async(:get, path_template, options)
1161
1142
 
1162
- request_url = @base_url || @client.base_url
1163
-
1164
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1165
- promise = request.run_promise do |req|
1166
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1167
- end
1168
-
1169
- promise = promise.then do |http_response|
1143
+ promise = promise.then do |result|
1144
+ http_response = result.response
1170
1145
  status_code = http_response.status
1171
1146
  response_content = http_response.body
1172
1147
  unless status_code == 200
1173
1148
  error_model = JSON.load(response_content)
1174
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1149
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1175
1150
  end
1176
1151
 
1177
- # Create Result
1178
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1179
1152
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1180
1153
  # Deserialize Response
1181
1154
  if status_code == 200
@@ -1208,8 +1181,8 @@ module Azure::ARM::Network
1208
1181
  response = list_all_async(custom_headers).value!
1209
1182
  unless response.nil?
1210
1183
  page = response.body
1211
- page.next_method = Proc.new do |next_link|
1212
- list_all_next_async(next_link, custom_headers)
1184
+ page.next_method = Proc.new do |next_page_link|
1185
+ list_all_next_async(next_page_link, custom_headers)
1213
1186
  end
1214
1187
  page
1215
1188
  end
@@ -1262,30 +1235,27 @@ module Azure::ARM::Network
1262
1235
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1263
1236
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1264
1237
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits'
1238
+
1239
+ request_url = @base_url || @client.base_url
1240
+
1265
1241
  options = {
1266
1242
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1267
1243
  path_params: {'subscriptionId' => @client.subscription_id},
1268
1244
  query_params: {'api-version' => @client.api_version},
1269
- headers: request_headers.merge(custom_headers || {})
1245
+ headers: request_headers.merge(custom_headers || {}),
1246
+ base_url: request_url
1270
1247
  }
1248
+ promise = @client.make_request_async(:get, path_template, options)
1271
1249
 
1272
- request_url = @base_url || @client.base_url
1273
-
1274
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1275
- promise = request.run_promise do |req|
1276
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1277
- end
1278
-
1279
- promise = promise.then do |http_response|
1250
+ promise = promise.then do |result|
1251
+ http_response = result.response
1280
1252
  status_code = http_response.status
1281
1253
  response_content = http_response.body
1282
1254
  unless status_code == 200
1283
1255
  error_model = JSON.load(response_content)
1284
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1256
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1285
1257
  end
1286
1258
 
1287
- # Create Result
1288
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1289
1259
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1290
1260
  # Deserialize Response
1291
1261
  if status_code == 200
@@ -1356,29 +1326,26 @@ module Azure::ARM::Network
1356
1326
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1357
1327
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1358
1328
  path_template = '{nextLink}'
1329
+
1330
+ request_url = @base_url || @client.base_url
1331
+
1359
1332
  options = {
1360
1333
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1361
1334
  skip_encoding_path_params: {'nextLink' => next_page_link},
1362
- headers: request_headers.merge(custom_headers || {})
1335
+ headers: request_headers.merge(custom_headers || {}),
1336
+ base_url: request_url
1363
1337
  }
1338
+ promise = @client.make_request_async(:get, path_template, options)
1364
1339
 
1365
- request_url = @base_url || @client.base_url
1366
-
1367
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1368
- promise = request.run_promise do |req|
1369
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1370
- end
1371
-
1372
- promise = promise.then do |http_response|
1340
+ promise = promise.then do |result|
1341
+ http_response = result.response
1373
1342
  status_code = http_response.status
1374
1343
  response_content = http_response.body
1375
1344
  unless status_code == 200
1376
1345
  error_model = JSON.load(response_content)
1377
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1346
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1378
1347
  end
1379
1348
 
1380
- # Create Result
1381
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1382
1349
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1383
1350
  # Deserialize Response
1384
1351
  if status_code == 200
@@ -1449,29 +1416,26 @@ module Azure::ARM::Network
1449
1416
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1450
1417
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1451
1418
  path_template = '{nextLink}'
1419
+
1420
+ request_url = @base_url || @client.base_url
1421
+
1452
1422
  options = {
1453
1423
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1454
1424
  skip_encoding_path_params: {'nextLink' => next_page_link},
1455
- headers: request_headers.merge(custom_headers || {})
1425
+ headers: request_headers.merge(custom_headers || {}),
1426
+ base_url: request_url
1456
1427
  }
1428
+ promise = @client.make_request_async(:get, path_template, options)
1457
1429
 
1458
- request_url = @base_url || @client.base_url
1459
-
1460
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1461
- promise = request.run_promise do |req|
1462
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1463
- end
1464
-
1465
- promise = promise.then do |http_response|
1430
+ promise = promise.then do |result|
1431
+ http_response = result.response
1466
1432
  status_code = http_response.status
1467
1433
  response_content = http_response.body
1468
1434
  unless status_code == 200
1469
1435
  error_model = JSON.load(response_content)
1470
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1436
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1471
1437
  end
1472
1438
 
1473
- # Create Result
1474
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1475
1439
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1476
1440
  # Deserialize Response
1477
1441
  if status_code == 200