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
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Network
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
@@ -156,31 +156,28 @@ module Azure::ARM::Network
156
156
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
157
157
 
158
158
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'
159
+
160
+ request_url = @base_url || @client.base_url
161
+
159
162
  options = {
160
163
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
164
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
162
165
  query_params: {'api-version' => @client.api_version},
163
166
  body: request_content,
164
- headers: request_headers.merge(custom_headers || {})
167
+ headers: request_headers.merge(custom_headers || {}),
168
+ base_url: request_url
165
169
  }
170
+ promise = @client.make_request_async(:put, path_template, options)
166
171
 
167
- request_url = @base_url || @client.base_url
168
-
169
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
170
- promise = request.run_promise do |req|
171
- @client.credentials.sign_request(req) unless @client.credentials.nil?
172
- end
173
-
174
- promise = promise.then do |http_response|
172
+ promise = promise.then do |result|
173
+ http_response = result.response
175
174
  status_code = http_response.status
176
175
  response_content = http_response.body
177
176
  unless status_code == 200 || status_code == 201
178
177
  error_model = JSON.load(response_content)
179
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
178
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
180
179
  end
181
180
 
182
- # Create Result
183
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
184
181
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
185
182
  # Deserialize Response
186
183
  if status_code == 200
@@ -270,30 +267,27 @@ module Azure::ARM::Network
270
267
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
271
268
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
272
269
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'
270
+
271
+ request_url = @base_url || @client.base_url
272
+
273
273
  options = {
274
274
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
275
275
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
276
276
  query_params: {'api-version' => @client.api_version},
277
- headers: request_headers.merge(custom_headers || {})
277
+ headers: request_headers.merge(custom_headers || {}),
278
+ base_url: request_url
278
279
  }
280
+ promise = @client.make_request_async(:get, path_template, options)
279
281
 
280
- request_url = @base_url || @client.base_url
281
-
282
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
283
- promise = request.run_promise do |req|
284
- @client.credentials.sign_request(req) unless @client.credentials.nil?
285
- end
286
-
287
- promise = promise.then do |http_response|
282
+ promise = promise.then do |result|
283
+ http_response = result.response
288
284
  status_code = http_response.status
289
285
  response_content = http_response.body
290
286
  unless status_code == 200
291
287
  error_model = JSON.load(response_content)
292
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
288
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
293
289
  end
294
290
 
295
- # Create Result
296
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
297
291
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
298
292
  # Deserialize Response
299
293
  if status_code == 200
@@ -410,30 +404,27 @@ module Azure::ARM::Network
410
404
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
411
405
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
412
406
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'
407
+
408
+ request_url = @base_url || @client.base_url
409
+
413
410
  options = {
414
411
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
415
412
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
416
413
  query_params: {'api-version' => @client.api_version},
417
- headers: request_headers.merge(custom_headers || {})
414
+ headers: request_headers.merge(custom_headers || {}),
415
+ base_url: request_url
418
416
  }
417
+ promise = @client.make_request_async(:delete, path_template, options)
419
418
 
420
- request_url = @base_url || @client.base_url
421
-
422
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
423
- promise = request.run_promise do |req|
424
- @client.credentials.sign_request(req) unless @client.credentials.nil?
425
- end
426
-
427
- promise = promise.then do |http_response|
419
+ promise = promise.then do |result|
420
+ http_response = result.response
428
421
  status_code = http_response.status
429
422
  response_content = http_response.body
430
423
  unless status_code == 200 || status_code == 202 || status_code == 204
431
424
  error_model = JSON.load(response_content)
432
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
425
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
433
426
  end
434
427
 
435
- # Create Result
436
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
437
428
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
438
429
 
439
430
  result
