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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df2c44670ab9a4fb72a28d7b764a86062643d723
4
- data.tar.gz: 7f0b63192efa48aa149a3f86d9eaf66cc5c37595
3
+ metadata.gz: bf9ed819b59c21987c953f27cbd0dfaec8127e00
4
+ data.tar.gz: 9b2532a9fdaa9606eb138bcdfc0f3c35a7879c08
5
5
  SHA512:
6
- metadata.gz: e1f1c13cc7ce6af74eba7a45c57ca6bd828e8b237761c9e41443b1ab8026a2da0895faa098c5526f3bc1d9dcb331bcb66664e6f719c6b668356af0e5b46f5894
7
- data.tar.gz: 0dd14484b6d69c6705f19e9496e5e0d2e33ac17ffd9b8b8d1881a7d751e7483ab6cca81349eade144dac264d9172296fff7ccc50d3ac4b6ff2c19ddff898fff9
6
+ metadata.gz: 254e9eb153834c7dd3ee5cb3b96b4de16e402c98a627a76cebbbb7b1b437107d843ebca85f3fa51e9caf544d2c32e84a74683cc74a8440a5cd8763d759801d78
7
+ data.tar.gz: 1850fb869a8c3a0a686f98fcb62219baabdbb0d6ca57fa6cff300ae54000dcd227275489d84fcdd2a5424786a3ead522d18054cfab185813d72e394af8298db5
@@ -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/applicationGateways/{applicationGatewayName}'
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,'applicationGatewayName' => application_gateway_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 == 202 || status_code == 204 || 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/applicationGateways/{applicationGatewayName}'
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,'applicationGatewayName' => application_gateway_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/applicationGateways/{applicationGatewayName}'
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,'applicationGatewayName' => application_gateway_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
@@ -428,8 +419,8 @@ module Azure::ARM::Network
428
419
  response = list_async(resource_group_name, custom_headers).value!
429
420
  unless response.nil?
430
421
  page = response.body
431
- page.next_method = Proc.new do |next_link|
432
- list_next_async(next_link, custom_headers)
422
+ page.next_method = Proc.new do |next_page_link|
423
+ list_next_async(next_page_link, custom_headers)
433
424
  end
434
425
  page
435
426
  end
@@ -486,30 +477,27 @@ module Azure::ARM::Network
486
477
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
487
478
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
488
479
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways'
480
+
481
+ request_url = @base_url || @client.base_url
482
+
489
483
  options = {
490
484
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
491
485
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
492
486
  query_params: {'api-version' => @client.api_version},
493
- headers: request_headers.merge(custom_headers || {})
487
+ headers: request_headers.merge(custom_headers || {}),
488
+ base_url: request_url
494
489
  }
490
+ promise = @client.make_request_async(:get, path_template, options)
495
491
 
496
- request_url = @base_url || @client.base_url
497
-
498
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
499
- promise = request.run_promise do |req|
500
- @client.credentials.sign_request(req) unless @client.credentials.nil?
501
- end
502
-
503
- promise = promise.then do |http_response|
492
+ promise = promise.then do |result|
493
+ http_response = result.response
504
494
  status_code = http_response.status
505
495
  response_content = http_response.body
506
496
  unless status_code == 200
507
497
  error_model = JSON.load(response_content)
508
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
498
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
509
499
  end
510
500
 
511
- # Create Result
512
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
513
501
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
514
502
  # Deserialize Response
515
503
  if status_code == 200
@@ -542,8 +530,8 @@ module Azure::ARM::Network
542
530
  response = list_all_async(custom_headers).value!
543
531
  unless response.nil?
544
532
  page = response.body
545
- page.next_method = Proc.new do |next_link|
546
- list_all_next_async(next_link, custom_headers)
533
+ page.next_method = Proc.new do |next_page_link|
534
+ list_all_next_async(next_page_link, custom_headers)
547
535
  end
548
536
  page
549
537
  end
@@ -596,30 +584,27 @@ module Azure::ARM::Network
596
584
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
597
585
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
598
586
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways'
587
+
588
+ request_url = @base_url || @client.base_url
589
+
599
590
  options = {
600
591
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
601
592
  path_params: {'subscriptionId' => @client.subscription_id},
602
593
  query_params: {'api-version' => @client.api_version},
603
- headers: request_headers.merge(custom_headers || {})
594
+ headers: request_headers.merge(custom_headers || {}),
595
+ base_url: request_url
604
596
  }
597
+ promise = @client.make_request_async(:get, path_template, options)
605
598
 
606
- request_url = @base_url || @client.base_url
607
-
608
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
609
- promise = request.run_promise do |req|
610
- @client.credentials.sign_request(req) unless @client.credentials.nil?
611
- end
612
-
613
- promise = promise.then do |http_response|
599
+ promise = promise.then do |result|
600
+ http_response = result.response
614
601
  status_code = http_response.status
615
602
  response_content = http_response.body
616
603
  unless status_code == 200
617
604
  error_model = JSON.load(response_content)
