azure_mgmt_dns 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 465329ff758e32f782f73a101f91b0a49c3a30e8
|
4
|
+
data.tar.gz: 5ef5dced9420cefefd1b66946229768644f8e25f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 999d95539f976e5ed64abd31b0abda05b7a5a53f7cc317f58815b3ea89c5af05f9f698a3054df6ac5d0ab0a12b3a7e782678d61c3a298d5978debe6d204b6b39
|
7
|
+
data.tar.gz: 3c54fb597f59568d5b85adb8d1d9583460894dc02b97db79369aaea1bea75196487e2028415e6a55e1996a9744eb3f90f2f500d4ce4dfee14745badfb5f88a98
|
@@ -36,10 +36,6 @@ module Azure::ARM::Dns
|
|
36
36
|
# is generated and included in each request. Default is true.
|
37
37
|
attr_accessor :generate_client_request_id
|
38
38
|
|
39
|
-
# @return Subscription credentials which uniquely identify client
|
40
|
-
# subscription.
|
41
|
-
attr_accessor :credentials
|
42
|
-
|
43
39
|
# @return [RecordSets] record_sets
|
44
40
|
attr_reader :record_sets
|
45
41
|
|
@@ -68,5 +64,60 @@ module Azure::ARM::Dns
|
|
68
64
|
@generate_client_request_id = true
|
69
65
|
end
|
70
66
|
|
67
|
+
#
|
68
|
+
# Makes a request and returns the body of the response.
|
69
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
70
|
+
# @param path [String] the path, relative to {base_url}.
|
71
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
72
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
73
|
+
# Example:
|
74
|
+
#
|
75
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
76
|
+
# path = "/path"
|
77
|
+
# options = {
|
78
|
+
# body: request_content,
|
79
|
+
# query_params: {'api-version' => '2016-02-01'}
|
80
|
+
# }
|
81
|
+
# result = @client.make_request(:put, path, options)
|
82
|
+
#
|
83
|
+
def make_request(method, path, options = {})
|
84
|
+
result = make_request_with_http_info(method, path, options)
|
85
|
+
result.body unless result.nil?
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# Makes a request and returns the operation response.
|
90
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
91
|
+
# @param path [String] the path, relative to {base_url}.
|
92
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
93
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
94
|
+
#
|
95
|
+
def make_request_with_http_info(method, path, options = {})
|
96
|
+
result = make_request_async(method, path, options).value!
|
97
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
98
|
+
result
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
# Makes a request asynchronously.
|
103
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
104
|
+
# @param path [String] the path, relative to {base_url}.
|
105
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
106
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
107
|
+
#
|
108
|
+
def make_request_async(method, path, options = {})
|
109
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
110
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
111
|
+
|
112
|
+
request_url = options[:base_url] || @base_url
|
113
|
+
|
114
|
+
request_headers = @request_headers
|
115
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
116
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
117
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
118
|
+
|
119
|
+
super(request_url, method, path, options)
|
120
|
+
end
|
121
|
+
|
71
122
|
end
|
72
123
|
end
|
@@ -111,32 +111,29 @@ module Azure::ARM::Dns
|
|
111
111
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
112
112
|
|
113
113
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}/{relativeRecordSetName}'
|
114
|
+
|
115
|
+
request_url = @base_url || @client.base_url
|
116
|
+
|
114
117
|
options = {
|
115
118
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
116
119
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'recordType' => record_type,'subscriptionId' => @client.subscription_id},
|
117
120
|
skip_encoding_path_params: {'relativeRecordSetName' => relative_record_set_name},
|
118
121
|
query_params: {'api-version' => @client.api_version},
|
119
122
|
body: request_content,
|
120
|
-
headers: request_headers.merge(custom_headers || {})
|
123
|
+
headers: request_headers.merge(custom_headers || {}),
|
124
|
+
base_url: request_url
|
121
125
|
}
|
126
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
122
127
|
|
123
|
-
|
124
|
-
|
125
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
126
|
-
promise = request.run_promise do |req|
|
127
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
128
|
-
end
|
129
|
-
|
130
|
-
promise = promise.then do |http_response|
|
128
|
+
promise = promise.then do |result|
|
129
|
+
http_response = result.response
|
131
130
|
status_code = http_response.status
|
132
131
|
response_content = http_response.body
|
133
132
|
unless status_code == 200
|
134
133
|
error_model = JSON.load(response_content)
|
135
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
134
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
136
135
|
end
|
137
136
|
|
138
|
-
# Create Result
|
139
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
140
137
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
141
138
|
# Deserialize Response
|
142
139
|
if status_code == 200
|
@@ -247,32 +244,29 @@ module Azure::ARM::Dns
|
|
247
244
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
248
245
|
|
249
246
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}/{relativeRecordSetName}'
|
247
|
+
|
248
|
+
request_url = @base_url || @client.base_url
|
249
|
+
|
250
250
|
options = {
|
251
251
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
252
252
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'recordType' => record_type,'subscriptionId' => @client.subscription_id},
|
253
253
|
skip_encoding_path_params: {'relativeRecordSetName' => relative_record_set_name},
|
254
254
|
query_params: {'api-version' => @client.api_version},
|
255
255
|
body: request_content,
|
256
|
-
headers: request_headers.merge(custom_headers || {})
|
256
|
+
headers: request_headers.merge(custom_headers || {}),
|
257
|
+
base_url: request_url
|
257
258
|
}
|
259
|
+
promise = @client.make_request_async(:put, path_template, options)
|
258
260
|
|
259
|
-
|
260
|
-
|
261
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
262
|
-
promise = request.run_promise do |req|
|
263
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
264
|
-
end
|
265
|
-
|
266
|
-
promise = promise.then do |http_response|
|
261
|
+
promise = promise.then do |result|
|
262
|
+
http_response = result.response
|
267
263
|
status_code = http_response.status
|
268
264
|
response_content = http_response.body
|
269
265
|
unless status_code == 201 || status_code == 200
|
270
266
|
error_model = JSON.load(response_content)
|
271
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
267
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
272
268
|
end
|
273
269
|
|
274
|
-
# Create Result
|
275
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
276
270
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
277
271
|
# Deserialize Response
|
278
272
|
if status_code == 201
|
@@ -386,31 +380,28 @@ module Azure::ARM::Dns
|
|
386
380
|
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
387
381
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
388
382
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}/{relativeRecordSetName}'
|
383
|
+
|
384
|
+
request_url = @base_url || @client.base_url
|
385
|
+
|
389
386
|
options = {
|
390
387
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
391
388
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'recordType' => record_type,'subscriptionId' => @client.subscription_id},
|
392
389
|
skip_encoding_path_params: {'relativeRecordSetName' => relative_record_set_name},
|
393
390
|
query_params: {'api-version' => @client.api_version},
|
394
|
-
headers: request_headers.merge(custom_headers || {})
|
391
|
+
headers: request_headers.merge(custom_headers || {}),
|
392
|
+
base_url: request_url
|
395
393
|
}
|
394
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
396
395
|
|
397
|
-
|
398
|
-
|
399
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
400
|
-
promise = request.run_promise do |req|
|
401
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
402
|
-
end
|
403
|
-
|
404
|
-
promise = promise.then do |http_response|
|
396
|
+
promise = promise.then do |result|
|
397
|
+
http_response = result.response
|
405
398
|
status_code = http_response.status
|
406
399
|
response_content = http_response.body
|
407
400
|
unless status_code == 204 || status_code == 200
|
408
401
|
error_model = JSON.load(response_content)
|
409
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
402
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
410
403
|
end
|
411
404
|
|
412
|
-
# Create Result
|
413
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
414
405
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
415
406
|
|
416
407
|
result
|
@@ -485,31 +476,28 @@ module Azure::ARM::Dns
|
|
485
476
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
486
477
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
487
478
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}/{relativeRecordSetName}'
|
479
|
+
|
480
|
+
request_url = @base_url || @client.base_url
|
481
|
+
|
488
482
|
options = {
|
489
483
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
490
484
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'recordType' => record_type,'subscriptionId' => @client.subscription_id},
|
491
485
|
skip_encoding_path_params: {'relativeRecordSetName' => relative_record_set_name},
|
492
486
|
query_params: {'api-version' => @client.api_version},
|
493
|
-
headers: request_headers.merge(custom_headers || {})
|
487
|
+
headers: request_headers.merge(custom_headers || {}),
|
488
|
+
base_url: request_url
|
494
489
|
}
|
490
|
+
promise = @client.make_request_async(:get, path_template, options)
|
495
491
|
|
496
|
-
|
497
|
-
|
498
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
499
|
-
promise = request.run_promise do |req|
|
500
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
501
|
-
end
|
502
|
-
|
503
|
-
promise = promise.then do |http_response|
|
492
|
+
promise = promise.then do |result|
|
493
|
+
http_response = result.response
|
504
494
|
status_code = http_response.status
|
505
495
|
response_content = http_response.body
|
506
496
|
unless status_code == 200
|
507
497
|
error_model = JSON.load(response_content)
|
508
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
498
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
509
499
|
end
|
510
500
|
|
511
|
-
# Create Result
|
512
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
513
501
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
514
502
|
# Deserialize Response
|
515
503
|
if status_code == 200
|
@@ -550,8 +538,8 @@ module Azure::ARM::Dns
|
|
550
538
|
response = list_by_type_async(resource_group_name, zone_name, record_type, top, custom_headers).value!
|
551
539
|
unless response.nil?
|
552
540
|
page = response.body
|
553
|
-
page.next_method = Proc.new do |
|
554
|
-
list_by_type_next_async(
|
541
|
+
page.next_method = Proc.new do |next_page_link|
|
542
|
+
list_by_type_next_async(next_page_link, custom_headers)
|
555
543
|
end
|
556
544
|
page
|
557
545
|
end
|
@@ -631,30 +619,27 @@ module Azure::ARM::Dns
|
|
631
619
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
632
620
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
633
621
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}'
|
622
|
+
|
623
|
+
request_url = @base_url || @client.base_url
|
624
|
+
|
634
625
|
options = {
|
635
626
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
636
627
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'recordType' => record_type,'subscriptionId' => @client.subscription_id},
|
637
628
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
638
|
-
headers: request_headers.merge(custom_headers || {})
|
629
|
+
headers: request_headers.merge(custom_headers || {}),
|
630
|
+
base_url: request_url
|
639
631
|
}
|
632
|
+
promise = @client.make_request_async(:get, path_template, options)
|
640
633
|
|
641
|
-
|
642
|
-
|
643
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
644
|
-
promise = request.run_promise do |req|
|
645
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
646
|
-
end
|
647
|
-
|
648
|
-
promise = promise.then do |http_response|
|
634
|
+
promise = promise.then do |result|
|
635
|
+
http_response = result.response
|
649
636
|
status_code = http_response.status
|
650
637
|
response_content = http_response.body
|
651
638
|
unless status_code == 200
|
652
639
|
error_model = JSON.load(response_content)
|
653
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
640
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
654
641
|
end
|
655
642
|
|
656
|
-
# Create Result
|
657
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
658
643
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
659
644
|
# Deserialize Response
|
660
645
|
if status_code == 200
|
@@ -692,8 +677,8 @@ module Azure::ARM::Dns
|
|
692
677
|
response = list_all_in_resource_group_async(resource_group_name, zone_name, top, custom_headers).value!
|
693
678
|
unless response.nil?
|
694
679
|
page = response.body
|
695
|
-
page.next_method = Proc.new do |
|
696
|
-
list_all_in_resource_group_next_async(
|
680
|
+
page.next_method = Proc.new do |next_page_link|
|
681
|
+
list_all_in_resource_group_next_async(next_page_link, custom_headers)
|
697
682
|
end
|
698
683
|
page
|
699
684
|
end
|
@@ -763,30 +748,27 @@ module Azure::ARM::Dns
|
|
763
748
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
764
749
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
765
750
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/recordsets'
|
751
|
+
|
752
|
+
request_url = @base_url || @client.base_url
|
753
|
+
|
766
754
|
options = {
|
767
755
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
768
756
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'subscriptionId' => @client.subscription_id},
|
769
757
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
770
|
-
headers: request_headers.merge(custom_headers || {})
|
758
|
+
headers: request_headers.merge(custom_headers || {}),
|
759
|
+
base_url: request_url
|
771
760
|
}
|
761
|
+
promise = @client.make_request_async(:get, path_template, options)
|
772
762
|
|
773
|
-
|
774
|
-
|
775
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
776
|
-
promise = request.run_promise do |req|
|
777
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
778
|
-
end
|
779
|
-
|
780
|
-
promise = promise.then do |http_response|
|
763
|
+
promise = promise.then do |result|
|
764
|
+
http_response = result.response
|
781
765
|
status_code = http_response.status
|
782
766
|
response_content = http_response.body
|
783
767
|
unless status_code == 200
|
784
768
|
error_model = JSON.load(response_content)
|
785
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
769
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
786
770
|
end
|
787
771
|
|
788
|
-
# Create Result
|
789
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
790
772
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
791
773
|
# Deserialize Response
|
792
774
|
if status_code == 200
|
@@ -854,29 +836,26 @@ module Azure::ARM::Dns
|
|
854
836
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
855
837
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
856
838
|
path_template = '{nextLink}'
|
839
|
+
|
840
|
+
request_url = @base_url || @client.base_url
|
841
|
+
|
857
842
|
options = {
|
858
843
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
859
844
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
860
|
-
headers: request_headers.merge(custom_headers || {})
|
845
|
+
headers: request_headers.merge(custom_headers || {}),
|
846
|
+
base_url: request_url
|
861
847
|
}
|
848
|
+
promise = @client.make_request_async(:get, path_template, options)
|
862
849
|
|
863
|
-
|
864
|
-
|
865
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
866
|
-
promise = request.run_promise do |req|
|
867
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
868
|
-
end
|
869
|
-
|
870
|
-
promise = promise.then do |http_response|
|
850
|
+
promise = promise.then do |result|
|
851
|
+
http_response = result.response
|
871
852
|
status_code = http_response.status
|
872
853
|
response_content = http_response.body
|
873
854
|
unless status_code == 200
|
874
855
|
error_model = JSON.load(response_content)
|
875
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
856
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
876
857
|
end
|
877
858
|
|
878
|
-
# Create Result
|
879
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
880
859
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
881
860
|
# Deserialize Response
|
882
861
|
if status_code == 200
|
@@ -944,29 +923,26 @@ module Azure::ARM::Dns
|
|
944
923
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
945
924
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
946
925
|
path_template = '{nextLink}'
|
926
|
+
|
927
|
+
request_url = @base_url || @client.base_url
|
928
|
+
|
947
929
|
options = {
|
948
930
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
949
931
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
950
|
-
headers: request_headers.merge(custom_headers || {})
|
932
|
+
headers: request_headers.merge(custom_headers || {}),
|
933
|
+
base_url: request_url
|
951
934
|
}
|
935
|
+
promise = @client.make_request_async(:get, path_template, options)
|
952
936
|
|
953
|
-
|
954
|
-
|
955
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, 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|
|
937
|
+
promise = promise.then do |result|
|
938
|
+
http_response = result.response
|
961
939
|
status_code = http_response.status
|
962
940
|
response_content = http_response.body
|
963
941
|
unless status_code == 200
|
964
942
|
error_model = JSON.load(response_content)
|
965
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
943
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
966
944
|
end
|
967
945
|
|
968
|
-
# Create Result
|
969
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
970
946
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
971
947
|
# Deserialize Response
|
972
948
|
if status_code == 200
|
@@ -97,31 +97,28 @@ module Azure::ARM::Dns
|
|
97
97
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
98
98
|
|
99
99
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}'
|
100
|
+
|
101
|
+
request_url = @base_url || @client.base_url
|
102
|
+
|
100
103
|
options = {
|
101
104
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
102
105
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'subscriptionId' => @client.subscription_id},
|
103
106
|
query_params: {'api-version' => @client.api_version},
|
104
107
|
body: request_content,
|
105
|
-
headers: request_headers.merge(custom_headers || {})
|
108
|
+
headers: request_headers.merge(custom_headers || {}),
|
109
|
+
base_url: request_url
|
106
110
|
}
|
111
|
+
promise = @client.make_request_async(:put, path_template, options)
|
107
112
|
|
108
|
-
|
109
|
-
|
110
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
111
|
-
promise = request.run_promise do |req|
|
112
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
113
|
-
end
|
114
|
-
|
115
|
-
promise = promise.then do |http_response|
|
113
|
+
promise = promise.then do |result|
|
114
|
+
http_response = result.response
|
116
115
|
status_code = http_response.status
|
117
116
|
response_content = http_response.body
|
118
117
|
unless status_code == 200 || status_code == 201
|
119
118
|
error_model = JSON.load(response_content)
|
120
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
119
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
121
120
|
end
|
122
121
|
|
123
|
-
# Create Result
|
124
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
125
122
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
126
123
|
# Deserialize Response
|
127
124
|
if status_code == 200
|
@@ -276,30 +273,27 @@ module Azure::ARM::Dns
|
|
276
273
|
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
277
274
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
278
275
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}'
|
276
|
+
|
277
|
+
request_url = @base_url || @client.base_url
|
278
|
+
|
279
279
|
options = {
|
280
280
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
281
281
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'subscriptionId' => @client.subscription_id},
|
282
282
|
query_params: {'api-version' => @client.api_version},
|
283
|
-
headers: request_headers.merge(custom_headers || {})
|
283
|
+
headers: request_headers.merge(custom_headers || {}),
|
284
|
+
base_url: request_url
|
284
285
|
}
|
286
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
285
287
|
|
286
|
-
|
287
|
-
|
288
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
289
|
-
promise = request.run_promise do |req|
|
290
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
291
|
-
end
|
292
|
-
|
293
|
-
promise = promise.then do |http_response|
|
288
|
+
promise = promise.then do |result|
|
289
|
+
http_response = result.response
|
294
290
|
status_code = http_response.status
|
295
291
|
response_content = http_response.body
|
296
292
|
unless status_code == 204 || status_code == 202 || status_code == 200
|
297
293
|
error_model = JSON.load(response_content)
|
298
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
294
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
299
295
|
end
|
300
296
|
|
301
|
-
# Create Result
|
302
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
303
297
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
304
298
|
# Deserialize Response
|
305
299
|
if status_code == 200
|
@@ -370,30 +364,27 @@ module Azure::ARM::Dns
|
|
370
364
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
371
365
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
372
366
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}'
|
367
|
+
|
368
|
+
request_url = @base_url || @client.base_url
|
369
|
+
|
373
370
|
options = {
|
374
371
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
375
372
|
path_params: {'resourceGroupName' => resource_group_name,'zoneName' => zone_name,'subscriptionId' => @client.subscription_id},
|
376
373
|
query_params: {'api-version' => @client.api_version},
|
377
|
-
headers: request_headers.merge(custom_headers || {})
|
374
|
+
headers: request_headers.merge(custom_headers || {}),
|
375
|
+
base_url: request_url
|
378
376
|
}
|
377
|
+
promise = @client.make_request_async(:get, path_template, options)
|
379
378
|
|
380
|
-
|
381
|
-
|
382
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
383
|
-
promise = request.run_promise do |req|
|
384
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
385
|
-
end
|
386
|
-
|
387
|
-
promise = promise.then do |http_response|
|
379
|
+
promise = promise.then do |result|
|
380
|
+
http_response = result.response
|
388
381
|
status_code = http_response.status
|
389
382
|
response_content = http_response.body
|
390
383
|
unless status_code == 200
|
391
384
|
error_model = JSON.load(response_content)
|
392
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
385
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
393
386
|
end
|
394
387
|
|
395
|
-
# Create Result
|
396
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
397
388
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
398
389
|
# Deserialize Response
|
399
390
|
if status_code == 200
|
@@ -427,8 +418,8 @@ module Azure::ARM::Dns
|
|
427
418
|
response = list_in_resource_group_async(resource_group_name, top, custom_headers).value!
|
428
419
|
unless response.nil?
|
429
420
|
page = response.body
|
430
|
-
page.next_method = Proc.new do |
|
431
|
-
list_in_resource_group_next_async(
|
421
|
+
page.next_method = Proc.new do |next_page_link|
|
422
|
+
list_in_resource_group_next_async(next_page_link, custom_headers)
|
432
423
|
end
|
433
424
|
page
|
434
425
|
end
|
@@ -488,30 +479,27 @@ module Azure::ARM::Dns
|
|
488
479
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
489
480
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
490
481
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones'
|
482
|
+
|
483
|
+
request_url = @base_url || @client.base_url
|
484
|
+
|
491
485
|
options = {
|
492
486
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
493
487
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
494
488
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
495
|
-
headers: request_headers.merge(custom_headers || {})
|
489
|
+
headers: request_headers.merge(custom_headers || {}),
|
490
|
+
base_url: request_url
|
496
491
|
}
|
492
|
+
promise = @client.make_request_async(:get, path_template, options)
|
497
493
|
|
498
|
-
|
499
|
-
|
500
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
501
|
-
promise = request.run_promise do |req|
|
502
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
503
|
-
end
|
504
|
-
|
505
|
-
promise = promise.then do |http_response|
|
494
|
+
promise = promise.then do |result|
|
495
|
+
http_response = result.response
|
506
496
|
status_code = http_response.status
|
507
497
|
response_content = http_response.body
|
508
498
|
unless status_code == 200
|
509
499
|
error_model = JSON.load(response_content)
|
510
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
500
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
511
501
|
end
|
512
502
|
|
513
|
-
# Create Result
|
514
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
515
503
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
516
504
|
# Deserialize Response
|
517
505
|
if status_code == 200
|
@@ -544,8 +532,8 @@ module Azure::ARM::Dns
|
|
544
532
|
response = list_in_subscription_async(top, custom_headers).value!
|
545
533
|
unless response.nil?
|
546
534
|
page = response.body
|
547
|
-
page.next_method = Proc.new do |
|
548
|
-
list_in_subscription_next_async(
|
535
|
+
page.next_method = Proc.new do |next_page_link|
|
536
|
+
list_in_subscription_next_async(next_page_link, custom_headers)
|
549
537
|
end
|
550
538
|
page
|
551
539
|
end
|
@@ -601,30 +589,27 @@ module Azure::ARM::Dns
|
|
601
589
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
602
590
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
603
591
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones'
|
592
|
+
|
593
|
+
request_url = @base_url || @client.base_url
|
594
|
+
|
604
595
|
options = {
|
605
596
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
606
597
|
path_params: {'subscriptionId' => @client.subscription_id},
|
607
598
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
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
|
@@ -692,29 +677,26 @@ module Azure::ARM::Dns
|
|
692
677
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
693
678
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
694
679
|
path_template = '{nextLink}'
|
680
|
+
|
681
|
+
request_url = @base_url || @client.base_url
|
682
|
+
|
695
683
|
options = {
|
696
684
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
697
685
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
698
|
-
headers: request_headers.merge(custom_headers || {})
|
686
|
+
headers: request_headers.merge(custom_headers || {}),
|
687
|
+
base_url: request_url
|
699
688
|
}
|
689
|
+
promise = @client.make_request_async(:get, path_template, options)
|
700
690
|
|
701
|
-
|
702
|
-
|
703
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
704
|
-
promise = request.run_promise do |req|
|
705
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
706
|
-
end
|
707
|
-
|
708
|
-
promise = promise.then do |http_response|
|
691
|
+
promise = promise.then do |result|
|
692
|
+
http_response = result.response
|
709
693
|
status_code = http_response.status
|
710
694
|
response_content = http_response.body
|
711
695
|
unless status_code == 200
|
712
696
|
error_model = JSON.load(response_content)
|
713
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
697
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
714
698
|
end
|
715
699
|
|
716
|
-
# Create Result
|
717
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
718
700
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
719
701
|
# Deserialize Response
|
720
702
|
if status_code == 200
|
@@ -782,29 +764,26 @@ module Azure::ARM::Dns
|
|
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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_dns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.6.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.6.0
|
83
83
|
description: Microsoft Azure Dns Management Client Library for Ruby
|
84
84
|
email: azrubyteam@microsoft.com
|
85
85
|
executables: []
|
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
requirements:
|
125
125
|
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
127
|
+
version: 2.0.0
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - ">="
|