@@ -503,30 +494,27 @@ module Azure::ARM::Network
503
494
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
504
495
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
505
496
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{connectionSharedKeyName}/sharedkey'
497
+
498
+ request_url = @base_url || @client.base_url
499
+
506
500
  options = {
507
501
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
508
502
  path_params: {'resourceGroupName' => resource_group_name,'connectionSharedKeyName' => connection_shared_key_name,'subscriptionId' => @client.subscription_id},
509
503
  query_params: {'api-version' => @client.api_version},
510
- headers: request_headers.merge(custom_headers || {})
504
+ headers: request_headers.merge(custom_headers || {}),
505
+ base_url: request_url
511
506
  }
507
+ promise = @client.make_request_async(:get, path_template, options)
512
508
 
513
- request_url = @base_url || @client.base_url
514
-
515
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
516
- promise = request.run_promise do |req|
517
- @client.credentials.sign_request(req) unless @client.credentials.nil?
518
- end
519
-
520
- promise = promise.then do |http_response|
509
+ promise = promise.then do |result|
510
+ http_response = result.response
521
511
  status_code = http_response.status
522
512
  response_content = http_response.body
523
513
  unless status_code == 200
524
514
  error_model = JSON.load(response_content)
525
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
515
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
526
516
  end
527
517
 
528
- # Create Result
529
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
530
518
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
531
519
  # Deserialize Response
532
520
  if status_code == 200
@@ -560,8 +548,8 @@ module Azure::ARM::Network
560
548
  response = list_async(resource_group_name, custom_headers).value!
561
549
  unless response.nil?
562
550
  page = response.body
563
- page.next_method = Proc.new do |next_link|
564
- list_next_async(next_link, custom_headers)
551
+ page.next_method = Proc.new do |next_page_link|
552
+ list_next_async(next_page_link, custom_headers)
565
553
  end
566
554
  page
567
555
  end
@@ -618,30 +606,27 @@ module Azure::ARM::Network
618
606
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
619
607
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
620
608
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'
609
+
610
+ request_url = @base_url || @client.base_url
611
+
621
612
  options = {
622
613
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
623
614
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
624
615
  query_params: {'api-version' => @client.api_version},
625
- headers: request_headers.merge(custom_headers || {})
616
+ headers: request_headers.merge(custom_headers || {}),
617
+ base_url: request_url
626
618
  }
619
+ promise = @client.make_request_async(:get, path_template, options)
627
620
 
628
- request_url = @base_url || @client.base_url
629
-
630
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
631
- promise = request.run_promise do |req|
632
- @client.credentials.sign_request(req) unless @client.credentials.nil?
633
- end
634
-
635
- promise = promise.then do |http_response|
621
+ promise = promise.then do |result|
622
+ http_response = result.response
636
623
  status_code = http_response.status
637
624
  response_content = http_response.body
638
625
  unless status_code == 200
639
626
  error_model = JSON.load(response_content)
640
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
627
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
641
628
  end
642
629
 
643
- # Create Result
644
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
645
630
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
646
631
  # Deserialize Response
647
632
  if status_code == 200
@@ -795,31 +780,28 @@ module Azure::ARM::Network
795
780
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
796
781
 
797
782
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'
783
+
784
+ request_url = @base_url || @client.base_url
785
+
798
786
  options = {
799
787
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
800
788
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
801
789
  query_params: {'api-version' => @client.api_version},
802
790
  body: request_content,
803
- headers: request_headers.merge(custom_headers || {})
791
+ headers: request_headers.merge(custom_headers || {}),
792
+ base_url: request_url
804
793
  }
794
+ promise = @client.make_request_async(:post, path_template, options)
805
795
 
806
- request_url = @base_url || @client.base_url
807
-
808
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
809
- promise = request.run_promise do |req|
810
- @client.credentials.sign_request(req) unless @client.credentials.nil?
811
- end
812
-
813
- promise = promise.then do |http_response|
796
+ promise = promise.then do |result|
797
+ http_response = result.response
814
798
  status_code = http_response.status
815
799
  response_content = http_response.body
816
800
  unless status_code == 200 || status_code == 202
817
801
  error_model = JSON.load(response_content)