618
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
605
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
619
606
  end
620
607
 
621
- # Create Result
622
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
623
608
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
624
609
  # Deserialize Response
625
610
  if status_code == 200
@@ -731,30 +716,27 @@ module Azure::ARM::Network
731
716
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
732
717
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
733
718
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'
719
+
720
+ request_url = @base_url || @client.base_url
721
+
734
722
  options = {
735
723
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
736
724
  path_params: {'resourceGroupName' => resource_group_name,'applicationGatewayName' => application_gateway_name,'subscriptionId' => @client.subscription_id},
737
725
  query_params: {'api-version' => @client.api_version},
738
- headers: request_headers.merge(custom_headers || {})
726
+ headers: request_headers.merge(custom_headers || {}),
727
+ base_url: request_url
739
728
  }
729
+ promise = @client.make_request_async(:post, path_template, options)
740
730
 
741
- request_url = @base_url || @client.base_url
742
-
743
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
744
- promise = request.run_promise do |req|
745
- @client.credentials.sign_request(req) unless @client.credentials.nil?
746
- end
747
-
748
- promise = promise.then do |http_response|
731
+ promise = promise.then do |result|
732
+ http_response = result.response
749
733
  status_code = http_response.status
750
734
  response_content = http_response.body
751
735
  unless status_code == 200 || status_code == 202
752
736
  error_model = JSON.load(response_content)
753
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
737
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
754
738
  end
755
739
 
756
- # Create Result
757
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
758
740
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
759
741
 
760
742
  result
@@ -856,30 +838,27 @@ module Azure::ARM::Network
856
838
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
857
839
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
858
840
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'
841
+
842
+ request_url = @base_url || @client.base_url
843
+
859
844
  options = {
860
845
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
861
846
  path_params: {'resourceGroupName' => resource_group_name,'applicationGatewayName' => application_gateway_name,'subscriptionId' => @client.subscription_id},
862
847
  query_params: {'api-version' => @client.api_version},
863
- headers: request_headers.merge(custom_headers || {})
848
+ headers: request_headers.merge(custom_headers || {}),
849
+ base_url: request_url
864
850
  }
851
+ promise = @client.make_request_async(:post, path_template, options)
865
852
 
866
- request_url = @base_url || @client.base_url
867
-
868
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
869
- promise = request.run_promise do |req|
870
- @client.credentials.sign_request(req) unless @client.credentials.nil?
871
- end
872
-
873
- promise = promise.then do |http_response|
853
+ promise = promise.then do |result|
854
+ http_response = result.response
874
855
  status_code = http_response.status
875
856
  response_content = http_response.body
876
857
  unless status_code == 200 || status_code == 202
877
858
  error_model = JSON.load(response_content)
878
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
859
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
879
860
  end
880
861
 
881
- # Create Result
882
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
883
862
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
884
863
 
885
864
  result
@@ -940,29 +919,26 @@ module Azure::ARM::Network
940
919
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
941
920
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
942
921
  path_template = '{nextLink}'
922
+
923
+ request_url = @base_url || @client.base_url
924
+
943
925
  options = {
944
926
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
945
927
  skip_encoding_path_params: {'nextLink' => next_page_link},
946
- headers: request_headers.merge(custom_headers || {})
928
+ headers: request_headers.merge(custom_headers || {}),
929
+ base_url: request_url
947
930
  }
931
+ promise = @client.make_request_async(:get, path_template, options)
948
932
 
949
- request_url = @base_url || @client.base_url
950
-
951
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
952
- promise = request.run_promise do |req|
953
- @client.credentials.sign_request(req) unless @client.credentials.nil?
954
- end
955
-
956
- promise = promise.then do |http_response|
933
+ promise = promise.then do |result|
934
+ http_response = result.response
957
935
  status_code = http_response.status
958
936
  response_content = http_response.body
959
937
  unless status_code == 200
960
938
  error_model = JSON.load(response_content)
961
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
939
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
962
940
  end
963
941
 
964
- # Create Result
965
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
966
942
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
967
943
  # Deserialize Response
968
944
  if status_code == 200
@@ -1033,29 +1009,26 @@ module Azure::ARM::Network
1033
1009
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1034
1010
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1035
1011
  path_template = '{nextLink}'
1012
+
1013
+ request_url = @base_url || @client.base_url
1014
+
1036
1015
  options = {
1037
1016
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1038
1017
  skip_encoding_path_params: {'nextLink' => next_page_link},
1039
- headers: request_headers.merge(custom_headers || {})
1018
+ headers: request_headers.merge(custom_headers || {}),
1019
+ base_url: request_url
1040
1020
  }
1021
+ promise = @client.make_request_async(:get, path_template, options)
1041
1022
 
1042
- request_url = @base_url || @client.base_url
1043
-
1044
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1045
- promise = request.run_promise do |req|
1046
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1047
- end
1048
-
1049
- promise = promise.then do |http_response|
1023
+ promise = promise.then do |result|
1024
+ http_response = result.response
1050
1025
  status_code = http_response.status
