Updated Branches:
  refs/heads/trunk d4ab3ab90 -> 9984babe6

LIBCLOUD-296 : stopped state for compute nodes

Signed-off-by: Tomaz Muraus <[email protected]>


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

Branch: refs/heads/trunk
Commit: 69a0740e722be235aa4f3a4f544aed9cbeb79cfe
Parents: d4ab3ab
Author: Jayy Vis <[email protected]>
Authored: Sun Oct 20 12:25:22 2013 +0530
Committer: Tomaz Muraus <[email protected]>
Committed: Tue Oct 22 10:39:48 2013 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py         | 3 ++-
 libcloud/compute/drivers/hostvirtual.py | 3 ++-
 libcloud/compute/types.py               | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/69a0740e/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 6437a8f..c928ec7 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -1671,7 +1671,8 @@ class EC2NodeDriver(BaseEC2NodeDriver):
         'pending': NodeState.PENDING,
         'running': NodeState.RUNNING,
         'shutting-down': NodeState.UNKNOWN,
-        'terminated': NodeState.TERMINATED
+        'terminated': NodeState.TERMINATED,
+        'stopped': NodeState.STOPPED
     }
 
     def __init__(self, key, secret=None, secure=True, host=None, port=None,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/69a0740e/libcloud/compute/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/hostvirtual.py 
b/libcloud/compute/drivers/hostvirtual.py
index 2d08815..e6b9141 100644
--- a/libcloud/compute/drivers/hostvirtual.py
+++ b/libcloud/compute/drivers/hostvirtual.py
@@ -42,7 +42,8 @@ NODE_STATE_MAP = {
     'STOPPING': NodeState.REBOOTING,
     'REBOOTING': NodeState.REBOOTING,
     'STARTING': NodeState.REBOOTING,
-    'TERMINATED': NodeState.TERMINATED  # server is powered down
+    'TERMINATED': NodeState.TERMINATED,  # server is powered down
+    'STOPPED': NodeState.STOPPED
 }
 
 DEFAULT_NODE_LOCATION_ID = 4

http://git-wip-us.apache.org/repos/asf/libcloud/blob/69a0740e/libcloud/compute/types.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/types.py b/libcloud/compute/types.py
index bf0d158..d1e8028 100644
--- a/libcloud/compute/types.py
+++ b/libcloud/compute/types.py
@@ -175,6 +175,7 @@ class NodeState(object):
     TERMINATED = 2
     PENDING = 3
     UNKNOWN = 4
+    STOPPED = 5
 
 
 class Architecture(object):

Reply via email to