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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d59a5b03a72d9ca89dbcb8cd1685a5ce0705bfa2
4
- data.tar.gz: c5223f465d6e254c147fb54bea4d6275eb3a592c
3
+ metadata.gz: cb43aaaffb0aaa2958df388266f2ceeed5791a96
4
+ data.tar.gz: 6fb288a25411cf7de4c66be7fc3d873a7e8cea9e
5
5
  SHA512:
6
- metadata.gz: 06aa29f1b205c898190d1aa1e47db4dc2f5caff31805028e6e7611a33601fbf233a1db1ff2bde3502f7e63fc382280c5949a33a807f01c460f75ef94cfad8484
7
- data.tar.gz: 2807ebaca216ebeed54cc0b70f6b48a3ca3ba7c17d41bafb40b8142cd1cf472fb071f5d2c48dd2c2a9d3042c1ea57e5232e2e8f0cec9cd9d8500c19ebbde331b
6
+ metadata.gz: 610b119664c8759733f790aab29a110c54ab29d8d3f1909f1d85a4e3f4a35e399c4f78d276af9fe897909c85801f5fd7cef43c39704d5836af42fbe16af7ea68
7
+ data.tar.gz: 8db1cc32fc2e6c9ca4d221d3c614ebd2bb476715bac80295a5f0a0fc6aff67994823f2786e4b5ac74864d017c6d8702e59e81657ac7b3e06a1b53ce046bef892
@@ -43,8 +43,8 @@ module Azure::ARM::DevTestLabs
43
43
  response = list_async(resource_group_name, lab_name, artifact_source_name, filter, top, order_by, custom_headers).value!
44
44
  unless response.nil?
45
45
  page = response.body
46
- page.next_method = Proc.new do |next_link|
47
- list_next_async(next_link, custom_headers)
46
+ page.next_method = Proc.new do |next_page_link|
47
+ list_next_async(next_page_link, custom_headers)
48
48
  end
49
49
  page
50
50
  end
@@ -121,30 +121,27 @@ module Azure::ARM::DevTestLabs
121
121
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
122
122
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
123
123
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'
124
+
125
+ request_url = @base_url || @client.base_url
126
+
124
127
  options = {
125
128
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
126
129
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'artifactSourceName' => artifact_source_name},
127
130
  query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
128
- headers: request_headers.merge(custom_headers || {})
131
+ headers: request_headers.merge(custom_headers || {}),
132
+ base_url: request_url
129
133
  }
134
+ promise = @client.make_request_async(:get, path_template, options)
130
135
 
131
- request_url = @base_url || @client.base_url
132
-
133
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
134
- promise = request.run_promise do |req|
135
- @client.credentials.sign_request(req) unless @client.credentials.nil?
136
- end
137
-
138
- promise = promise.then do |http_response|
136
+ promise = promise.then do |result|
137
+ http_response = result.response
139
138
  status_code = http_response.status
140
139
  response_content = http_response.body
141
140
  unless status_code == 200
142
141
  error_model = JSON.load(response_content)
143
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
142
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
144
143
  end
145
144
 
146
- # Create Result
147
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
148
145
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
149
146
  # Deserialize Response
150
147
  if status_code == 200
@@ -223,30 +220,27 @@ module Azure::ARM::DevTestLabs
223
220
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
224
221
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
225
222
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}'
223
+
224
+ request_url = @base_url || @client.base_url
225
+
226
226
  options = {
227
227
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
228
228
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'artifactSourceName' => artifact_source_name,'name' => name},
229
229
  query_params: {'api-version' => @client.api_version},
230
- headers: request_headers.merge(custom_headers || {})
230
+ headers: request_headers.merge(custom_headers || {}),
231
+ base_url: request_url
231
232
  }
233
+ promise = @client.make_request_async(:get, path_template, options)
232
234
 
233
- request_url = @base_url || @client.base_url
234
-
235
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
236
- promise = request.run_promise do |req|
237
- @client.credentials.sign_request(req) unless @client.credentials.nil?
238
- end
239
-
240
- promise = promise.then do |http_response|
235
+ promise = promise.then do |result|
236
+ http_response = result.response
241
237
  status_code = http_response.status
242
238
  response_content = http_response.body
243
239
  unless status_code == 200
244
240
  error_model = JSON.load(response_content)
245
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
241
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
246
242
  end
247
243
 
248
- # Create Result
249
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
250
244
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
251
245
  # Deserialize Response
252
246
  if status_code == 200
@@ -340,31 +334,28 @@ module Azure::ARM::DevTestLabs
340
334
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
341
335
 
342
336
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}/generateArmTemplate'
337
+
338
+ request_url = @base_url || @client.base_url
339
+
343
340
  options = {
344
341
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
345
342
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'artifactSourceName' => artifact_source_name,'name' => name},
346
343
  query_params: {'api-version' => @client.api_version},
347
344
  body: request_content,
348
- headers: request_headers.merge(custom_headers || {})
345
+ headers: request_headers.merge(custom_headers || {}),
346
+ base_url: request_url
349
347
  }
348
+ promise = @client.make_request_async(:post, path_template, options)
350
349
 
351
- request_url = @base_url || @client.base_url
352
-
353
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
354
- promise = request.run_promise do |req|
355
- @client.credentials.sign_request(req) unless @client.credentials.nil?
356
- end
357
-
358
- promise = promise.then do |http_response|
350
+ promise = promise.then do |result|
351
+ http_response = result.response
359
352
  status_code = http_response.status
360
353
  response_content = http_response.body
361
354
  unless status_code == 200
362
355
  error_model = JSON.load(response_content)
363
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
356
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
364
357
  end
365
358
 
366
- # Create Result
367
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
368
359
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
369
360
  # Deserialize Response
370
361
  if status_code == 200
@@ -432,29 +423,26 @@ module Azure::ARM::DevTestLabs
432
423
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
433
424
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
434
425
  path_template = '{nextLink}'
426
+
427
+ request_url = @base_url || @client.base_url
428
+
435
429
  options = {
436
430
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
437
431
  skip_encoding_path_params: {'nextLink' => next_page_link},
438
- headers: request_headers.merge(custom_headers || {})
432
+ headers: request_headers.merge(custom_headers || {}),
433
+ base_url: request_url
439
434
  }
435
+ promise = @client.make_request_async(:get, path_template, options)
440
436
 
441
- request_url = @base_url || @client.base_url
442
-
443
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
444
- promise = request.run_promise do |req|
445
- @client.credentials.sign_request(req) unless @client.credentials.nil?
446
- end
447
-
448
- promise = promise.then do |http_response|
437
+ promise = promise.then do |result|
438
+ http_response = result.response
449
439
  status_code = http_response.status
450
440
  response_content = http_response.body
451
441
  unless status_code == 200
452
442
  error_model = JSON.load(response_content)
453
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
443
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
454
444
  end
455
445
 
456
- # Create Result
457
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
458
446
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
459
447
  # Deserialize Response
460
448
  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 |next_link|
