ms_rest_azure 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/ms_rest_azure/polling_state.rb +25 -11
- data/lib/ms_rest_azure/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fa53ad5c656df3cc93d4b643a071188ec484065
|
4
|
+
data.tar.gz: 54a52fddbcd922a038d4a8d29596fc597b24f656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c2c2a09377082f0983813aec073022da15d725427ff28b7783a77fc18a0a91a2ba6aeee2c6988b392aca28f5dee65fec36878b0fc7aec65aa2a67ee7bc45f7e
|
7
|
+
data.tar.gz: d15cd3eb322e305fa59de8377366fffa34e93421b58f24000d887b2c35b0b246aaccb2d91041f558e3333210b79ad9f0ba12524fde7f6a510a32f802737323d7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
##2017.07.10 ms_rest_azure version 0.8.1
|
2
|
+
* [Bug Fix] Fixed the issue with the polling status object to handle the response code and provisioning status correctly.[Issue #817](https://github.com/Azure/azure-sdk-for-ruby/issues/817) [PR #828](https://github.com/Azure/azure-sdk-for-ruby/pull/828)
|
3
|
+
|
1
4
|
##2017.06.30 ms_rest_azure version 0.8.0
|
2
5
|
* [Breaking Change] Changed the name of the azure environments from 'Azure' to 'AzureCloud' and 'AzureChina' to 'AzureChinaCloud'.[Issue #600](https://github.com/Azure/azure-sdk-for-ruby/issues/600) [PR #711](https://github.com/Azure/azure-sdk-for-ruby/pull/711)
|
3
6
|
* Added 'Accept' header with the value 'application/json'.[Issue #701](https://github.com/Azure/azure-sdk-for-ruby/issues/701) [PR #710](https://github.com/Azure/azure-sdk-for-ruby/pull/710)
|
@@ -35,21 +35,35 @@ module MsRestAzure
|
|
35
35
|
update_response(azure_response.response)
|
36
36
|
@resource = azure_response.body
|
37
37
|
|
38
|
+
case @response.status
|
39
|
+
when 200
|
40
|
+
provisioning_state = get_provisioning_state
|
41
|
+
@status = provisioning_state.nil?? (AsyncOperationStatus::SUCCESS_STATUS):provisioning_state
|
42
|
+
when 201
|
43
|
+
provisioning_state = get_provisioning_state
|
44
|
+
@status = provisioning_state.nil?? (AsyncOperationStatus::IN_PROGRESS_STATUS):provisioning_state
|
45
|
+
when 202
|
46
|
+
@status = AsyncOperationStatus::IN_PROGRESS_STATUS
|
47
|
+
when 204
|
48
|
+
@status = AsyncOperationStatus::SUCCESS_STATUS
|
49
|
+
else
|
50
|
+
@status = AsyncOperationStatus::FAILED_STATUS
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Returns the provisioning status of the resource
|
56
|
+
#
|
57
|
+
# @return [String] provisioning status of the resource
|
58
|
+
def get_provisioning_state
|
38
59
|
# On non flattened resource, we should find provisioning_state inside 'properties'
|
39
60
|
if (!@resource.nil? && @resource.respond_to?(:properties) && @resource.properties.respond_to?(:provisioning_state) && !@resource.properties.provisioning_state.nil?)
|
40
|
-
@
|
41
|
-
|
61
|
+
@resource.properties.provisioning_state
|
62
|
+
# On flattened resource, we should find provisioning_state at the top level
|
42
63
|
elsif !@resource.nil? && @resource.respond_to?(:provisioning_state) && !@resource.provisioning_state.nil?
|
43
|
-
@
|
64
|
+
@resource.provisioning_state
|
44
65
|
else
|
45
|
-
|
46
|
-
when 202
|
47
|
-
@status = AsyncOperationStatus::IN_PROGRESS_STATUS
|
48
|
-
when 200, 201, 204
|
49
|
-
@status = AsyncOperationStatus::SUCCESS_STATUS
|
50
|
-
else
|
51
|
-
@status = AsyncOperationStatus::FAILED_STATUS
|
52
|
-
end
|
66
|
+
nil
|
53
67
|
end
|
54
68
|
end
|
55
69
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms_rest_azure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|