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
@@ -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/networkInterfaces/{networkInterfaceName}'
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,'networkInterfaceName' => network_interface_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 == 204 || status_code == 202 || 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/networkInterfaces/{networkInterfaceName}'
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,'networkInterfaceName' => network_interface_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
@@ -359,31 +353,28 @@ module Azure::ARM::Network
359
353
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
360
354
 
361
355
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
356
+
357
+ request_url = @base_url || @client.base_url
358
+
362
359
  options = {
363
360
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
364
361
  path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
365
362
  query_params: {'api-version' => @client.api_version},
366
363
  body: request_content,
367
- headers: request_headers.merge(custom_headers || {})
364
+ headers: request_headers.merge(custom_headers || {}),
365
+ base_url: request_url
368
366
  }
367
+ promise = @client.make_request_async(:put, path_template, options)
369
368
 
370
- request_url = @base_url || @client.base_url
371
-
372
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
373
- promise = request.run_promise do |req|
374
- @client.credentials.sign_request(req) unless @client.credentials.nil?
375
- end
376
-
377
- promise = promise.then do |http_response|
369
+ promise = promise.then do |result|
370
+ http_response = result.response
378
371
  status_code = http_response.status
379
372
  response_content = http_response.body
380
373
  unless status_code == 201 || status_code == 200
381
374
  error_model = JSON.load(response_content)
382
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
375
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
383
376
  end
384
377
 
385
- # Create Result
386
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
387
378
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
388
379
  # Deserialize Response
389
380
  if status_code == 201
@@ -430,8 +421,8 @@ module Azure::ARM::Network
430
421
  response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
431
422
  unless response.nil?
432
423
  page = response.body
433
- page.next_method = Proc.new do |next_link|
434
- list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_link, custom_headers)
424
+ page.next_method = Proc.new do |next_page_link|
425
+ list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers)
435
426
  end
436
427
  page
437
428
  end
@@ -499,30 +490,27 @@ module Azure::ARM::Network
499
490
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
500
491
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
501
492
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'
493
+
494
+ request_url = @base_url || @client.base_url
495
+
502
496
  options = {
503
497
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
504
498
  path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'subscriptionId' => @client.subscription_id},
505
499
  query_params: {'api-version' => @client.api_version},
506
- headers: request_headers.merge(custom_headers || {})
500
+ headers: request_headers.merge(custom_headers || {}),
501
+ base_url: request_url
507
502
  }
503
+ promise = @client.make_request_async(:get, path_template, options)
508
504
 
509
- request_url = @base_url || @client.base_url
510
-
511
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
512
- promise = request.run_promise do |req|
513
- @client.credentials.sign_request(req) unless @client.credentials.nil?
514
- end
515
-
516
- promise = promise.then do |http_response|
505
+ promise = promise.then do |result|
506
+ http_response = result.response
517
507
  status_code = http_response.status
518
508
  response_content = http_response.body
519
509
  unless status_code == 200
520
510
  error_model = JSON.load(response_content)
521
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
511
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
522
512
  end
523
513
 
524
- # Create Result
525
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
526
514
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
527
515
  # Deserialize Response
528
516
  if status_code == 200
@@ -558,8 +546,8 @@ module Azure::ARM::Network
558
546
  response = list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
559
547
  unless response.nil?
560
548
  page = response.body
561
- page.next_method = Proc.new do |next_link|
562
- list_virtual_machine_scale_set_network_interfaces_next_async(next_link, custom_headers)
549
+ page.next_method = Proc.new do |next_page_link|
550
+ list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers)
563
551
  end
564
552
  page
565
553
  end
@@ -623,30 +611,27 @@ module Azure::ARM::Network
623
611
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
624
612
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
625
613
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'
614
+
615
+ request_url = @base_url || @client.base_url
616
+
626
617
  options = {
627
618
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
628
619
  path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id},
629
620
  query_params: {'api-version' => @client.api_version},
630
- headers: request_headers.merge(custom_headers || {})
621
+ headers: request_headers.merge(custom_headers || {}),
622
+ base_url: request_url
631
623
  }
624
+ promise = @client.make_request_async(:get, path_template, options)
632
625
 