1051
1026
  response_content = http_response.body
1052
1027
  unless status_code == 200
1053
1028
  error_model = JSON.load(response_content)
1054
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1029
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1055
1030
  end
1056
1031
 
1057
- # Create Result
1058
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1059
1032
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1060
1033
  # Deserialize Response
1061
1034
  if status_code == 200
@@ -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}/authorizations/{authorizationName}'
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,'authorizationName' => authorization_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 == 202 || status_code == 200 || 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}/authorizations/{authorizationName}'
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,'authorizationName' => authorization_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
@@ -385,31 +379,28 @@ module Azure::ARM::Network
385
379
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
386
380
 
387
381
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'
382
+
383
+ request_url = @base_url || @client.base_url
384
+
388
385
  options = {
389
386
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
390
387
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'authorizationName' => authorization_name,'subscriptionId' => @client.subscription_id},
391
388
  query_params: {'api-version' => @client.api_version},
392
389
  body: request_content,
393
- headers: request_headers.merge(custom_headers || {})
390
+ headers: request_headers.merge(custom_headers || {}),
391
+ base_url: request_url
394
392
  }
393
+ promise = @client.make_request_async(:put, path_template, options)
395
394
 
396
- request_url = @base_url || @client.base_url
397
-
398
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
399
- promise = request.run_promise do |req|
400
- @client.credentials.sign_request(req) unless @client.credentials.nil?
401
- end
402
-
403
- promise = promise.then do |http_response|
395
+ promise = promise.then do |result|
396
+ http_response = result.response
404
397
  status_code = http_response.status
405
398
  response_content = http_response.body
406
399
  unless status_code == 201 || status_code == 200
407
400
  error_model = JSON.load(response_content)
408
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
401
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
409
402
  end
410
403
 
411
- # Create Result
412
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
413
404
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
414
405
  # Deserialize Response
415
406
  if status_code == 201
@@ -454,8 +445,8 @@ module Azure::ARM::Network
454
445
  response = list_async(resource_group_name, circuit_name, custom_headers).value!
455
446
  unless response.nil?
456
447
  page = response.body
457
- page.next_method = Proc.new do |next_link|
458
- list_next_async(next_link, custom_headers)
448
+ page.next_method = Proc.new do |next_page_link|
449
+ list_next_async(next_page_link, custom_headers)
459
450
  end
460
451
  page
461
452
  end
@@ -516,30 +507,27 @@ module Azure::ARM::Network
516
507
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
517
508
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
518
509
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations'
510
+
511
+ request_url = @base_url || @client.base_url
512
+
519
513
  options = {
520
514
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
521
515
  path_params: {'resourceGroupName' => resource_group_name,'circuitName' => circuit_name,'subscriptionId' => @client.subscription_id},
522
516
  query_params: {'api-version' => @client.api_version},
523
- headers: request_headers.merge(custom_headers || {})
517
+ headers: request_headers.merge(custom_headers || {}),
518
+ base_url: request_url
524
519
  }
520
+ promise = @client.make_request_async(:get, path_template, options)
525
521
 
526
- request_url = @base_url || @client.base_url
527
-
528
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
529
- promise = request.run_promise do |req|
530
- @client.credentials.sign_request(req) unless @client.credentials.nil?
531
- end
532
-
533
- promise = promise.then do |http_response|
522
+ promise = promise.then do |result|
523
+ http_response = result.response
534
524
  status_code = http_response.status
535
525
  response_content = http_response.body
536
526
  unless status_code == 200
537
527
  error_model = JSON.load(response_content)
538
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
528
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
539
529
  end
540
530
 
541
- # Create Result
542
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
543
531
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
544
532
  # Deserialize Response
545
533
  if status_code == 200
@@ -610,29 +598,26 @@ module Azure::ARM::Network
610
598
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
611
599
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
612
600
  path_template = '{nextLink}'
601
+
602
+ request_url = @base_url || @client.base_url
603
+
613
604
  options = {
614
605
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
615
606
  skip_encoding_path_params: {'nextLink' => next_page_link},
616
- headers: request_headers.merge(custom_headers || {})
607
+ headers: request_headers.merge(custom_headers || {}),
608
+ base_url: request_url
617
609
  }
610
+ promise = @client.make_request_async(:get, path_template, options)
618
611
 
619
- request_url = @base_url || @client.base_url
620
-
621
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
622
- promise = request.run_promise do |req|
623
- @client.credentials.sign_request(req) unless @client.credentials.nil?
624
- end
625
-
626
- promise = promise.then do |http_response|
612
+ promise = promise.then do |result|
613
+ http_response = result.response
627
614
  status_code = http_response.status
628
615
  response_content = http_response.body
629
616
  unless status_code == 200
630
617
  error_model = JSON.load(response_content)
631
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
618
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
632
619
  end
633
620
 
634
- # Create Result
635
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
636
621
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
637
622
  # Deserialize Response
638
623
  if status_code == 200