azure_mgmt_devtestlabs 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_devtestlabs/artifact_operations.rb +38 -50
- data/lib/generated/azure_mgmt_devtestlabs/artifact_source_operations.rb +56 -74
- data/lib/generated/azure_mgmt_devtestlabs/cost_operations.rb +9 -12
- data/lib/generated/azure_mgmt_devtestlabs/custom_image_operations.rb +47 -62
- data/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +55 -4
- data/lib/generated/azure_mgmt_devtestlabs/formula_operations.rb +47 -62
- data/lib/generated/azure_mgmt_devtestlabs/gallery_image_operations.rb +20 -26
- data/lib/generated/azure_mgmt_devtestlabs/lab_operations.rb +114 -150
- data/lib/generated/azure_mgmt_devtestlabs/policy_operations.rb +56 -74
- data/lib/generated/azure_mgmt_devtestlabs/policy_set.rb +9 -12
- data/lib/generated/azure_mgmt_devtestlabs/schedule_operations.rb +65 -86
- data/lib/generated/azure_mgmt_devtestlabs/version.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/virtual_machine.rb +83 -110
- data/lib/generated/azure_mgmt_devtestlabs/virtual_network_operations.rb +56 -74
- metadata +5 -5
@@ -42,8 +42,8 @@ module Azure::ARM::DevTestLabs
|
|
42
42
|
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
43
43
|
unless response.nil?
|
44
44
|
page = response.body
|
45
|
-
page.next_method = Proc.new do |
|
46
|
-
list_next_async(
|
45
|
+
page.next_method = Proc.new do |next_page_link|
|
46
|
+
list_next_async(next_page_link, custom_headers)
|
47
47
|
end
|
48
48
|
page
|
49
49
|
end
|
@@ -116,30 +116,27 @@ module Azure::ARM::DevTestLabs
|
|
116
116
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
117
117
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
118
118
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'
|
119
|
+
|
120
|
+
request_url = @base_url || @client.base_url
|
121
|
+
|
119
122
|
options = {
|
120
123
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
121
124
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name},
|
122
125
|
query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
|
123
|
-
headers: request_headers.merge(custom_headers || {})
|
126
|
+
headers: request_headers.merge(custom_headers || {}),
|
127
|
+
base_url: request_url
|
124
128
|
}
|
129
|
+
promise = @client.make_request_async(:get, path_template, options)
|
125
130
|
|
126
|
-
|
127
|
-
|
128
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
129
|
-
promise = request.run_promise do |req|
|
130
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
131
|
-
end
|
132
|
-
|
133
|
-
promise = promise.then do |http_response|
|
131
|
+
promise = promise.then do |result|
|
132
|
+
http_response = result.response
|
134
133
|
status_code = http_response.status
|
135
134
|
response_content = http_response.body
|
136
135
|
unless status_code == 200
|
137
136
|
error_model = JSON.load(response_content)
|
138
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
137
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
139
138
|
end
|
140
139
|
|
141
|
-
# Create Result
|
142
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
143
140
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
144
141
|
# Deserialize Response
|
145
142
|
if status_code == 200
|
@@ -214,30 +211,27 @@ module Azure::ARM::DevTestLabs
|
|
214
211
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
215
212
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
216
213
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'
|
214
|
+
|
215
|
+
request_url = @base_url || @client.base_url
|
216
|
+
|
217
217
|
options = {
|
218
218
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
219
219
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
220
220
|
query_params: {'api-version' => @client.api_version},
|
221
|
-
headers: request_headers.merge(custom_headers || {})
|
221
|
+
headers: request_headers.merge(custom_headers || {}),
|
222
|
+
base_url: request_url
|
222
223
|
}
|
224
|
+
promise = @client.make_request_async(:get, path_template, options)
|
223
225
|
|
224
|
-
|
225
|
-
|
226
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
227
|
-
promise = request.run_promise do |req|
|
228
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
229
|
-
end
|
230
|
-
|
231
|
-
promise = promise.then do |http_response|
|
226
|
+
promise = promise.then do |result|
|
227
|
+
http_response = result.response
|
232
228
|
status_code = http_response.status
|
233
229
|
response_content = http_response.body
|
234
230
|
unless status_code == 200
|
235
231
|
error_model = JSON.load(response_content)
|
236
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
232
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
237
233
|
end
|
238
234
|
|
239
|
-
# Create Result
|
240
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
241
235
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
242
236
|
# Deserialize Response
|
243
237
|
if status_code == 200
|
@@ -374,31 +368,28 @@ module Azure::ARM::DevTestLabs
|
|
374
368
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
375
369
|
|
376
370
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'
|
371
|
+
|
372
|
+
request_url = @base_url || @client.base_url
|
373
|
+
|
377
374
|
options = {
|
378
375
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
379
376
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
380
377
|
query_params: {'api-version' => @client.api_version},
|
381
378
|
body: request_content,
|
382
|
-
headers: request_headers.merge(custom_headers || {})
|
379
|
+
headers: request_headers.merge(custom_headers || {}),
|
380
|
+
base_url: request_url
|
383
381
|
}
|
382
|
+
promise = @client.make_request_async(:put, path_template, options)
|
384
383
|
|
385
|
-
|
386
|
-
|
387
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
388
|
-
promise = request.run_promise do |req|
|
389
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
390
|
-
end
|
391
|
-
|
392
|
-
promise = promise.then do |http_response|
|
384
|
+
promise = promise.then do |result|
|
385
|
+
http_response = result.response
|
393
386
|
status_code = http_response.status
|
394
387
|
response_content = http_response.body
|
395
388
|
unless status_code == 200 || status_code == 201
|
396
389
|
error_model = JSON.load(response_content)
|
397
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
390
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
398
391
|
end
|
399
392
|
|
400
|
-
# Create Result
|
401
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
402
393
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
403
394
|
# Deserialize Response
|
404
395
|
if status_code == 200
|
@@ -522,30 +513,27 @@ module Azure::ARM::DevTestLabs
|
|
522
513
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
523
514
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
524
515
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'
|
516
|
+
|
517
|
+
request_url = @base_url || @client.base_url
|
518
|
+
|
525
519
|
options = {
|
526
520
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
527
521
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
528
522
|
query_params: {'api-version' => @client.api_version},
|
529
|
-
headers: request_headers.merge(custom_headers || {})
|
523
|
+
headers: request_headers.merge(custom_headers || {}),
|
524
|
+
base_url: request_url
|
530
525
|
}
|
526
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
531
527
|
|
532
|
-
|
533
|
-
|
534
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
535
|
-
promise = request.run_promise do |req|
|
536
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
537
|
-
end
|
538
|
-
|
539
|
-
promise = promise.then do |http_response|
|
528
|
+
promise = promise.then do |result|
|
529
|
+
http_response = result.response
|
540
530
|
status_code = http_response.status
|
541
531
|
response_content = http_response.body
|
542
532
|
unless status_code == 202 || status_code == 204
|
543
533
|
error_model = JSON.load(response_content)
|
544
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
534
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
545
535
|
end
|
546
536
|
|
547
|
-
# Create Result
|
548
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
549
537
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
550
538
|
|
551
539
|
result
|
@@ -622,31 +610,28 @@ module Azure::ARM::DevTestLabs
|
|
622
610
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
623
611
|
|
624
612
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'
|
613
|
+
|
614
|
+
request_url = @base_url || @client.base_url
|
615
|
+
|
625
616
|
options = {
|
626
617
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
627
618
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
628
619
|
query_params: {'api-version' => @client.api_version},
|
629
620
|
body: request_content,
|
630
|
-
headers: request_headers.merge(custom_headers || {})
|
621
|
+
headers: request_headers.merge(custom_headers || {}),
|
622
|
+
base_url: request_url
|
631
623
|
}
|
624
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
632
625
|
|
633
|
-
|
634
|
-
|
635
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
636
|
-
promise = request.run_promise do |req|
|
637
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
638
|
-
end
|
639
|
-
|
640
|
-
promise = promise.then do |http_response|
|
626
|
+
promise = promise.then do |result|
|
627
|
+
http_response = result.response
|
641
628
|
status_code = http_response.status
|
642
629
|
response_content = http_response.body
|
643
630
|
unless status_code == 200
|
644
631
|
error_model = JSON.load(response_content)
|
645
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
632
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
646
633
|
end
|
647
634
|
|
648
|
-
# Create Result
|
649
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
650
635
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
651
636
|
# Deserialize Response
|
652
637
|
if status_code == 200
|
@@ -774,31 +759,28 @@ module Azure::ARM::DevTestLabs
|
|
774
759
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
775
760
|
|
776
761
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts'
|
762
|
+
|
763
|
+
request_url = @base_url || @client.base_url
|
764
|
+
|
777
765
|
options = {
|
778
766
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
779
767
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
780
768
|
query_params: {'api-version' => @client.api_version},
|
781
769
|
body: request_content,
|
782
|
-
headers: request_headers.merge(custom_headers || {})
|
770
|
+
headers: request_headers.merge(custom_headers || {}),
|
771
|
+
base_url: request_url
|
783
772
|
}
|
773
|
+
promise = @client.make_request_async(:post, path_template, options)
|
784
774
|
|
785
|
-
|
786
|
-
|
787
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
788
|
-
promise = request.run_promise do |req|
|
789
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
790
|
-
end
|
791
|
-
|
792
|
-
promise = promise.then do |http_response|
|
775
|
+
promise = promise.then do |result|
|
776
|
+
http_response = result.response
|
793
777
|
status_code = http_response.status
|
794
778
|
response_content = http_response.body
|
795
779
|
unless status_code == 200 || status_code == 202
|
796
780
|
error_model = JSON.load(response_content)
|
797
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
781
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
798
782
|
end
|
799
783
|
|
800
|
-
# Create Result
|
801
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
802
784
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
803
785
|
|
804
786
|
result
|
@@ -902,30 +884,27 @@ module Azure::ARM::DevTestLabs
|
|
902
884
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
903
885
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
904
886
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start'
|
887
|
+
|
888
|
+
request_url = @base_url || @client.base_url
|
889
|
+
|
905
890
|
options = {
|
906
891
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
907
892
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
908
893
|
query_params: {'api-version' => @client.api_version},
|
909
|
-
headers: request_headers.merge(custom_headers || {})
|
894
|
+
headers: request_headers.merge(custom_headers || {}),
|
895
|
+
base_url: request_url
|
910
896
|
}
|
897
|
+
promise = @client.make_request_async(:post, path_template, options)
|
911
898
|
|
912
|
-
|
913
|
-
|
914
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
915
|
-
promise = request.run_promise do |req|
|
916
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
917
|
-
end
|
918
|
-
|
919
|
-
promise = promise.then do |http_response|
|
899
|
+
promise = promise.then do |result|
|
900
|
+
http_response = result.response
|
920
901
|
status_code = http_response.status
|
921
902
|
response_content = http_response.body
|
922
903
|
unless status_code == 200 || status_code == 202
|
923
904
|
error_model = JSON.load(response_content)
|
924
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
905
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
925
906
|
end
|
926
907
|
|
927
|
-
# Create Result
|
928
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
929
908
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
930
909
|
|
931
910
|
result
|
@@ -1029,30 +1008,27 @@ module Azure::ARM::DevTestLabs
|
|
1029
1008
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1030
1009
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1031
1010
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop'
|
1011
|
+
|
1012
|
+
request_url = @base_url || @client.base_url
|
1013
|
+
|
1032
1014
|
options = {
|
1033
1015
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1034
1016
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
1035
1017
|
query_params: {'api-version' => @client.api_version},
|
1036
|
-
headers: request_headers.merge(custom_headers || {})
|
1018
|
+
headers: request_headers.merge(custom_headers || {}),
|
1019
|
+
base_url: request_url
|
1037
1020
|
}
|
1021
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1038
1022
|
|
1039
|
-
|
1040
|
-
|
1041
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
1042
|
-
promise = request.run_promise do |req|
|
1043
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1044
|
-
end
|
1045
|
-
|
1046
|
-
promise = promise.then do |http_response|
|
1023
|
+
promise = promise.then do |result|
|
1024
|
+
http_response = result.response
|
1047
1025
|
status_code = http_response.status
|
1048
1026
|
response_content = http_response.body
|
1049
1027
|
unless status_code == 200 || status_code == 202
|
1050
1028
|
error_model = JSON.load(response_content)
|
1051
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1029
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1052
1030
|
end
|
1053
1031
|
|
1054
|
-
# Create Result
|
1055
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1056
1032
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1057
1033
|
|
1058
1034
|
result
|
@@ -1110,29 +1086,26 @@ module Azure::ARM::DevTestLabs
|
|
1110
1086
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1111
1087
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1112
1088
|
path_template = '{nextLink}'
|
1089
|
+
|
1090
|
+
request_url = @base_url || @client.base_url
|
1091
|
+
|
1113
1092
|
options = {
|
1114
1093
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1115
1094
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1116
|
-
headers: request_headers.merge(custom_headers || {})
|
1095
|
+
headers: request_headers.merge(custom_headers || {}),
|
1096
|
+
base_url: request_url
|
1117
1097
|
}
|
1098
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1118
1099
|
|
1119
|
-
|
1120
|
-
|
1121
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1122
|
-
promise = request.run_promise do |req|
|
1123
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1124
|
-
end
|
1125
|
-
|
1126
|
-
promise = promise.then do |http_response|
|
1100
|
+
promise = promise.then do |result|
|
1101
|
+
http_response = result.response
|
1127
1102
|
status_code = http_response.status
|
1128
1103
|
response_content = http_response.body
|
1129
1104
|
unless status_code == 200
|
1130
1105
|
error_model = JSON.load(response_content)
|
1131
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1106
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1132
1107
|
end
|
1133
1108
|
|
1134
|
-
# Create Result
|
1135
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1136
1109
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1137
1110
|
# Deserialize Response
|
1138
1111
|
if status_code == 200
|
@@ -42,8 +42,8 @@ module Azure::ARM::DevTestLabs
|
|
42
42
|
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
43
43
|
unless response.nil?
|
44
44
|
page = response.body
|
45
|
-
page.next_method = Proc.new do |
|
46
|
-
list_next_async(
|
45
|
+
page.next_method = Proc.new do |next_page_link|
|
46
|
+
list_next_async(next_page_link, custom_headers)
|
47
47
|
end
|
48
48
|
page
|
49
49
|
end
|
@@ -116,30 +116,27 @@ module Azure::ARM::DevTestLabs
|
|
116
116
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
117
117
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
118
118
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'
|
119
|
+
|
120
|
+
request_url = @base_url || @client.base_url
|
121
|
+
|
119
122
|
options = {
|
120
123
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
121
124
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name},
|
122
125
|
query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
|
123
|
-
headers: request_headers.merge(custom_headers || {})
|
126
|
+
headers: request_headers.merge(custom_headers || {}),
|
127
|
+
base_url: request_url
|
124
128
|
}
|
129
|
+
promise = @client.make_request_async(:get, path_template, options)
|
125
130
|
|
126
|
-
|
127
|
-
|
128
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
129
|
-
promise = request.run_promise do |req|
|
130
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
131
|
-
end
|
132
|
-
|
133
|
-
promise = promise.then do |http_response|
|
131
|
+
promise = promise.then do |result|
|
132
|
+
http_response = result.response
|
134
133
|
status_code = http_response.status
|
135
134
|
response_content = http_response.body
|
136
135
|
unless status_code == 200
|
137
136
|
error_model = JSON.load(response_content)
|
138
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
137
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
139
138
|
end
|
140
139
|
|
141
|
-
# Create Result
|
142
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
143
140
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
144
141
|
# Deserialize Response
|
145
142
|
if status_code == 200
|
@@ -214,30 +211,27 @@ module Azure::ARM::DevTestLabs
|
|
214
211
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
215
212
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
216
213
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'
|
214
|
+
|
215
|
+
request_url = @base_url || @client.base_url
|
216
|
+
|
217
217
|
options = {
|
218
218
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
219
219
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
220
220
|
query_params: {'api-version' => @client.api_version},
|
221
|
-
headers: request_headers.merge(custom_headers || {})
|
221
|
+
headers: request_headers.merge(custom_headers || {}),
|
222
|
+
base_url: request_url
|
222
223
|
}
|
224
|
+
promise = @client.make_request_async(:get, path_template, options)
|
223
225
|
|
224
|
-
|
225
|
-
|
226
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
227
|
-
promise = request.run_promise do |req|
|
228
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
229
|
-
end
|
230
|
-
|
231
|
-
promise = promise.then do |http_response|
|
226
|
+
promise = promise.then do |result|
|
227
|
+
http_response = result.response
|
232
228
|
status_code = http_response.status
|
233
229
|
response_content = http_response.body
|
234
230
|
unless status_code == 200
|
235
231
|
error_model = JSON.load(response_content)
|
236
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
232
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
237
233
|
end
|
238
234
|
|
239
|
-
# Create Result
|
240
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
241
235
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
242
236
|
# Deserialize Response
|
243
237
|
if status_code == 200
|
@@ -374,31 +368,28 @@ module Azure::ARM::DevTestLabs
|
|
374
368
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
375
369
|
|
376
370
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'
|
371
|
+
|
372
|
+
request_url = @base_url || @client.base_url
|
373
|
+
|
377
374
|
options = {
|
378
375
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
379
376
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
380
377
|
query_params: {'api-version' => @client.api_version},
|
381
378
|
body: request_content,
|
382
|
-
headers: request_headers.merge(custom_headers || {})
|
379
|
+
headers: request_headers.merge(custom_headers || {}),
|
380
|
+
base_url: request_url
|
383
381
|
}
|
382
|
+
promise = @client.make_request_async(:put, path_template, options)
|
384
383
|
|
385
|
-
|
386
|
-
|
387
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
388
|
-
promise = request.run_promise do |req|
|
389
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
390
|
-
end
|
391
|
-
|
392
|
-
promise = promise.then do |http_response|
|
384
|
+
promise = promise.then do |result|
|
385
|
+
http_response = result.response
|
393
386
|
status_code = http_response.status
|
394
387
|
response_content = http_response.body
|
395
388
|
unless status_code == 200 || status_code == 201
|
396
389
|
error_model = JSON.load(response_content)
|
397
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
390
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
398
391
|
end
|
399
392
|
|
400
|
-
# Create Result
|
401
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
402
393
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
403
394
|
# Deserialize Response
|
404
395
|
if status_code == 200
|
@@ -522,30 +513,27 @@ module Azure::ARM::DevTestLabs
|
|
522
513
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
523
514
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
524
515
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'
|
516
|
+
|
517
|
+
request_url = @base_url || @client.base_url
|
518
|
+
|
525
519
|
options = {
|
526
520
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
527
521
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
528
522
|
query_params: {'api-version' => @client.api_version},
|
529
|
-
headers: request_headers.merge(custom_headers || {})
|
523
|
+
headers: request_headers.merge(custom_headers || {}),
|
524
|
+
base_url: request_url
|
530
525
|
}
|
526
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
531
527
|
|
532
|
-
|
533
|
-
|
534
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
535
|
-
promise = request.run_promise do |req|
|
536
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
537
|
-
end
|
538
|
-
|
539
|
-
promise = promise.then do |http_response|
|
528
|
+
promise = promise.then do |result|
|
529
|
+
http_response = result.response
|
540
530
|
status_code = http_response.status
|
541
531
|
response_content = http_response.body
|
542
532
|
unless status_code == 202 || status_code == 204
|
543
533
|
error_model = JSON.load(response_content)
|
544
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
534
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
545
535
|
end
|
546
536
|
|
547
|
-
# Create Result
|
548
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
549
537
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
550
538
|
|
551
539
|
result
|
@@ -622,31 +610,28 @@ module Azure::ARM::DevTestLabs
|
|
622
610
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
623
611
|
|
624
612
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'
|
613
|
+
|
614
|
+
request_url = @base_url || @client.base_url
|
615
|
+
|
625
616
|
options = {
|
626
617
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
627
618
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
628
619
|
query_params: {'api-version' => @client.api_version},
|
629
620
|
body: request_content,
|
630
|
-
headers: request_headers.merge(custom_headers || {})
|
621
|
+
headers: request_headers.merge(custom_headers || {}),
|
622
|
+
base_url: request_url
|
631
623
|
}
|
624
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
632
625
|
|
633
|
-
|
634
|
-
|
635
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
636
|
-
promise = request.run_promise do |req|
|
637
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
638
|
-
end
|
639
|
-
|
640
|
-
promise = promise.then do |http_response|
|
626
|
+
promise = promise.then do |result|
|
627
|
+
http_response = result.response
|
641
628
|
status_code = http_response.status
|
642
629
|
response_content = http_response.body
|
643
630
|
unless status_code == 200
|
644
631
|
error_model = JSON.load(response_content)
|
645
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
632
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
646
633
|
end
|
647
634
|
|
648
|
-
# Create Result
|
649
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
650
635
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
651
636
|
# Deserialize Response
|
652
637
|
if status_code == 200
|
@@ -714,29 +699,26 @@ module Azure::ARM::DevTestLabs
|
|
714
699
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
715
700
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
716
701
|
path_template = '{nextLink}'
|
702
|
+
|
703
|
+
request_url = @base_url || @client.base_url
|
704
|
+
|
717
705
|
options = {
|
718
706
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
719
707
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
720
|
-
headers: request_headers.merge(custom_headers || {})
|
708
|
+
headers: request_headers.merge(custom_headers || {}),
|
709
|
+
base_url: request_url
|
721
710
|
}
|
711
|
+
promise = @client.make_request_async(:get, path_template, options)
|
722
712
|
|
723
|
-
|
724
|
-
|
725
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
726
|
-
promise = request.run_promise do |req|
|
727
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
728
|
-
end
|
729
|
-
|
730
|
-
promise = promise.then do |http_response|
|
713
|
+
promise = promise.then do |result|
|
714
|
+
http_response = result.response
|
731
715
|
status_code = http_response.status
|
732
716
|
response_content = http_response.body
|
733
717
|
unless status_code == 200
|
734
718
|
error_model = JSON.load(response_content)
|
735
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
719
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
736
720
|
end
|
737
721
|
|
738
|
-
# Create Result
|
739
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
740
722
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
741
723
|
# Deserialize Response
|
742
724
|
if status_code == 200
|