633
- request_url = @base_url || @client.base_url
634
-
635
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
636
- promise = request.run_promise do |req|
637
- @client.credentials.sign_request(req) unless @client.credentials.nil?
638
- end
639
-
640
- promise = promise.then do |http_response|
626
+ promise = promise.then do |result|
627
+ http_response = result.response
641
628
  status_code = http_response.status
642
629
  response_content = http_response.body
643
630
  unless status_code == 200
644
631
  error_model = JSON.load(response_content)
645
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
632
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
646
633
  end
647
634
 
648
- # Create Result
649
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
650
635
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
651
636
  # Deserialize Response
652
637
  if status_code == 200
@@ -734,30 +719,27 @@ module Azure::ARM::Network
734
719
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
735
720
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
736
721
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'
722
+
723
+ request_url = @base_url || @client.base_url
724
+
737
725
  options = {
738
726
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
739
727
  path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
740
728
  query_params: {'api-version' => @client.api_version,'$expand' => expand},
741
- headers: request_headers.merge(custom_headers || {})
729
+ headers: request_headers.merge(custom_headers || {}),
730
+ base_url: request_url
742
731
  }
732
+ promise = @client.make_request_async(:get, path_template, options)
743
733
 
744
- request_url = @base_url || @client.base_url
745
-
746
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
747
- promise = request.run_promise do |req|
748
- @client.credentials.sign_request(req) unless @client.credentials.nil?
749
- end
750
-
751
- promise = promise.then do |http_response|
734
+ promise = promise.then do |result|
735
+ http_response = result.response
752
736
  status_code = http_response.status
753
737
  response_content = http_response.body
754
738
  unless status_code == 200
755
739
  error_model = JSON.load(response_content)
756
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
740
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
757
741
  end
758
742
 
759
- # Create Result
760
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
761
743
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
762
744
  # Deserialize Response
763
745
  if status_code == 200
@@ -790,8 +772,8 @@ module Azure::ARM::Network
790
772
  response = list_all_async(custom_headers).value!
791
773
  unless response.nil?
792
774
  page = response.body
793
- page.next_method = Proc.new do |next_link|
794
- list_all_next_async(next_link, custom_headers)
775
+ page.next_method = Proc.new do |next_page_link|
776
+ list_all_next_async(next_page_link, custom_headers)
795
777
  end
796
778
  page
797
779
  end
@@ -844,30 +826,27 @@ module Azure::ARM::Network
844
826
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
845
827
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
846
828
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'
829
+
830
+ request_url = @base_url || @client.base_url
831
+
847
832
  options = {
848
833
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
849
834
  path_params: {'subscriptionId' => @client.subscription_id},
850
835
  query_params: {'api-version' => @client.api_version},
851
- headers: request_headers.merge(custom_headers || {})
836
+ headers: request_headers.merge(custom_headers || {}),
837
+ base_url: request_url
852
838
  }
839
+ promise = @client.make_request_async(:get, path_template, options)
853
840
 
854
- request_url = @base_url || @client.base_url
855
-
856
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
857
- promise = request.run_promise do |req|
858
- @client.credentials.sign_request(req) unless @client.credentials.nil?
859
- end
860
-
861
- promise = promise.then do |http_response|
841
+ promise = promise.then do |result|
842
+ http_response = result.response
862
843
  status_code = http_response.status
863
844
  response_content = http_response.body
864
845
  unless status_code == 200
865
846
  error_model = JSON.load(response_content)
866
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
847
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
867
848
  end
868
849
 
869
- # Create Result
870
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
871
850
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
872
851
  # Deserialize Response
873
852
  if status_code == 200
@@ -901,8 +880,8 @@ module Azure::ARM::Network
901
880
  response = list_async(resource_group_name, custom_headers).value!
902
881
  unless response.nil?
903
882
  page = response.body
904
- page.next_method = Proc.new do |next_link|
905
- list_next_async(next_link, custom_headers)
883
+ page.next_method = Proc.new do |next_page_link|
884
+ list_next_async(next_page_link, custom_headers)
906
885
  end
907
886
  page
908
887
  end
@@ -959,30 +938,27 @@ module Azure::ARM::Network
959
938
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
960
939
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
961
940
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'
941
+
942
+ request_url = @base_url || @client.base_url
943
+
962
944
  options = {
963
945
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
964
946
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
965
947
  query_params: {'api-version' => @client.api_version},
966
- headers: request_headers.merge(custom_headers || {})
948
+ headers: request_headers.merge(custom_headers || {}),
949
+ base_url: request_url
967
950
  }