818
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
802
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
819
803
  end
820
804
 
821
- # Create Result
822
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
823
805
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
824
806
  # Deserialize Response
825
807
  if status_code == 200
@@ -973,31 +955,28 @@ module Azure::ARM::Network
973
955
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
974
956
 
975
957
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'
958
+
959
+ request_url = @base_url || @client.base_url
960
+
976
961
  options = {
977
962
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
978
963
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
979
964
  query_params: {'api-version' => @client.api_version},
980
965
  body: request_content,
981
- headers: request_headers.merge(custom_headers || {})
966
+ headers: request_headers.merge(custom_headers || {}),
967
+ base_url: request_url
982
968
  }
969
+ promise = @client.make_request_async(:put, path_template, options)
983
970
 
984
- request_url = @base_url || @client.base_url
985
-
986
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
987
- promise = request.run_promise do |req|
988
- @client.credentials.sign_request(req) unless @client.credentials.nil?
989
- end
990
-
991
- promise = promise.then do |http_response|
971
+ promise = promise.then do |result|
972
+ http_response = result.response
992
973
  status_code = http_response.status
993
974
  response_content = http_response.body
994
975
  unless status_code == 201 || status_code == 200
995
976
  error_model = JSON.load(response_content)
996
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
977
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
997
978
  end
998
979
 
999
- # Create Result
1000
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1001
980
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1002
981
  # Deserialize Response
1003
982
  if status_code == 201
@@ -1078,29 +1057,26 @@ module Azure::ARM::Network
1078
1057
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1079
1058
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1080
1059
  path_template = '{nextLink}'
1060
+
1061
+ request_url = @base_url || @client.base_url
1062
+
1081
1063
  options = {
1082
1064
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1083
1065
  skip_encoding_path_params: {'nextLink' => next_page_link},
1084
- headers: request_headers.merge(custom_headers || {})
1066
+ headers: request_headers.merge(custom_headers || {}),
1067
+ base_url: request_url
1085
1068
  }
1069
+ promise = @client.make_request_async(:get, path_template, options)
1086
1070
 
1087
- request_url = @base_url || @client.base_url
1088
-
1089
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1090
- promise = request.run_promise do |req|
1091
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1092
- end
1093
-
1094
- promise = promise.then do |http_response|
1071
+ promise = promise.then do |result|
1072
+ http_response = result.response
1095
1073
  status_code = http_response.status
1096
1074
  response_content = http_response.body
1097
1075
  unless status_code == 200
1098
1076
  error_model = JSON.load(response_content)
1099
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1077
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1100
1078
  end
1101
1079
 
1102
- # Create Result
1103
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1104
1080
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1105
1081
  # Deserialize Response
1106
1082
  if status_code == 200
@@ -152,31 +152,28 @@ module Azure::ARM::Network
152
152
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
153
153
 
154
154
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
155
+
156
+ request_url = @base_url || @client.base_url
157
+
155
158
  options = {
156
159
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
157
160
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
158
161
  query_params: {'api-version' => @client.api_version},
159
162
  body: request_content,
160
- headers: request_headers.merge(custom_headers || {})
163
+ headers: request_headers.merge(custom_headers || {}),
164
+ base_url: request_url
161
165
  }
166
+ promise = @client.make_request_async(:put, path_template, options)
162
167
 
163
- request_url = @base_url || @client.base_url
164
-
165
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
166
- promise = request.run_promise do |req|
167
- @client.credentials.sign_request(req) unless @client.credentials.nil?
168
- end
169
-
170
- promise = promise.then do |http_response|
168
+ promise = promise.then do |result|
169
+ http_response = result.response
171
170
  status_code = http_response.status
172
171
  response_content = http_response.body
173
172
  unless status_code == 200 || status_code == 201
174
173
  error_model = JSON.load(response_content)
175
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
174
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
176
175
  end
177
176
 
178
- # Create Result
179
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
180
177
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
181
178
  # Deserialize Response