46
- list_next_async(next_link, custom_headers)
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}/artifactsources'
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
- request_url = @base_url || @client.base_url
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}/artifactsources/{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
- request_url = @base_url || @client.base_url
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
@@ -324,31 +318,28 @@ module Azure::ARM::DevTestLabs
324
318
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
325
319
 
326
320
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'
321
+
322
+ request_url = @base_url || @client.base_url
323
+
327
324
  options = {
328
325
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
329
326
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
330
327
  query_params: {'api-version' => @client.api_version},
331
328
  body: request_content,
332
- headers: request_headers.merge(custom_headers || {})
329
+ headers: request_headers.merge(custom_headers || {}),
330
+ base_url: request_url
333
331
  }
332
+ promise = @client.make_request_async(:put, path_template, options)
334
333
 
335
- request_url = @base_url || @client.base_url
336
-
337
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
338
- promise = request.run_promise do |req|
339
- @client.credentials.sign_request(req) unless @client.credentials.nil?
340
- end
341
-
342
- promise = promise.then do |http_response|
334
+ promise = promise.then do |result|
335
+ http_response = result.response
343
336
  status_code = http_response.status
344
337
  response_content = http_response.body
345
338
  unless status_code == 200 || status_code == 201
346
339
  error_model = JSON.load(response_content)
347
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
340
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
348
341
  end
349
342
 
350
- # Create Result
351
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
352
343
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
353
344
  # Deserialize Response
354
345
  if status_code == 200
@@ -432,30 +423,27 @@ module Azure::ARM::DevTestLabs
432
423
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
433
424
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
434
425
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'
426
+
427
+ request_url = @base_url || @client.base_url
428
+
435
429
  options = {
436
430
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
437
431
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
438
432
  query_params: {'api-version' => @client.api_version},
439
- headers: request_headers.merge(custom_headers || {})
433
+ headers: request_headers.merge(custom_headers || {}),
434
+ base_url: request_url
440
435
  }
436
+ promise = @client.make_request_async(:delete, path_template, options)
441
437
 
442
- request_url = @base_url || @client.base_url
443
-
444
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
445
- promise = request.run_promise do |req|
446
- @client.credentials.sign_request(req) unless @client.credentials.nil?
447
- end
448
-
449
- promise = promise.then do |http_response|
438
+ promise = promise.then do |result|
439
+ http_response = result.response
450
440
  status_code = http_response.status
451
441
  response_content = http_response.body
452
442
  unless status_code == 200 || status_code == 204
453
443
  error_model = JSON.load(response_content)
454
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
444
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
455
445
  end
456
446
 
457
- # Create Result
458
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
459
447
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
460
448
 
461
449
  result
@@ -532,31 +520,28 @@ module Azure::ARM::DevTestLabs
532
520
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
533
521
 
534
522
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'
523
+
524
+ request_url = @base_url || @client.base_url
525
+
535
526
  options = {
536
527
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
537
528
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
538
529
  query_params: {'api-version' => @client.api_version},
539
530
  body: request_content,
540
- headers: request_headers.merge(custom_headers || {})
531
+ headers: request_headers.merge(custom_headers || {}),
532
+ base_url: request_url
541
533
  }
534
+ promise = @client.make_request_async(:patch, path_template, options)
542
535
 
543
- request_url = @base_url || @client.base_url
544
-
545
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
546
- promise = request.run_promise do |req|
547
- @client.credentials.sign_request(req) unless @client.credentials.nil?
548
- end
549
-
550
- promise = promise.then do |http_response|
536
+ promise = promise.then do |result|
537
+ http_response = result.response
551
538
  status_code = http_response.status
552
539
  response_content = http_response.body
553
540
  unless status_code == 200
554
541
  error_model = JSON.load(response_content)
555
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
542
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
556
543
  end
557
544
 
558
- # Create Result
559
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
560
545
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
561
546
  # Deserialize Response
562
547
  if status_code == 200
@@ -624,29 +609,26 @@ module Azure::ARM::DevTestLabs
624
609
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
625
610
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
626
611
  path_template = '{nextLink}'
612
+
613
+ request_url = @base_url || @client.base_url
614
+
627
615
  options = {
628
616
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
617
  skip_encoding_path_params: {'nextLink' => next_page_link},
630
- headers: request_headers.merge(custom_headers || {})
618
+ headers: request_headers.merge(custom_headers || {}),
619
+ base_url: request_url
631
620
  }
621
+ promise = @client.make_request_async(:get, path_template, options)
632
622
 
633
- request_url = @base_url || @client.base_url
634
-
635
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, 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|
623
+ promise = promise.then do |result|
624
+ http_response = result.response
641
625
  status_code = http_response.status
642
626
  response_content = http_response.body
643
627
  unless status_code == 200
644
628
  error_model = JSON.load(response_content)
645
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
629
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
646
630
  end
647
631
 
648
- # Create Result
649
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
650
632
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
651
633
  # Deserialize Response
652
634
  if status_code == 200
@@ -78,30 +78,27 @@ module Azure::ARM::DevTestLabs
78
78
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
79
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
80
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}'
81
+
82
+ request_url = @base_url || @client.base_url
83
+
81
84
  options = {
82
85
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
83
86
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
84
87
  query_params: {'api-version' => @client.api_version},
85
- headers: request_headers.merge(custom_headers || {})
88
+ headers: request_headers.merge(custom_headers || {}),
89
+ base_url: request_url
86
90
  }
91
+ promise = @client.make_request_async(:get, path_template, options)
87
92
 
88
- request_url = @base_url || @client.base_url
89
-
90
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
91
- promise = request.run_promise do |req|
92
- @client.credentials.sign_request(req) unless @client.credentials.nil?
93
- end
94
-
95
- promise = promise.then do |http_response|
93
+ promise = promise.then do |result|
94
+ http_response = result.response
96
95
  status_code = http_response.status
97
96
  response_content = http_response.body
98
97
  unless status_code == 200
99
98
  error_model = JSON.load(response_content)
100
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
99
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
100
  end
102
101
 
103
- # Create Result
104
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
105
102
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
103
  # Deserialize Response
107
104
  if status_code == 200