951
+ promise = @client.make_request_async(:get, path_template, options)
968
952
 
969
- request_url = @base_url || @client.base_url
970
-
971
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
972
- promise = request.run_promise do |req|
973
- @client.credentials.sign_request(req) unless @client.credentials.nil?
974
- end
975
-
976
- promise = promise.then do |http_response|
953
+ promise = promise.then do |result|
954
+ http_response = result.response
977
955
  status_code = http_response.status
978
956
  response_content = http_response.body
979
957
  unless status_code == 200
980
958
  error_model = JSON.load(response_content)
981
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
959
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
982
960
  end
983
961
 
984
- # Create Result
985
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
986
962
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
987
963
  # Deserialize Response
988
964
  if status_code == 200
@@ -1099,30 +1075,27 @@ module Azure::ARM::Network
1099
1075
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1100
1076
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1101
1077
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'
1078
+
1079
+ request_url = @base_url || @client.base_url
1080
+
1102
1081
  options = {
1103
1082
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1104
1083
  path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
1105
1084
  query_params: {'api-version' => @client.api_version},
1106
- headers: request_headers.merge(custom_headers || {})
1085
+ headers: request_headers.merge(custom_headers || {}),
1086
+ base_url: request_url
1107
1087
  }
1088
+ promise = @client.make_request_async(:post, path_template, options)
1108
1089
 
1109
- request_url = @base_url || @client.base_url
1110
-
1111
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1112
- promise = request.run_promise do |req|
1113
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1114
- end
1115
-
1116
- promise = promise.then do |http_response|
1090
+ promise = promise.then do |result|
1091
+ http_response = result.response
1117
1092
  status_code = http_response.status
1118
1093
  response_content = http_response.body
1119
1094
  unless status_code == 200 || status_code == 202
1120
1095
  error_model = JSON.load(response_content)
1121
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1096
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1122
1097
  end
1123
1098
 
1124
- # Create Result
1125
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1126
1099
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1127
1100
  # Deserialize Response
1128
1101
  if status_code == 200
@@ -1239,30 +1212,27 @@ module Azure::ARM::Network
1239
1212
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1240
1213
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1241
1214
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'
1215
+
1216
+ request_url = @base_url || @client.base_url
1217
+
1242
1218
  options = {
1243
1219
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1244
1220
  path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
1245
1221
  query_params: {'api-version' => @client.api_version},
1246
- headers: request_headers.merge(custom_headers || {})
1222
+ headers: request_headers.merge(custom_headers || {}),
1223
+ base_url: request_url
1247
1224
  }
1225
+ promise = @client.make_request_async(:post, path_template, options)
1248
1226
 
1249
- request_url = @base_url || @client.base_url
1250
-
1251
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1252
- promise = request.run_promise do |req|
1253
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1254
- end
1255
-
1256
- promise = promise.then do |http_response|
1227
+ promise = promise.then do |result|
1228
+ http_response = result.response
1257
1229
  status_code = http_response.status
1258
1230
  response_content = http_response.body
1259
1231
  unless status_code == 200 || status_code == 202
1260
1232
  error_model = JSON.load(response_content)
1261
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1233
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1262
1234
  end
1263
1235
 
1264
- # Create Result
1265
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1266
1236
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1267
1237
  # Deserialize Response
1268
1238
  if status_code == 200
@@ -1333,29 +1303,26 @@ module Azure::ARM::Network
1333
1303
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1334
1304
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1335
1305
  path_template = '{nextLink}'
1306
+
1307
+ request_url = @base_url || @client.base_url
1308
+
1336
1309
  options = {
1337
1310
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1338
1311
  skip_encoding_path_params: {'nextLink' => next_page_link},
1339
- headers: request_headers.merge(custom_headers || {})
1312
+ headers: request_headers.merge(custom_headers || {}),
1313
+ base_url: request_url
1340
1314
  }
1315
+ promise = @client.make_request_async(:get, path_template, options)
1341
1316
 
1342
- request_url = @base_url || @client.base_url
1343
-
1344
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1345
- promise = request.run_promise do |req|
1346
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1347
- end
1348
-
1349
- promise = promise.then do |http_response|
1317
+ promise = promise.then do |result|
1318
+ http_response = result.response
1350
1319
  status_code = http_response.status