182
179
  if status_code == 200
@@ -263,30 +260,27 @@ module Azure::ARM::Network
263
260
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
264
261
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
265
262
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
263
+
264
+ request_url = @base_url || @client.base_url
265
+
266
266
  options = {
267
267
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
268
268
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
269
269
  query_params: {'api-version' => @client.api_version},
270
- headers: request_headers.merge(custom_headers || {})
270
+ headers: request_headers.merge(custom_headers || {}),
271
+ base_url: request_url
271
272
  }
273
+ promise = @client.make_request_async(:get, path_template, options)
272
274
 
273
- request_url = @base_url || @client.base_url
274
-
275
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
276
- promise = request.run_promise do |req|
277
- @client.credentials.sign_request(req) unless @client.credentials.nil?
278
- end
279
-
280
- promise = promise.then do |http_response|
275
+ promise = promise.then do |result|
276
+ http_response = result.response
281
277
  status_code = http_response.status
282
278
  response_content = http_response.body
283
279
  unless status_code == 200
284
280
  error_model = JSON.load(response_content)
285
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
281
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
286
282
  end
287
283
 
288
- # Create Result
289
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
290
284
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
291
285
  # Deserialize Response
292
286
  if status_code == 200
@@ -403,30 +397,27 @@ module Azure::ARM::Network
403
397
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
404
398
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
405
399
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
400
+
401
+ request_url = @base_url || @client.base_url
402
+
406
403
  options = {
407
404
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
408
405
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
409
406
  query_params: {'api-version' => @client.api_version},
410
- headers: request_headers.merge(custom_headers || {})
407
+ headers: request_headers.merge(custom_headers || {}),
408
+ base_url: request_url
411
409
  }
410
+ promise = @client.make_request_async(:delete, path_template, options)
412
411
 
413
- request_url = @base_url || @client.base_url
414
-
415
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
416
- promise = request.run_promise do |req|
417
- @client.credentials.sign_request(req) unless @client.credentials.nil?
418
- end
419
-
420
- promise = promise.then do |http_response|
412
+ promise = promise.then do |result|
413
+ http_response = result.response
421
414
  status_code = http_response.status
422
415
  response_content = http_response.body
423
416
  unless status_code == 204 || status_code == 202 || status_code == 200
424
417
  error_model = JSON.load(response_content)
425
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
418
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
426
419
  end
427
420
 
428
- # Create Result
429
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
430
421
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
431
422
 
432
423
  result
@@ -450,8 +441,8 @@ module Azure::ARM::Network
450
441
  response = list_async(resource_group_name, custom_headers).value!
451
442
  unless response.nil?
452
443
  page = response.body
453
- page.next_method = Proc.new do |next_link|
454
- list_next_async(next_link, custom_headers)
444
+ page.next_method = Proc.new do |next_page_link|
445
+ list_next_async(next_page_link, custom_headers)
455
446
  end
456
447
  page
457
448
  end
@@ -508,30 +499,27 @@ module Azure::ARM::Network
508
499
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
509
500
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
510
501
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'
502
+
503
+ request_url = @base_url || @client.base_url
504
+
511
505
  options = {
512
506
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
513
507
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
514
508
  query_params: {'api-version' => @client.api_version},
515
- headers: request_headers.merge(custom_headers || {})
509
+ headers: request_headers.merge(custom_headers || {}),
510
+ base_url: request_url
516
511
  }
512
+ promise = @client.make_request_async(:get, path_template, options)
517
513
 
518
- request_url = @base_url || @client.base_url
519
-
520
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
521
- promise = request.run_promise do |req|
522
- @client.credentials.sign_request(req) unless @client.credentials.nil?
523
- end
524
-
525
- promise = promise.then do |http_response|
514
+ promise = promise.then do |result|
515
+ http_response = result.response
526
516
  status_code = http_response.status
527
517
  response_content = http_response.body
528
518
  unless status_code == 200
