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
@@ -39,8 +39,8 @@ module Azure::ARM::Network
|
|
39
39
|
response = list_async(custom_headers).value!
|
40
40
|
unless response.nil?
|
41
41
|
page = response.body
|
42
|
-
page.next_method = Proc.new do |
|
43
|
-
list_next_async(
|
42
|
+
page.next_method = Proc.new do |next_page_link|
|
43
|
+
list_next_async(next_page_link, custom_headers)
|
44
44
|
end
|
45
45
|
page
|
46
46
|
end
|
@@ -93,30 +93,27 @@ module Azure::ARM::Network
|
|
93
93
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
94
94
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
95
95
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders'
|
96
|
+
|
97
|
+
request_url = @base_url || @client.base_url
|
98
|
+
|
96
99
|
options = {
|
97
100
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
98
101
|
path_params: {'subscriptionId' => @client.subscription_id},
|
99
102
|
query_params: {'api-version' => @client.api_version},
|
100
|
-
headers: request_headers.merge(custom_headers || {})
|
103
|
+
headers: request_headers.merge(custom_headers || {}),
|
104
|
+
base_url: request_url
|
101
105
|
}
|
106
|
+
promise = @client.make_request_async(:get, path_template, options)
|
102
107
|
|
103
|
-
|
104
|
-
|
105
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
106
|
-
promise = request.run_promise do |req|
|
107
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
108
|
-
end
|
109
|
-
|
110
|
-
promise = promise.then do |http_response|
|
108
|
+
promise = promise.then do |result|
|
109
|
+
http_response = result.response
|
111
110
|
status_code = http_response.status
|
112
111
|
response_content = http_response.body
|
113
112
|
unless status_code == 200
|
114
113
|
error_model = JSON.load(response_content)
|
115
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
114
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
116
115
|
end
|
117
116
|
|
118
|
-
# Create Result
|
119
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
120
117
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
121
118
|
# Deserialize Response
|
122
119
|
if status_code == 200
|
@@ -187,29 +184,26 @@ module Azure::ARM::Network
|
|
187
184
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
188
185
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
189
186
|
path_template = '{nextLink}'
|
187
|
+
|
188
|
+
request_url = @base_url || @client.base_url
|
189
|
+
|
190
190
|
options = {
|
191
191
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
192
192
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
193
|
-
headers: request_headers.merge(custom_headers || {})
|
193
|
+
headers: request_headers.merge(custom_headers || {}),
|
194
|
+
base_url: request_url
|
194
195
|
}
|
196
|
+
promise = @client.make_request_async(:get, path_template, options)
|
195
197
|
|
196
|
-
|
197
|
-
|
198
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
199
|
-
promise = request.run_promise do |req|
|
200
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
201
|
-
end
|
202
|
-
|
203
|
-
promise = promise.then do |http_response|
|
198
|
+
promise = promise.then do |result|
|
199
|
+
http_response = result.response
|
204
200
|
status_code = http_response.status
|
205
201
|
response_content = http_response.body
|
206
202
|
unless status_code == 200
|
207
203
|
error_model = JSON.load(response_content)
|
208
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
204
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
209
205
|
end
|
210
206
|
|
211
|
-
# Create Result
|
212
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
213
207
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
214
208
|
# Deserialize Response
|
215
209
|
if status_code == 200
|
@@ -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/loadBalancers/{loadBalancerName}'
|
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,'loadBalancerName' => load_balancer_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 == 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/loadBalancers/{loadBalancerName}'
|
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,'loadBalancerName' => load_balancer_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
|
@@ -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/loadBalancers/{loadBalancerName}'
|
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,'loadBalancerName' => load_balancer_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
|
-
|
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
|
@@ -426,8 +417,8 @@ module Azure::ARM::Network
|
|
426
417
|
response = list_all_async(custom_headers).value!
|
427
418
|
unless response.nil?
|
428
419
|
page = response.body
|
429
|
-
page.next_method = Proc.new do |
|
430
|
-
list_all_next_async(
|
420
|
+
page.next_method = Proc.new do |next_page_link|
|
421
|
+
list_all_next_async(next_page_link, custom_headers)
|
431
422
|
end
|
432
423
|
page
|
433
424
|
end
|
@@ -480,30 +471,27 @@ module Azure::ARM::Network
|
|
480
471
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
481
472
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
482
473
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'
|
474
|
+
|
475
|
+
request_url = @base_url || @client.base_url
|
476
|
+
|
483
477
|
options = {
|
484
478
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
485
479
|
path_params: {'subscriptionId' => @client.subscription_id},
|
486
480
|
query_params: {'api-version' => @client.api_version},
|
487
|
-
headers: request_headers.merge(custom_headers || {})
|
481
|
+
headers: request_headers.merge(custom_headers || {}),
|
482
|
+
base_url: request_url
|
488
483
|
}
|
484
|
+
promise = @client.make_request_async(:get, path_template, options)
|
489
485
|
|
490
|
-
|
491
|
-
|
492
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
493
|
-
promise = request.run_promise do |req|
|
494
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
495
|
-
end
|
496
|
-
|
497
|
-
promise = promise.then do |http_response|
|
486
|
+
promise = promise.then do |result|
|
487
|
+
http_response = result.response
|
498
488
|
status_code = http_response.status
|
499
489
|
response_content = http_response.body
|
500
490
|
unless status_code == 200
|
501
491
|
error_model = JSON.load(response_content)
|
502
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
492
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
503
493
|
end
|
504
494
|
|
505
|
-
# Create Result
|
506
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
507
495
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
508
496
|
# Deserialize Response
|
509
497
|
if status_code == 200
|
@@ -537,8 +525,8 @@ module Azure::ARM::Network
|
|
537
525
|
response = list_async(resource_group_name, custom_headers).value!
|
538
526
|
unless response.nil?
|
539
527
|
page = response.body
|
540
|
-
page.next_method = Proc.new do |
|
541
|
-
list_next_async(
|
528
|
+
page.next_method = Proc.new do |next_page_link|
|
529
|
+
list_next_async(next_page_link, custom_headers)
|
542
530
|
end
|
543
531
|
page
|
544
532
|
end
|
@@ -595,30 +583,27 @@ module Azure::ARM::Network
|
|
595
583
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
596
584
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
597
585
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'
|
586
|
+
|
587
|
+
request_url = @base_url || @client.base_url
|
588
|
+
|
598
589
|
options = {
|
599
590
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
600
591
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
601
592
|
query_params: {'api-version' => @client.api_version},
|
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
|
@@ -689,29 +674,26 @@ module Azure::ARM::Network
|
|
689
674
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
690
675
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
691
676
|
path_template = '{nextLink}'
|
677
|
+
|
678
|
+
request_url = @base_url || @client.base_url
|
679
|
+
|
692
680
|
options = {
|
693
681
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
694
682
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
695
|
-
headers: request_headers.merge(custom_headers || {})
|
683
|
+
headers: request_headers.merge(custom_headers || {}),
|
684
|
+
base_url: request_url
|
696
685
|
}
|
686
|
+
promise = @client.make_request_async(:get, path_template, options)
|
697
687
|
|
698
|
-
|
699
|
-
|
700
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
701
|
-
promise = request.run_promise do |req|
|
702
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
703
|
-
end
|
704
|
-
|
705
|
-
promise = promise.then do |http_response|
|
688
|
+
promise = promise.then do |result|
|
689
|
+
http_response = result.response
|
706
690
|
status_code = http_response.status
|
707
691
|
response_content = http_response.body
|
708
692
|
unless status_code == 200
|
709
693
|
error_model = JSON.load(response_content)
|
710
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
694
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
711
695
|
end
|
712
696
|
|
713
|
-
# Create Result
|
714
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
715
697
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
716
698
|
# Deserialize Response
|
717
699
|
if status_code == 200
|
@@ -782,29 +764,26 @@ module Azure::ARM::Network
|
|
782
764
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
783
765
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
784
766
|
path_template = '{nextLink}'
|
767
|
+
|
768
|
+
request_url = @base_url || @client.base_url
|
769
|
+
|
785
770
|
options = {
|
786
771
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
787
772
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
788
|
-
headers: request_headers.merge(custom_headers || {})
|
773
|
+
headers: request_headers.merge(custom_headers || {}),
|
774
|
+
base_url: request_url
|
789
775
|
}
|
776
|
+
promise = @client.make_request_async(:get, path_template, options)
|
790
777
|
|
791
|
-
|
792
|
-
|
793
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
794
|
-
promise = request.run_promise do |req|
|
795
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
796
|
-
end
|
797
|
-
|
798
|
-
promise = promise.then do |http_response|
|
778
|
+
promise = promise.then do |result|
|
779
|
+
http_response = result.response
|
799
780
|
status_code = http_response.status
|
800
781
|
response_content = http_response.body
|
801
782
|
unless status_code == 200
|
802
783
|
error_model = JSON.load(response_content)
|
803
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
784
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
804
785
|
end
|
805
786
|
|
806
|
-
# Create Result
|
807
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
808
787
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
809
788
|
# Deserialize Response
|
810
789
|
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/localNetworkGateways/{localNetworkGatewayName}'
|
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,'localNetworkGatewayName' => local_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
|
-
|
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 == 201 || status_code == 200
|
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 == 201
|
@@ -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/localNetworkGateways/{localNetworkGatewayName}'
|
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,'localNetworkGatewayName' => local_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
|
-
|
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/localNetworkGateways/{localNetworkGatewayName}'
|
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,'localNetworkGatewayName' => local_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
|
-
|
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 == 200 || status_code == 202
|
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 |
|
454
|
-
list_next_async(
|
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/localNetworkGateways'
|
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
|
-
|
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
|
@@ -602,29 +590,26 @@ module Azure::ARM::Network
|
|
602
590
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
603
591
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
604
592
|
path_template = '{nextLink}'
|
593
|
+
|
594
|
+
request_url = @base_url || @client.base_url
|
595
|
+
|
605
596
|
options = {
|
606
597
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
607
598
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
608
|
-
headers: request_headers.merge(custom_headers || {})
|
599
|
+
headers: request_headers.merge(custom_headers || {}),
|
600
|
+
base_url: request_url
|
609
601
|
}
|
602
|
+
promise = @client.make_request_async(:get, path_template, options)
|
610
603
|
|
611
|
-
|
612
|
-
|
613
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
614
|
-
promise = request.run_promise do |req|
|
615
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
616
|
-
end
|
617
|
-
|
618
|
-
promise = promise.then do |http_response|
|
604
|
+
promise = promise.then do |result|
|
605
|
+
http_response = result.response
|
619
606
|
status_code = http_response.status
|
620
607
|
response_content = http_response.body
|
621
608
|
unless status_code == 200
|
622
609
|
error_model = JSON.load(response_content)
|
623
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
610
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
624
611
|
end
|
625
612
|
|
626
|
-
# Create Result
|
627
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
628
613
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
629
614
|
# Deserialize Response
|
630
615
|
if status_code == 200
|