1351
1320
  response_content = http_response.body
1352
1321
  unless status_code == 200
1353
1322
  error_model = JSON.load(response_content)
1354
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1323
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1355
1324
  end
1356
1325
 
1357
- # Create Result
1358
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1359
1326
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1360
1327
  # Deserialize Response
1361
1328
  if status_code == 200
@@ -1426,29 +1393,26 @@ module Azure::ARM::Network
1426
1393
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1427
1394
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1428
1395
  path_template = '{nextLink}'
1396
+
1397
+ request_url = @base_url || @client.base_url
1398
+
1429
1399
  options = {
1430
1400
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1431
1401
  skip_encoding_path_params: {'nextLink' => next_page_link},
1432
- headers: request_headers.merge(custom_headers || {})
1402
+ headers: request_headers.merge(custom_headers || {}),
1403
+ base_url: request_url
1433
1404
  }
1405
+ promise = @client.make_request_async(:get, path_template, options)
1434
1406
 
1435
- request_url = @base_url || @client.base_url
1436
-
1437
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1438
- promise = request.run_promise do |req|
1439
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1440
- end
1441
-
1442
- promise = promise.then do |http_response|
1407
+ promise = promise.then do |result|
1408
+ http_response = result.response
1443
1409
  status_code = http_response.status
1444
1410
  response_content = http_response.body
1445
1411
  unless status_code == 200
1446
1412
  error_model = JSON.load(response_content)
1447
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1413
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1448
1414
  end
1449
1415
 
1450
- # Create Result
1451
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1452
1416
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1453
1417
  # Deserialize Response
1454
1418
  if status_code == 200
@@ -1519,29 +1483,26 @@ module Azure::ARM::Network
1519
1483
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1520
1484
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1521
1485
  path_template = '{nextLink}'
1486
+
1487
+ request_url = @base_url || @client.base_url
1488
+
1522
1489
  options = {
1523
1490
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1524
1491
  skip_encoding_path_params: {'nextLink' => next_page_link},
1525
- headers: request_headers.merge(custom_headers || {})
1492
+ headers: request_headers.merge(custom_headers || {}),
1493
+ base_url: request_url
1526
1494
  }
1495
+ promise = @client.make_request_async(:get, path_template, options)
1527
1496
 
1528
- request_url = @base_url || @client.base_url
1529
-
1530
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1531
- promise = request.run_promise do |req|
1532
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1533
- end
1534
-
1535
- promise = promise.then do |http_response|
1497
+ promise = promise.then do |result|
1498
+ http_response = result.response
1536
1499
  status_code = http_response.status
1537
1500
  response_content = http_response.body
1538
1501
  unless status_code == 200
1539
1502
  error_model = JSON.load(response_content)
1540
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1503
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1541
1504
  end
1542
1505
 
1543
- # Create Result
1544
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1545
1506
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1546
1507
  # Deserialize Response
1547
1508
  if status_code == 200
@@ -1612,29 +1573,26 @@ module Azure::ARM::Network
1612
1573
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1613
1574
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1614
1575
  path_template = '{nextLink}'
1576
+
1577
+ request_url = @base_url || @client.base_url
1578
+
1615
1579
  options = {
1616
1580
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1617
1581
  skip_encoding_path_params: {'nextLink' => next_page_link},
1618
- headers: request_headers.merge(custom_headers || {})
1582
+ headers: request_headers.merge(custom_headers || {}),
1583
+ base_url: request_url
1619
1584
  }
1585
+ promise = @client.make_request_async(:get, path_template, options)
1620
1586
 
1621
- request_url = @base_url || @client.base_url
1622
-
1623
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1624
- promise = request.run_promise do |req|
1625
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1626
- end
1627
-
1628
- promise = promise.then do |http_response|
1587
+ promise = promise.then do |result|
1588
+ http_response = result.response
1629
1589
  status_code = http_response.status
1630
1590
  response_content = http_response.body
1631
1591
  unless status_code == 200
1632
1592
  error_model = JSON.load(response_content)
1633
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1593
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1634
1594
  end
1635
1595
 
1636
- # Create Result
1637
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1638
1596
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1639
1597
  # Deserialize Response
1640
1598
  if status_code == 200