libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r918180 - /incubator/libcloud/trunk/libcloud/drivers/rackspace.py
Date Tue, 02 Mar 2010 21:11:44 GMT
Author: pquerna
Date: Tue Mar  2 21:11:44 2010
New Revision: 918180

URL: http://svn.apache.org/viewvc?rev=918180&view=rev
Log:
handle more node states in rackspace better

Modified:
    incubator/libcloud/trunk/libcloud/drivers/rackspace.py

Modified: incubator/libcloud/trunk/libcloud/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/rackspace.py?rev=918180&r1=918179&r2=918180&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/rackspace.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/rackspace.py Tue Mar  2 21:11:44 2010
@@ -146,14 +146,21 @@
     features = {"create_node": ["generates_password"]}
 
     NODE_STATE_MAP = { 'BUILD': NodeState.PENDING,
+                       'REBUILD': NodeState.PENDING,
                        'ACTIVE': NodeState.RUNNING,
                        'SUSPENDED': NodeState.TERMINATED,
                        'QUEUE_RESIZE': NodeState.PENDING,
                        'PREP_RESIZE': NodeState.PENDING,
+                       'VERIFY_RESIZE': NodeState.RUNNING,
+                       'PASSWORD': NodeState.PENDING,
                        'RESCUE': NodeState.PENDING,
                        'REBUILD': NodeState.PENDING,
                        'REBOOT': NodeState.REBOOTING,
-                       'HARD_REBOOT': NodeState.REBOOTING}
+                       'HARD_REBOOT': NodeState.REBOOTING,
+                       'SHARE_IP': NodeState.PENDING,
+                       'SHARE_IP_NO_CONFIG': NodeState.PENDING,
+                       'DELETE_IP': NodeState.PENDING,
+                       'UNKNOWN': NodeState.UNKNOWN}
 
     def list_nodes(self):
         return self.to_nodes(self.connection.request('/servers/detail').object)
@@ -273,7 +280,7 @@
         
         n = Node(id=el.get('id'),
                  name=el.get('name'),
-                 state=self.NODE_STATE_MAP.get(el.get('status')),
+                 state=self.NODE_STATE_MAP.get(el.get('status'), NodeState.UNKNOWN),
                  public_ip=public_ip,
                  private_ip=private_ip,
                  driver=self.connection.driver,



Mime
View raw message