529
519
  error_model = JSON.load(response_content)
530
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
520
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
531
521
  end
532
522
 
533
- # Create Result
534
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
535
523
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
536
524
  # Deserialize Response
537
525
  if status_code == 200
@@ -676,31 +664,28 @@ module Azure::ARM::Network
676
664
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
677
665
 
678
666
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'
667
+
668
+ request_url = @base_url || @client.base_url
669
+
679
670
  options = {
680
671
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
681
672
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
682
673
  query_params: {'api-version' => @client.api_version},
683
674
  body: request_content,
684
- headers: request_headers.merge(custom_headers || {})
675
+ headers: request_headers.merge(custom_headers || {}),
676
+ base_url: request_url
685
677
  }
678
+ promise = @client.make_request_async(:post, path_template, options)
686
679
 
687
- request_url = @base_url || @client.base_url
688
-
689
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
690
- promise = request.run_promise do |req|
691
- @client.credentials.sign_request(req) unless @client.credentials.nil?
692
- end
693
-
694
- promise = promise.then do |http_response|
680
+ promise = promise.then do |result|
681
+ http_response = result.response
695
682
  status_code = http_response.status
696
683
  response_content = http_response.body
697
684
  unless status_code == 202 || status_code == 200
698
685
  error_model = JSON.load(response_content)
699
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
686
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
700
687
  end
701
688
 
702
- # Create Result
703
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
704
689
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
705
690
  # Deserialize Response
706
691
  if status_code == 200
@@ -798,31 +783,28 @@ module Azure::ARM::Network
798
783
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
799
784
 
800
785
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'
786
+
787
+ request_url = @base_url || @client.base_url
788
+
801
789
  options = {
802
790
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
803
791
  path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
804
792
  query_params: {'api-version' => @client.api_version},
805
793
  body: request_content,
806
- headers: request_headers.merge(custom_headers || {})
794
+ headers: request_headers.merge(custom_headers || {}),
795
+ base_url: request_url
807
796
  }
797
+ promise = @client.make_request_async(:post, path_template, options)
808
798
 
809
- request_url = @base_url || @client.base_url
810
-
811
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
812
- promise = request.run_promise do |req|
813
- @client.credentials.sign_request(req) unless @client.credentials.nil?
814
- end
815
-
816
- promise = promise.then do |http_response|
799
+ promise = promise.then do |result|
800
+ http_response = result.response
817
801
  status_code = http_response.status
818
802
  response_content = http_response.body
819
803
  unless status_code == 202
820
804
  error_model = JSON.load(response_content)
821
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
805
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
822
806
  end
823
807
 
824
- # Create Result
825
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
826
808
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
827
809
  # Deserialize Response
828
810
  if status_code == 202
@@ -899,29 +881,26 @@ module Azure::ARM::Network
899
881
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
900
882
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
901
883
  path_template = '{nextLink}'
884
+
885
+ request_url = @base_url || @client.base_url
886
+
902
887
  options = {
903
888
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
904
889
  skip_encoding_path_params: {'nextLink' => next_page_link},
905
- headers: request_headers.merge(custom_headers || {})
890
+ headers: request_headers.merge(custom_headers || {}),
891
+ base_url: request_url
906
892
  }
893
+ promise = @client.make_request_async(:get, path_template, options)
907
894
 
908
- request_url = @base_url || @client.base_url
909
-
910
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
911
- promise = request.run_promise do |req|
912
- @client.credentials.sign_request(req) unless @client.credentials.nil?
913
- end
914
-
915
- promise = promise.then do |http_response|
895
+ promise = promise.then do |result|
896
+ http_response = result.response
916
897
  status_code = http_response.status
917
898
  response_content = http_response.body
918
899
  unless status_code == 200
919
900
  error_model = JSON.load(response_content)
920
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
901
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
921
902
  end
922
903
 
923
- # Create Result
924
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
925
904
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
926
905
  # Deserialize Response
927
906
  if status_code == 200