libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [04/20] libcloud git commit: FAM-690 Added 'updating' state
Date Fri, 11 Aug 2017 05:00:46 GMT
FAM-690 Added 'updating' state


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/432145f6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/432145f6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/432145f6

Branch: refs/heads/trunk
Commit: 432145f6d45b7a88862999937ce0d29cd07e896e
Parents: 774b097
Author: mermoldy <s.babak@scalr.com>
Authored: Tue Mar 7 19:37:11 2017 +0200
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Fri Aug 11 14:59:31 2017 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/azure_arm.py | 11 ++++++++---
 libcloud/compute/types.py             |  3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/432145f6/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py b/libcloud/compute/drivers/azure_arm.py
index 6a43d09..375d432 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -1108,8 +1108,11 @@ class AzureNodeDriver(NodeDriver):
 
         provisioning_state = properties.get('provisioningState', '').lower()
         disk_state = properties.get('diskState', '').lower()
-        if provisioning_state in ('creating', 'updating'):
+
+        if provisioning_state == 'creating':
             state = StorageVolumeState.CREATING
+        elif provisioning_state == 'updating':
+            state = StorageVolumeState.UPDATING
         elif provisioning_state == 'succeeded':
             if disk_state in ('attached', 'reserved', 'activesas'):
                 state = StorageVolumeState.INUSE
@@ -1174,8 +1177,10 @@ class AzureNodeDriver(NodeDriver):
             extra['volume_id'] = extra['source_id']
 
         provisioning_state = properties.get('provisioningState', '').lower()
-        if provisioning_state in ('creating', 'updating'):
+        if provisioning_state == 'creating':
             state = VolumeSnapshotState.CREATING
+        elif provisioning_state == 'updating':
+            state = VolumeSnapshotState.UPDATING
         elif provisioning_state == 'succeeded':
             state = VolumeSnapshotState.AVAILABLE
         elif provisioning_state == 'failed':
@@ -1884,7 +1889,7 @@ class AzureNodeDriver(NodeDriver):
                     state = NodeState.ERROR
                     break
                 elif status["code"] == "ProvisioningState/updating":
-                    state = NodeState.RECONFIGURING
+                    state = NodeState.UPDATING
                     break
                 elif status["code"] == "ProvisioningState/succeeded":
                     pass

http://git-wip-us.apache.org/repos/asf/libcloud/blob/432145f6/libcloud/compute/types.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/types.py b/libcloud/compute/types.py
index 15205dc..deae506 100644
--- a/libcloud/compute/types.py
+++ b/libcloud/compute/types.py
@@ -286,6 +286,7 @@ class NodeState(Type):
     RECONFIGURING = 'reconfiguring'
     MIGRATING = 'migrating'
     NORMAL = 'normal'
+    UPDATING = 'updating'
 
 
 class StorageVolumeState(Type):
@@ -302,6 +303,7 @@ class StorageVolumeState(Type):
     ATTACHING = 'attaching'
     UNKNOWN = 'unknown'
     MIGRATING = 'migrating'
+    UPDATING = 'updating'
 
 
 class VolumeSnapshotState(Type):
@@ -314,6 +316,7 @@ class VolumeSnapshotState(Type):
     DELETING = 'deleting'
     RESTORING = 'restoring'
     UNKNOWN = 'unknown'
+    UPDATING = 'updating'
 
 
 class Architecture(object):


Mime
View raw message