azure_mgmt_server_management 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_server_management/gateway.rb +103 -136
- data/lib/generated/azure_mgmt_server_management/node.rb +76 -100
- data/lib/generated/azure_mgmt_server_management/power_shell.rb +63 -84
- data/lib/generated/azure_mgmt_server_management/server_management.rb +55 -4
- data/lib/generated/azure_mgmt_server_management/session.rb +27 -36
- data/lib/generated/azure_mgmt_server_management/version.rb +1 -1
- metadata +5 -5
@@ -168,31 +168,28 @@ module Azure::ARM::ServerManagement
|
|
168
168
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
169
169
|
|
170
170
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
171
|
+
|
172
|
+
request_url = @base_url || @client.base_url
|
173
|
+
|
171
174
|
options = {
|
172
175
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
173
176
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
174
177
|
query_params: {'api-version' => @client.api_version},
|
175
178
|
body: request_content,
|
176
|
-
headers: request_headers.merge(custom_headers || {})
|
179
|
+
headers: request_headers.merge(custom_headers || {}),
|
180
|
+
base_url: request_url
|
177
181
|
}
|
182
|
+
promise = @client.make_request_async(:put, path_template, options)
|
178
183
|
|
179
|
-
|
180
|
-
|
181
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
182
|
-
promise = request.run_promise do |req|
|
183
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
184
|
-
end
|
185
|
-
|
186
|
-
promise = promise.then do |http_response|
|
184
|
+
promise = promise.then do |result|
|
185
|
+
http_response = result.response
|
187
186
|
status_code = http_response.status
|
188
187
|
response_content = http_response.body
|
189
188
|
unless status_code == 200 || status_code == 201 || status_code == 202
|
190
189
|
error_model = JSON.load(response_content)
|
191
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
190
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
192
191
|
end
|
193
192
|
|
194
|
-
# Create Result
|
195
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
196
193
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
197
194
|
# Deserialize Response
|
198
195
|
if status_code == 200
|
@@ -367,31 +364,28 @@ module Azure::ARM::ServerManagement
|
|
367
364
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
368
365
|
|
369
366
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
367
|
+
|
368
|
+
request_url = @base_url || @client.base_url
|
369
|
+
|
370
370
|
options = {
|
371
371
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
372
372
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
373
373
|
query_params: {'api-version' => @client.api_version},
|
374
374
|
body: request_content,
|
375
|
-
headers: request_headers.merge(custom_headers || {})
|
375
|
+
headers: request_headers.merge(custom_headers || {}),
|
376
|
+
base_url: request_url
|
376
377
|
}
|
378
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
377
379
|
|
378
|
-
|
379
|
-
|
380
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
381
|
-
promise = request.run_promise do |req|
|
382
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
383
|
-
end
|
384
|
-
|
385
|
-
promise = promise.then do |http_response|
|
380
|
+
promise = promise.then do |result|
|
381
|
+
http_response = result.response
|
386
382
|
status_code = http_response.status
|
387
383
|
response_content = http_response.body
|
388
384
|
unless status_code == 200 || status_code == 202
|
389
385
|
error_model = JSON.load(response_content)
|
390
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
386
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
391
387
|
end
|
392
388
|
|
393
|
-
# Create Result
|
394
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
395
389
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
396
390
|
# Deserialize Response
|
397
391
|
if status_code == 200
|
@@ -464,30 +458,27 @@ module Azure::ARM::ServerManagement
|
|
464
458
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
465
459
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
466
460
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
461
|
+
|
462
|
+
request_url = @base_url || @client.base_url
|
463
|
+
|
467
464
|
options = {
|
468
465
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
469
466
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
470
467
|
query_params: {'api-version' => @client.api_version},
|
471
|
-
headers: request_headers.merge(custom_headers || {})
|
468
|
+
headers: request_headers.merge(custom_headers || {}),
|
469
|
+
base_url: request_url
|
472
470
|
}
|
471
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
473
472
|
|
474
|
-
|
475
|
-
|
476
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
477
|
-
promise = request.run_promise do |req|
|
478
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
479
|
-
end
|
480
|
-
|
481
|
-
promise = promise.then do |http_response|
|
473
|
+
promise = promise.then do |result|
|
474
|
+
http_response = result.response
|
482
475
|
status_code = http_response.status
|
483
476
|
response_content = http_response.body
|
484
477
|
unless status_code == 200 || status_code == 204
|
485
478
|
error_model = JSON.load(response_content)
|
486
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
479
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
487
480
|
end
|
488
481
|
|
489
|
-
# Create Result
|
490
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
491
482
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
492
483
|
|
493
484
|
result
|
@@ -551,30 +542,27 @@ module Azure::ARM::ServerManagement
|
|
551
542
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
552
543
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
553
544
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
545
|
+
|
546
|
+
request_url = @base_url || @client.base_url
|
547
|
+
|
554
548
|
options = {
|
555
549
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
556
550
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
557
551
|
query_params: {'api-version' => @client.api_version},
|
558
|
-
headers: request_headers.merge(custom_headers || {})
|
552
|
+
headers: request_headers.merge(custom_headers || {}),
|
553
|
+
base_url: request_url
|
559
554
|
}
|
555
|
+
promise = @client.make_request_async(:get, path_template, options)
|
560
556
|
|
561
|
-
|
562
|
-
|
563
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
564
|
-
promise = request.run_promise do |req|
|
565
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
566
|
-
end
|
567
|
-
|
568
|
-
promise = promise.then do |http_response|
|
557
|
+
promise = promise.then do |result|
|
558
|
+
http_response = result.response
|
569
559
|
status_code = http_response.status
|
570
560
|
response_content = http_response.body
|
571
561
|
unless status_code == 200
|
572
562
|
error_model = JSON.load(response_content)
|
573
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
563
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
574
564
|
end
|
575
565
|
|
576
|
-
# Create Result
|
577
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
578
566
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
579
567
|
# Deserialize Response
|
580
568
|
if status_code == 200
|
@@ -605,8 +593,8 @@ module Azure::ARM::ServerManagement
|
|
605
593
|
response = list_async(custom_headers).value!
|
606
594
|
unless response.nil?
|
607
595
|
page = response.body
|
608
|
-
page.next_method = Proc.new do |
|
609
|
-
list_next_async(
|
596
|
+
page.next_method = Proc.new do |next_page_link|
|
597
|
+
list_next_async(next_page_link, custom_headers)
|
610
598
|
end
|
611
599
|
page
|
612
600
|
end
|
@@ -656,30 +644,27 @@ module Azure::ARM::ServerManagement
|
|
656
644
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
657
645
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
658
646
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/nodes'
|
647
|
+
|
648
|
+
request_url = @base_url || @client.base_url
|
649
|
+
|
659
650
|
options = {
|
660
651
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
661
652
|
path_params: {'subscriptionId' => @client.subscription_id},
|
662
653
|
query_params: {'api-version' => @client.api_version},
|
663
|
-
headers: request_headers.merge(custom_headers || {})
|
654
|
+
headers: request_headers.merge(custom_headers || {}),
|
655
|
+
base_url: request_url
|
664
656
|
}
|
657
|
+
promise = @client.make_request_async(:get, path_template, options)
|
665
658
|
|
666
|
-
|
667
|
-
|
668
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
669
|
-
promise = request.run_promise do |req|
|
670
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
671
|
-
end
|
672
|
-
|
673
|
-
promise = promise.then do |http_response|
|
659
|
+
promise = promise.then do |result|
|
660
|
+
http_response = result.response
|
674
661
|
status_code = http_response.status
|
675
662
|
response_content = http_response.body
|
676
663
|
unless status_code == 200
|
677
664
|
error_model = JSON.load(response_content)
|
678
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
665
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
679
666
|
end
|
680
667
|
|
681
|
-
# Create Result
|
682
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
683
668
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
684
669
|
# Deserialize Response
|
685
670
|
if status_code == 200
|
@@ -712,8 +697,8 @@ module Azure::ARM::ServerManagement
|
|
712
697
|
response = list_for_resource_group_async(resource_group_name, custom_headers).value!
|
713
698
|
unless response.nil?
|
714
699
|
page = response.body
|
715
|
-
page.next_method = Proc.new do |
|
716
|
-
list_for_resource_group_next_async(
|
700
|
+
page.next_method = Proc.new do |next_page_link|
|
701
|
+
list_for_resource_group_next_async(next_page_link, custom_headers)
|
717
702
|
end
|
718
703
|
page
|
719
704
|
end
|
@@ -770,30 +755,27 @@ module Azure::ARM::ServerManagement
|
|
770
755
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
771
756
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
772
757
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes'
|
758
|
+
|
759
|
+
request_url = @base_url || @client.base_url
|
760
|
+
|
773
761
|
options = {
|
774
762
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
775
763
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
776
764
|
query_params: {'api-version' => @client.api_version},
|
777
|
-
headers: request_headers.merge(custom_headers || {})
|
765
|
+
headers: request_headers.merge(custom_headers || {}),
|
766
|
+
base_url: request_url
|
778
767
|
}
|
768
|
+
promise = @client.make_request_async(:get, path_template, options)
|
779
769
|
|
780
|
-
|
781
|
-
|
782
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
783
|
-
promise = request.run_promise do |req|
|
784
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
785
|
-
end
|
786
|
-
|
787
|
-
promise = promise.then do |http_response|
|
770
|
+
promise = promise.then do |result|
|
771
|
+
http_response = result.response
|
788
772
|
status_code = http_response.status
|
789
773
|
response_content = http_response.body
|
790
774
|
unless status_code == 200
|
791
775
|
error_model = JSON.load(response_content)
|
792
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
776
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
793
777
|
end
|
794
778
|
|
795
|
-
# Create Result
|
796
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
797
779
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
798
780
|
# Deserialize Response
|
799
781
|
if status_code == 200
|
@@ -861,29 +843,26 @@ module Azure::ARM::ServerManagement
|
|
861
843
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
862
844
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
863
845
|
path_template = '{nextLink}'
|
846
|
+
|
847
|
+
request_url = @base_url || @client.base_url
|
848
|
+
|
864
849
|
options = {
|
865
850
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
866
851
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
867
|
-
headers: request_headers.merge(custom_headers || {})
|
852
|
+
headers: request_headers.merge(custom_headers || {}),
|
853
|
+
base_url: request_url
|
868
854
|
}
|
855
|
+
promise = @client.make_request_async(:get, path_template, options)
|
869
856
|
|
870
|
-
|
871
|
-
|
872
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
873
|
-
promise = request.run_promise do |req|
|
874
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
875
|
-
end
|
876
|
-
|
877
|
-
promise = promise.then do |http_response|
|
857
|
+
promise = promise.then do |result|
|
858
|
+
http_response = result.response
|
878
859
|
status_code = http_response.status
|
879
860
|
response_content = http_response.body
|
880
861
|
unless status_code == 200
|
881
862
|
error_model = JSON.load(response_content)
|
882
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
863
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
883
864
|
end
|
884
865
|
|
885
|
-
# Create Result
|
886
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
887
866
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
888
867
|
# Deserialize Response
|
889
868
|
if status_code == 200
|
@@ -951,29 +930,26 @@ module Azure::ARM::ServerManagement
|
|
951
930
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
952
931
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
953
932
|
path_template = '{nextLink}'
|
933
|
+
|
934
|
+
request_url = @base_url || @client.base_url
|
935
|
+
|
954
936
|
options = {
|
955
937
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
956
938
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
957
|
-
headers: request_headers.merge(custom_headers || {})
|
939
|
+
headers: request_headers.merge(custom_headers || {}),
|
940
|
+
base_url: request_url
|
958
941
|
}
|
942
|
+
promise = @client.make_request_async(:get, path_template, options)
|
959
943
|
|
960
|
-
|
961
|
-
|
962
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
963
|
-
promise = request.run_promise do |req|
|
964
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
965
|
-
end
|
966
|
-
|
967
|
-
promise = promise.then do |http_response|
|
944
|
+
promise = promise.then do |result|
|
945
|
+
http_response = result.response
|
968
946
|
status_code = http_response.status
|
969
947
|
response_content = http_response.body
|
970
948
|
unless status_code == 200
|
971
949
|
error_model = JSON.load(response_content)
|
972
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
950
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
973
951
|
end
|
974
952
|
|
975
|
-
# Create Result
|
976
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
977
953
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
978
954
|
# Deserialize Response
|
979
955
|
if status_code == 200
|
@@ -81,30 +81,27 @@ module Azure::ARM::ServerManagement
|
|
81
81
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
82
82
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
83
83
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions'
|
84
|
+
|
85
|
+
request_url = @base_url || @client.base_url
|
86
|
+
|
84
87
|
options = {
|
85
88
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
86
89
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session},
|
87
90
|
query_params: {'api-version' => @client.api_version},
|
88
|
-
headers: request_headers.merge(custom_headers || {})
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
89
93
|
}
|
94
|
+
promise = @client.make_request_async(:get, path_template, options)
|
90
95
|
|
91
|
-
|
92
|
-
|
93
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
94
|
-
promise = request.run_promise do |req|
|
95
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
96
|
-
end
|
97
|
-
|
98
|
-
promise = promise.then do |http_response|
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
99
98
|
status_code = http_response.status
|
100
99
|
response_content = http_response.body
|
101
100
|
unless status_code == 200
|
102
101
|
error_model = JSON.load(response_content)
|
103
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
102
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
104
103
|
end
|
105
104
|
|
106
|
-
# Create Result
|
107
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
108
105
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
109
106
|
# Deserialize Response
|
110
107
|
if status_code == 200
|
@@ -234,30 +231,27 @@ module Azure::ARM::ServerManagement
|
|
234
231
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
235
232
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
236
233
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'
|
234
|
+
|
235
|
+
request_url = @base_url || @client.base_url
|
236
|
+
|
237
237
|
options = {
|
238
238
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
239
239
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
240
240
|
query_params: {'api-version' => @client.api_version},
|
241
|
-
headers: request_headers.merge(custom_headers || {})
|
241
|
+
headers: request_headers.merge(custom_headers || {}),
|
242
|
+
base_url: request_url
|
242
243
|
}
|
244
|
+
promise = @client.make_request_async(:put, path_template, options)
|
243
245
|
|
244
|
-
|
245
|
-
|
246
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
247
|
-
promise = request.run_promise do |req|
|
248
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
249
|
-
end
|
250
|
-
|
251
|
-
promise = promise.then do |http_response|
|
246
|
+
promise = promise.then do |result|
|
247
|
+
http_response = result.response
|
252
248
|
status_code = http_response.status
|
253
249
|
response_content = http_response.body
|
254
250
|
unless status_code == 200 || status_code == 202
|
255
251
|
error_model = JSON.load(response_content)
|
256
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
252
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
257
253
|
end
|
258
254
|
|
259
|
-
# Create Result
|
260
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
261
255
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
262
256
|
# Deserialize Response
|
263
257
|
if status_code == 200
|
@@ -345,30 +339,27 @@ module Azure::ARM::ServerManagement
|
|
345
339
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
346
340
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
347
341
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'
|
342
|
+
|
343
|
+
request_url = @base_url || @client.base_url
|
344
|
+
|
348
345
|
options = {
|
349
346
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
350
347
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
351
348
|
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
352
|
-
headers: request_headers.merge(custom_headers || {})
|
349
|
+
headers: request_headers.merge(custom_headers || {}),
|
350
|
+
base_url: request_url
|
353
351
|
}
|
352
|
+
promise = @client.make_request_async(:get, path_template, options)
|
354
353
|
|
355
|
-
|
356
|
-
|
357
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
358
|
-
promise = request.run_promise do |req|
|
359
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
360
|
-
end
|
361
|
-
|
362
|
-
promise = promise.then do |http_response|
|
354
|
+
promise = promise.then do |result|
|
355
|
+
http_response = result.response
|
363
356
|
status_code = http_response.status
|
364
357
|
response_content = http_response.body
|
365
358
|
unless status_code == 200
|
366
359
|
error_model = JSON.load(response_content)
|
367
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
360
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
368
361
|
end
|
369
362
|
|
370
|
-
# Create Result
|
371
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
372
363
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
373
364
|
# Deserialize Response
|
374
365
|
if status_code == 200
|
@@ -498,30 +489,27 @@ module Azure::ARM::ServerManagement
|
|
498
489
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
499
490
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
500
491
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'
|
492
|
+
|
493
|
+
request_url = @base_url || @client.base_url
|
494
|
+
|
501
495
|
options = {
|
502
496
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
503
497
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
504
498
|
query_params: {'api-version' => @client.api_version},
|
505
|
-
headers: request_headers.merge(custom_headers || {})
|
499
|
+
headers: request_headers.merge(custom_headers || {}),
|
500
|
+
base_url: request_url
|
506
501
|
}
|
502
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
507
503
|
|
508
|
-
|
509
|
-
|
510
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
511
|
-
promise = request.run_promise do |req|
|
512
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
513
|
-
end
|
514
|
-
|
515
|
-
promise = promise.then do |http_response|
|
504
|
+
promise = promise.then do |result|
|
505
|
+
http_response = result.response
|
516
506
|
status_code = http_response.status
|
517
507
|
response_content = http_response.body
|
518
508
|
unless status_code == 200 || status_code == 202
|
519
509
|
error_model = JSON.load(response_content)
|
520
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
510
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
521
511
|
end
|
522
512
|
|
523
|
-
# Create Result
|
524
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
525
513
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
526
514
|
# Deserialize Response
|
527
515
|
if status_code == 200
|
@@ -668,31 +656,28 @@ module Azure::ARM::ServerManagement
|
|
668
656
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
669
657
|
|
670
658
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/invokeCommand'
|
659
|
+
|
660
|
+
request_url = @base_url || @client.base_url
|
661
|
+
|
671
662
|
options = {
|
672
663
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
673
664
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
674
665
|
query_params: {'api-version' => @client.api_version},
|
675
666
|
body: request_content,
|
676
|
-
headers: request_headers.merge(custom_headers || {})
|
667
|
+
headers: request_headers.merge(custom_headers || {}),
|
668
|
+
base_url: request_url
|
677
669
|
}
|
670
|
+
promise = @client.make_request_async(:post, path_template, options)
|
678
671
|
|
679
|
-
|
680
|
-
|
681
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
682
|
-
promise = request.run_promise do |req|
|
683
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
684
|
-
end
|
685
|
-
|
686
|
-
promise = promise.then do |http_response|
|
672
|
+
promise = promise.then do |result|
|
673
|
+
http_response = result.response
|
687
674
|
status_code = http_response.status
|
688
675
|
response_content = http_response.body
|
689
676
|
unless status_code == 200 || status_code == 202
|
690
677
|
error_model = JSON.load(response_content)
|
691
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
678
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
692
679
|
end
|
693
680
|
|
694
|
-
# Create Result
|
695
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
696
681
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
697
682
|
# Deserialize Response
|
698
683
|
if status_code == 200
|
@@ -822,30 +807,27 @@ module Azure::ARM::ServerManagement
|
|
822
807
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
823
808
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
824
809
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/cancel'
|
810
|
+
|
811
|
+
request_url = @base_url || @client.base_url
|
812
|
+
|
825
813
|
options = {
|
826
814
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
827
815
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
828
816
|
query_params: {'api-version' => @client.api_version},
|
829
|
-
headers: request_headers.merge(custom_headers || {})
|
817
|
+
headers: request_headers.merge(custom_headers || {}),
|
818
|
+
base_url: request_url
|
830
819
|
}
|
820
|
+
promise = @client.make_request_async(:post, path_template, options)
|
831
821
|
|
832
|
-
|
833
|
-
|
834
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
835
|
-
promise = request.run_promise do |req|
|
836
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
837
|
-
end
|
838
|
-
|
839
|
-
promise = promise.then do |http_response|
|
822
|
+
promise = promise.then do |result|
|
823
|
+
http_response = result.response
|
840
824
|
status_code = http_response.status
|
841
825
|
response_content = http_response.body
|
842
826
|
unless status_code == 200 || status_code == 202
|
843
827
|
error_model = JSON.load(response_content)
|
844
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
828
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
845
829
|
end
|
846
830
|
|
847
|
-
# Create Result
|
848
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
849
831
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
850
832
|
# Deserialize Response
|
851
833
|
if status_code == 200
|
@@ -942,31 +924,28 @@ module Azure::ARM::ServerManagement
|
|
942
924
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
943
925
|
|
944
926
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/tab'
|
927
|
+
|
928
|
+
request_url = @base_url || @client.base_url
|
929
|
+
|
945
930
|
options = {
|
946
931
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
947
932
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name,'session' => session,'pssession' => pssession},
|
948
933
|
query_params: {'api-version' => @client.api_version},
|
949
934
|
body: request_content,
|
950
|
-
headers: request_headers.merge(custom_headers || {})
|
935
|
+
headers: request_headers.merge(custom_headers || {}),
|
936
|
+
base_url: request_url
|
951
937
|
}
|
938
|
+
promise = @client.make_request_async(:post, path_template, options)
|
952
939
|
|
953
|
-
|
954
|
-
|
955
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
956
|
-
promise = request.run_promise do |req|
|
957
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
958
|
-
end
|
959
|
-
|
960
|
-
promise = promise.then do |http_response|
|
940
|
+
promise = promise.then do |result|
|
941
|
+
http_response = result.response
|
961
942
|
status_code = http_response.status
|
962
943
|
response_content = http_response.body
|
963
944
|
unless status_code == 200
|
964
945
|
error_model = JSON.load(response_content)
|
965
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
946
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
966
947
|
end
|
967
948
|
|
968
|
-
# Create Result
|
969
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
970
949
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
971
950
|
# Deserialize Response
|
972
951
|
if status_code == 200
|