ms_rest_azure 0.8.0 → 0.8.1

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: a45accae7a928ebf7126c3b232494f0a0cabe231
4
- data.tar.gz: c61a480e0f86ffec9d517e8717b7b4e7e09adeb4
3
+ metadata.gz: 1fa53ad5c656df3cc93d4b643a071188ec484065
4
+ data.tar.gz: 54a52fddbcd922a038d4a8d29596fc597b24f656
5
5
  SHA512:
6
- metadata.gz: ecdcfa08c7b00a5a508282e1b9bbe575da0d6dff6766e72d4ed66df5203f11e8e5e92fc70f336267392fd1d1bcfdb249ff326e59dbe524bd9b8b55a695f0cfcb
7
- data.tar.gz: 0cb282ce80473c7bfcae156c2f0bb779bf0d577551332f087780602a07e85cc9d148a87787102b21501c175267230738230ae9393391bfc3e5e5e7887742ab35
6
+ metadata.gz: 4c2c2a09377082f0983813aec073022da15d725427ff28b7783a77fc18a0a91a2ba6aeee2c6988b392aca28f5dee65fec36878b0fc7aec65aa2a67ee7bc45f7e
7
+ data.tar.gz: d15cd3eb322e305fa59de8377366fffa34e93421b58f24000d887b2c35b0b246aaccb2d91041f558e3333210b79ad9f0ba12524fde7f6a510a32f802737323d7
@@ -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
- @status = @resource.properties.provisioning_state
41
- # On flattened resource, we should find provisioning_state at the top level
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
- @status = @resource.provisioning_state
64
+ @resource.provisioning_state
44
65
  else
45
- case @response.status
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
 
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module MsRestAzure
6
- VERSION = '0.8.0'
6
+ VERSION = '0.8.1'
7
7
  end
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.0
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-06-30 00:00:00.000000000 Z
11
+ date: 2017-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler