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.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_network/application_gateways.rb +85 -112
- data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +47 -62
- data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +47 -62
- data/lib/generated/azure_mgmt_network/express_route_circuits.rb +112 -148
- data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +20 -26
- data/lib/generated/azure_mgmt_network/load_balancers.rb +67 -88
- data/lib/generated/azure_mgmt_network/local_network_gateways.rb +47 -62
- data/lib/generated/azure_mgmt_network/network_interfaces.rb +134 -176
- data/lib/generated/azure_mgmt_network/network_management_client.rb +64 -16
- data/lib/generated/azure_mgmt_network/network_security_groups.rb +67 -88
- data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +67 -88
- data/lib/generated/azure_mgmt_network/route_tables.rb +67 -88
- data/lib/generated/azure_mgmt_network/routes.rb +47 -62
- data/lib/generated/azure_mgmt_network/security_rules.rb +47 -62
- data/lib/generated/azure_mgmt_network/subnets.rb +47 -62
- data/lib/generated/azure_mgmt_network/usages.rb +20 -26
- data/lib/generated/azure_mgmt_network/version.rb +1 -1
- data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +74 -98
- data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +65 -86
- data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +47 -62
- data/lib/generated/azure_mgmt_network/virtual_networks.rb +76 -100
- 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/routeTables/{routeTableName}'
|
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,'routeTableName' => route_table_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
|
-
|
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 == 200 || status_code == 202
|
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/routeTables/{routeTableName}'
|
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,'routeTableName' => route_table_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
|
-
|
215
|
-
|
216
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
217
|
-
promise = request.run_promise do |req|
|
218
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
219
|
-
end
|
220
|
-
|
221
|
-
promise = promise.then do |http_response|
|
216
|
+
promise = promise.then do |result|
|
217
|
+
http_response = result.response
|
222
218
|
status_code = http_response.status
|
223
219
|
response_content = http_response.body
|
224
220
|
unless status_code == 200
|
225
221
|
error_model = JSON.load(response_content)
|
226
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
222
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
227
223
|
end
|
228
224
|
|
229
|
-
# Create Result
|
230
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
231
225
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
232
226
|
# Deserialize Response
|
233
227
|
if status_code == 200
|
@@ -363,31 +357,28 @@ module Azure::ARM::Network
|
|
363
357
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
364
358
|
|
365
359
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'
|
360
|
+
|
361
|
+
request_url = @base_url || @client.base_url
|
362
|
+
|
366
363
|
options = {
|
367
364
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
368
365
|
path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'subscriptionId' => @client.subscription_id},
|
369
366
|
query_params: {'api-version' => @client.api_version},
|
370
367
|
body: request_content,
|
371
|
-
headers: request_headers.merge(custom_headers || {})
|
368
|
+
headers: request_headers.merge(custom_headers || {}),
|
369
|
+
base_url: request_url
|
372
370
|
}
|
371
|
+
promise = @client.make_request_async(:put, path_template, options)
|
373
372
|
|
374
|
-
|
375
|
-
|
376
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
377
|
-
promise = request.run_promise do |req|
|
378
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
379
|
-
end
|
380
|
-
|
381
|
-
promise = promise.then do |http_response|
|
373
|
+
promise = promise.then do |result|
|
374
|
+
http_response = result.response
|
382
375
|
status_code = http_response.status
|
383
376
|
response_content = http_response.body
|
384
377
|
unless status_code == 200 || status_code == 201
|
385
378
|
error_model = JSON.load(response_content)
|
386
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
379
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
387
380
|
end
|
388
381
|
|
389
|
-
# Create Result
|
390
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
391
382
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
392
383
|
# Deserialize Response
|
393
384
|
if status_code == 200
|
@@ -430,8 +421,8 @@ module Azure::ARM::Network
|
|
430
421
|
response = list_async(resource_group_name, custom_headers).value!
|
431
422
|
unless response.nil?
|
432
423
|
page = response.body
|
433
|
-
page.next_method = Proc.new do |
|
434
|
-
list_next_async(
|
424
|
+
page.next_method = Proc.new do |next_page_link|
|
425
|
+
list_next_async(next_page_link, custom_headers)
|
435
426
|
end
|
436
427
|
page
|
437
428
|
end
|
@@ -485,30 +476,27 @@ module Azure::ARM::Network
|
|
485
476
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
486
477
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
487
478
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables'
|
479
|
+
|
480
|
+
request_url = @base_url || @client.base_url
|
481
|
+
|
488
482
|
options = {
|
489
483
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
490
484
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
491
485
|
query_params: {'api-version' => @client.api_version},
|
492
|
-
headers: request_headers.merge(custom_headers || {})
|
486
|
+
headers: request_headers.merge(custom_headers || {}),
|
487
|
+
base_url: request_url
|
493
488
|
}
|
489
|
+
promise = @client.make_request_async(:get, path_template, options)
|
494
490
|
|
495
|
-
|
496
|
-
|
497
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
498
|
-
promise = request.run_promise do |req|
|
499
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
500
|
-
end
|
501
|
-
|
502
|
-
promise = promise.then do |http_response|
|
491
|
+
promise = promise.then do |result|
|
492
|
+
http_response = result.response
|
503
493
|
status_code = http_response.status
|
504
494
|
response_content = http_response.body
|
505
495
|
unless status_code == 200
|
506
496
|
error_model = JSON.load(response_content)
|
507
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
497
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
508
498
|
end
|
509
499
|
|
510
|
-
# Create Result
|
511
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
512
500
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
513
501
|
# Deserialize Response
|
514
502
|
if status_code == 200
|
@@ -540,8 +528,8 @@ module Azure::ARM::Network
|
|
540
528
|
response = list_all_async(custom_headers).value!
|
541
529
|
unless response.nil?
|
542
530
|
page = response.body
|
543
|
-
page.next_method = Proc.new do |
|
544
|
-
list_all_next_async(
|
531
|
+
page.next_method = Proc.new do |next_page_link|
|
532
|
+
list_all_next_async(next_page_link, custom_headers)
|
545
533
|
end
|
546
534
|
page
|
547
535
|
end
|
@@ -591,30 +579,27 @@ module Azure::ARM::Network
|
|
591
579
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
592
580
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
593
581
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables'
|
582
|
+
|
583
|
+
request_url = @base_url || @client.base_url
|
584
|
+
|
594
585
|
options = {
|
595
586
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
596
587
|
path_params: {'subscriptionId' => @client.subscription_id},
|
597
588
|
query_params: {'api-version' => @client.api_version},
|
598
|
-
headers: request_headers.merge(custom_headers || {})
|
589
|
+
headers: request_headers.merge(custom_headers || {}),
|
590
|
+
base_url: request_url
|
599
591
|
}
|
592
|
+
promise = @client.make_request_async(:get, path_template, options)
|
600
593
|
|
601
|
-
|
602
|
-
|
603
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
604
|
-
promise = request.run_promise do |req|
|
605
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
606
|
-
end
|
607
|
-
|
608
|
-
promise = promise.then do |http_response|
|
594
|
+
promise = promise.then do |result|
|
595
|
+
http_response = result.response
|
609
596
|
status_code = http_response.status
|
610
597
|
response_content = http_response.body
|
611
598
|
unless status_code == 200
|
612
599
|
error_model = JSON.load(response_content)
|
613
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
600
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
614
601
|
end
|
615
602
|
|
616
|
-
# Create Result
|
617
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
618
603
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
619
604
|
# Deserialize Response
|
620
605
|
if status_code == 200
|
@@ -682,29 +667,26 @@ module Azure::ARM::Network
|
|
682
667
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
683
668
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
684
669
|
path_template = '{nextLink}'
|
670
|
+
|
671
|
+
request_url = @base_url || @client.base_url
|
672
|
+
|
685
673
|
options = {
|
686
674
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
687
675
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
688
|
-
headers: request_headers.merge(custom_headers || {})
|
676
|
+
headers: request_headers.merge(custom_headers || {}),
|
677
|
+
base_url: request_url
|
689
678
|
}
|
679
|
+
promise = @client.make_request_async(:get, path_template, options)
|
690
680
|
|
691
|
-
|
692
|
-
|
693
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
694
|
-
promise = request.run_promise do |req|
|
695
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
696
|
-
end
|
697
|
-
|
698
|
-
promise = promise.then do |http_response|
|
681
|
+
promise = promise.then do |result|
|
682
|
+
http_response = result.response
|
699
683
|
status_code = http_response.status
|
700
684
|
response_content = http_response.body
|
701
685
|
unless status_code == 200
|
702
686
|
error_model = JSON.load(response_content)
|
703
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
687
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
704
688
|
end
|
705
689
|
|
706
|
-
# Create Result
|
707
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
708
690
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
709
691
|
# Deserialize Response
|
710
692
|
if status_code == 200
|
@@ -772,29 +754,26 @@ module Azure::ARM::Network
|
|
772
754
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
773
755
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
774
756
|
path_template = '{nextLink}'
|
757
|
+
|
758
|
+
request_url = @base_url || @client.base_url
|
759
|
+
|
775
760
|
options = {
|
776
761
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
777
762
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
778
|
-
headers: request_headers.merge(custom_headers || {})
|
763
|
+
headers: request_headers.merge(custom_headers || {}),
|
764
|
+
base_url: request_url
|
779
765
|
}
|
766
|
+
promise = @client.make_request_async(:get, path_template, options)
|
780
767
|
|
781
|
-
|
782
|
-
|
783
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
784
|
-
promise = request.run_promise do |req|
|
785
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
786
|
-
end
|
787
|
-
|
788
|
-
promise = promise.then do |http_response|
|
768
|
+
promise = promise.then do |result|
|
769
|
+
http_response = result.response
|
789
770
|
status_code = http_response.status
|
790
771
|
response_content = http_response.body
|
791
772
|
unless status_code == 200
|
792
773
|
error_model = JSON.load(response_content)
|
793
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
774
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
794
775
|
end
|
795
776
|
|
796
|
-
# Create Result
|
797
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
798
777
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
799
778
|
# Deserialize Response
|
800
779
|
if status_code == 200
|
@@ -120,30 +120,27 @@ module Azure::ARM::Network
|
|
120
120
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
121
121
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
122
122
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
|
123
|
+
|
124
|
+
request_url = @base_url || @client.base_url
|
125
|
+
|
123
126
|
options = {
|
124
127
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
125
128
|
path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
|
126
129
|
query_params: {'api-version' => @client.api_version},
|
127
|
-
headers: request_headers.merge(custom_headers || {})
|
130
|
+
headers: request_headers.merge(custom_headers || {}),
|
131
|
+
base_url: request_url
|
128
132
|
}
|
133
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
129
134
|
|
130
|
-
|
131
|
-
|
132
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
133
|
-
promise = request.run_promise do |req|
|
134
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
135
|
-
end
|
136
|
-
|
137
|
-
promise = promise.then do |http_response|
|
135
|
+
promise = promise.then do |result|
|
136
|
+
http_response = result.response
|
138
137
|
status_code = http_response.status
|
139
138
|
response_content = http_response.body
|
140
139
|
unless status_code == 202 || status_code == 200 || status_code == 204
|
141
140
|
error_model = JSON.load(response_content)
|
142
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
141
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
143
142
|
end
|
144
143
|
|
145
|
-
# Create Result
|
146
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
147
144
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
148
145
|
|
149
146
|
result
|
@@ -211,30 +208,27 @@ module Azure::ARM::Network
|
|
211
208
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
212
209
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
213
210
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
|
211
|
+
|
212
|
+
request_url = @base_url || @client.base_url
|
213
|
+
|
214
214
|
options = {
|
215
215
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
216
216
|
path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
|
217
217
|
query_params: {'api-version' => @client.api_version},
|
218
|
-
headers: request_headers.merge(custom_headers || {})
|
218
|
+
headers: request_headers.merge(custom_headers || {}),
|
219
|
+
base_url: request_url
|
219
220
|
}
|
221
|
+
promise = @client.make_request_async(:get, path_template, options)
|
220
222
|
|
221
|
-
|
222
|
-
|
223
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
224
|
-
promise = request.run_promise do |req|
|
225
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
226
|
-
end
|
227
|
-
|
228
|
-
promise = promise.then do |http_response|
|
223
|
+
promise = promise.then do |result|
|
224
|
+
http_response = result.response
|
229
225
|
status_code = http_response.status
|
230
226
|
response_content = http_response.body
|
231
227
|
unless status_code == 200
|
232
228
|
error_model = JSON.load(response_content)
|
233
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
229
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
234
230
|
end
|
235
231
|
|
236
|
-
# Create Result
|
237
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
238
232
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
239
233
|
# Deserialize Response
|
240
234
|
if status_code == 200
|
@@ -372,31 +366,28 @@ module Azure::ARM::Network
|
|
372
366
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
373
367
|
|
374
368
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
|
369
|
+
|
370
|
+
request_url = @base_url || @client.base_url
|
371
|
+
|
375
372
|
options = {
|
376
373
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
377
374
|
path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
|
378
375
|
query_params: {'api-version' => @client.api_version},
|
379
376
|
body: request_content,
|
380
|
-
headers: request_headers.merge(custom_headers || {})
|
377
|
+
headers: request_headers.merge(custom_headers || {}),
|
378
|
+
base_url: request_url
|
381
379
|
}
|
380
|
+
promise = @client.make_request_async(:put, path_template, options)
|
382
381
|
|
383
|
-
|
384
|
-
|
385
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
386
|
-
promise = request.run_promise do |req|
|
387
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
388
|
-
end
|
389
|
-
|
390
|
-
promise = promise.then do |http_response|
|
382
|
+
promise = promise.then do |result|
|
383
|
+
http_response = result.response
|
391
384
|
status_code = http_response.status
|
392
385
|
response_content = http_response.body
|
393
386
|
unless status_code == 200 || status_code == 201
|
394
387
|
error_model = JSON.load(response_content)
|
395
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
388
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
396
389
|
end
|
397
390
|
|
398
|
-
# Create Result
|
399
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
400
391
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
401
392
|
# Deserialize Response
|
402
393
|
if status_code == 200
|
@@ -440,8 +431,8 @@ module Azure::ARM::Network
|
|
440
431
|
response = list_async(resource_group_name, route_table_name, custom_headers).value!
|
441
432
|
unless response.nil?
|
442
433
|
page = response.body
|
443
|
-
page.next_method = Proc.new do |
|
444
|
-
list_next_async(
|
434
|
+
page.next_method = Proc.new do |next_page_link|
|
435
|
+
list_next_async(next_page_link, custom_headers)
|
445
436
|
end
|
446
437
|
page
|
447
438
|
end
|
@@ -502,30 +493,27 @@ module Azure::ARM::Network
|
|
502
493
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
503
494
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
504
495
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'
|
496
|
+
|
497
|
+
request_url = @base_url || @client.base_url
|
498
|
+
|
505
499
|
options = {
|
506
500
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
507
501
|
path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'subscriptionId' => @client.subscription_id},
|
508
502
|
query_params: {'api-version' => @client.api_version},
|
509
|
-
headers: request_headers.merge(custom_headers || {})
|
503
|
+
headers: request_headers.merge(custom_headers || {}),
|
504
|
+
base_url: request_url
|
510
505
|
}
|
506
|
+
promise = @client.make_request_async(:get, path_template, options)
|
511
507
|
|
512
|
-
|
513
|
-
|
514
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
515
|
-
promise = request.run_promise do |req|
|
516
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
517
|
-
end
|
518
|
-
|
519
|
-
promise = promise.then do |http_response|
|
508
|
+
promise = promise.then do |result|
|
509
|
+
http_response = result.response
|
520
510
|
status_code = http_response.status
|
521
511
|
response_content = http_response.body
|
522
512
|
unless status_code == 200
|
523
513
|
error_model = JSON.load(response_content)
|
524
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
514
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
525
515
|
end
|
526
516
|
|
527
|
-
# Create Result
|
528
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
529
517
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
530
518
|
# Deserialize Response
|
531
519
|
if status_code == 200
|
@@ -596,29 +584,26 @@ 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 = '{nextLink}'
|
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
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
602
|
-
headers: request_headers.merge(custom_headers || {})
|
593
|
+
headers: request_headers.merge(custom_headers || {}),
|
594
|
+
base_url: request_url
|
603
595
|
}
|
596
|
+
promise = @client.make_request_async(:get, path_template, options)
|
604
597
|
|
605
|
-
|
606
|
-
|
607
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
608
|
-
promise = request.run_promise do |req|
|
609
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
610
|
-
end
|
611
|
-
|
612
|
-
promise = promise.then do |http_response|
|
598
|
+
promise = promise.then do |result|
|
599
|
+
http_response = result.response
|
613
600
|
status_code = http_response.status
|
614
601
|
response_content = http_response.body
|
615
602
|
unless status_code == 200
|
616
603
|
error_model = JSON.load(response_content)
|
617
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
604
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
618
605
|
end
|
619
606
|
|
620
|
-
# Create Result
|
621
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
622
607
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
623
608
|
# Deserialize Response
|
624
609
|
if status_code == 200
|