libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbe...@apache.org
Subject svn commit: r1240451 - in /libcloud/trunk: ./ libcloud/compute/drivers/ test/compute/ test/compute/fixtures/opennebula_1_4/ test/compute/fixtures/opennebula_2_0/ test/compute/fixtures/opennebula_3_2/
Date Sat, 04 Feb 2012 03:50:29 GMT
Author: hbetts
Date: Sat Feb  4 03:50:29 2012
New Revision: 1240451

URL: http://svn.apache.org/viewvc?rev=1240451&view=rev
Log:
Updated the list of node states for OpenNebula drivers. ; LIBCLOUD-148

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/drivers/opennebula.py
    libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_15.xml
    libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_5.xml
    libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_15.xml
    libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_5.xml
    libcloud/trunk/test/compute/fixtures/opennebula_3_2/compute_5.xml
    libcloud/trunk/test/compute/test_opennebula.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Sat Feb  4 03:50:29 2012
@@ -48,6 +48,9 @@ Changes with Apache Libcloud in developm
      - Fix a public_ips Node variable assignment in the Gandi.net driver.
        [Aymeric Barantal]
 
+     - Updated the list of node states for OpenNebula drivers. ; LIBCLOUD-148
+       [Hutson Betts]
+
   *) Storage:
 
     - Propagate extra keyword arguments passed to the Rackspace driver

Modified: libcloud/trunk/libcloud/compute/drivers/opennebula.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opennebula.py?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/opennebula.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/opennebula.py Sat Feb  4 03:50:29 2012
@@ -267,17 +267,14 @@ class OpenNebulaNodeDriver(NodeDriver):
     type = Provider.OPENNEBULA
 
     NODE_STATE_MAP = {
+        'INIT': NodeState.PENDING,
         'PENDING': NodeState.PENDING,
         'HOLD': NodeState.PENDING,
-        'PROLOG': NodeState.PENDING,
-        'RUNNING': NodeState.RUNNING,
-        'MIGRATE': NodeState.PENDING,
-        'EPILOG': NodeState.TERMINATED,
+        'ACTIVE': NodeState.RUNNING,
         'STOPPED': NodeState.TERMINATED,
         'SUSPENDED': NodeState.PENDING,
-        'FAILED': NodeState.TERMINATED,
-        'UNKNOWN': NodeState.UNKNOWN,
-        'DONE': NodeState.TERMINATED}
+        'DONE': NodeState.TERMINATED,
+        'FAILED': NodeState.TERMINATED}
 
     def __new__(cls, key, secret=None, api_version=DEFAULT_API_VERSION,
                 **kwargs):

Modified: libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_15.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_15.xml?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_15.xml (original)
+++ libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_15.xml Sat Feb  4 03:50:29
2012
@@ -2,7 +2,7 @@
 <COMPUTE>
     <ID>15</ID>
     <NAME>Compute 15</NAME>
-    <STATE>RUNNING</STATE>
+    <STATE>ACTIVE</STATE>
     <STORAGE>
         <DISK image="15" dev="sda1"/>
         <FS size="512" format="ext3" dev="sda3"/>

Modified: libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_5.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_5.xml?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_5.xml (original)
+++ libcloud/trunk/test/compute/fixtures/opennebula_1_4/compute_5.xml Sat Feb  4 03:50:29
2012
@@ -2,7 +2,7 @@
 <COMPUTE>
     <ID>5</ID>
     <NAME>Compute 5</NAME>
-    <STATE>RUNNING</STATE>
+    <STATE>ACTIVE</STATE>
     <STORAGE>
         <DISK image="5" dev="sda1"/>
         <FS size="512" format="ext3" dev="sda3"/>

Modified: libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_15.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_15.xml?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_15.xml (original)
+++ libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_15.xml Sat Feb  4 03:50:29
2012
@@ -3,7 +3,7 @@
     <ID>15</ID>
     <NAME>Compute 15</NAME>
     <INSTANCE_TYPE>small</INSTANCE_TYPE>
-    <STATE>RUNNING</STATE>
+    <STATE>ACTIVE</STATE>
     <DISK>
         <STORAGE href='http://www.opennebula.org/storage/15' name='Ubuntu 9.04 LAMP'/>
         <TYPE>DISK</TYPE>

Modified: libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_5.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_5.xml?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_5.xml (original)
+++ libcloud/trunk/test/compute/fixtures/opennebula_2_0/compute_5.xml Sat Feb  4 03:50:29
2012
@@ -3,7 +3,7 @@
     <ID>5</ID>
     <NAME>Compute 5</NAME>
     <INSTANCE_TYPE>small</INSTANCE_TYPE>
-    <STATE>RUNNING</STATE>
+    <STATE>ACTIVE</STATE>
     <DISK>
         <STORAGE href='http://www.opennebula.org/storage/5' name='Ubuntu 9.04 LAMP'/>
         <TYPE>DISK</TYPE>

Modified: libcloud/trunk/test/compute/fixtures/opennebula_3_2/compute_5.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/opennebula_3_2/compute_5.xml?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/opennebula_3_2/compute_5.xml (original)
+++ libcloud/trunk/test/compute/fixtures/opennebula_3_2/compute_5.xml Sat Feb  4 03:50:29
2012
@@ -3,7 +3,7 @@
     <ID>5</ID>
     <NAME>Compute 5</NAME>
     <INSTANCE_TYPE>small</INSTANCE_TYPE>
-    <STATE>RUNNING</STATE>
+    <STATE>ACTIVE</STATE>
     <DISK>
         <STORAGE href='http://www.opennebula.org/storage/5' name='Ubuntu 9.04 LAMP'/>
         <TYPE>DISK</TYPE>

Modified: libcloud/trunk/test/compute/test_opennebula.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_opennebula.py?rev=1240451&r1=1240450&r2=1240451&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_opennebula.py (original)
+++ libcloud/trunk/test/compute/test_opennebula.py Sat Feb  4 03:50:29 2012
@@ -90,7 +90,7 @@ class OpenNebula_1_4_Tests(unittest.Test
         self.assertEqual(node.id, '5')
         self.assertEqual(node.name, 'Compute 5')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].name, None)
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].address, '192.168.0.1')
@@ -122,7 +122,7 @@ class OpenNebula_1_4_Tests(unittest.Test
         self.assertEqual(node.id, '5')
         self.assertEqual(node.name, 'Compute 5')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, None)
         self.assertEqual(node.public_ips[0].address, '192.168.0.1')
@@ -138,7 +138,7 @@ class OpenNebula_1_4_Tests(unittest.Test
         self.assertEqual(node.id, '15')
         self.assertEqual(node.name, 'Compute 15')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, None)
         self.assertEqual(node.public_ips[0].address, '192.168.0.2')
@@ -274,7 +274,7 @@ class OpenNebula_2_0_Tests(unittest.Test
         self.assertEqual(node.id, '5')
         self.assertEqual(node.name, 'Compute 5')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, 'Network 5')
         self.assertEqual(node.public_ips[0].address, '192.168.0.1')
@@ -314,7 +314,7 @@ class OpenNebula_2_0_Tests(unittest.Test
         self.assertEqual(node.id, '5')
         self.assertEqual(node.name, 'Compute 5')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, 'Network 5')
         self.assertEqual(node.public_ips[0].address, '192.168.0.1')
@@ -352,7 +352,7 @@ class OpenNebula_2_0_Tests(unittest.Test
         self.assertEqual(node.id, '15')
         self.assertEqual(node.name, 'Compute 15')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['RUNNING'])
+                         OpenNebulaNodeDriver.NODE_STATE_MAP['ACTIVE'])
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, 'Network 5')
         self.assertEqual(node.public_ips[0].address, '192.168.0.2')
@@ -390,7 +390,7 @@ class OpenNebula_2_0_Tests(unittest.Test
         self.assertEqual(node.id, '25')
         self.assertEqual(node.name, 'Compute 25')
         self.assertEqual(node.state,
-                         OpenNebulaNodeDriver.NODE_STATE_MAP['UNKNOWN'])
+                         NodeState.UNKNOWN)
         self.assertEqual(node.public_ips[0].id, '5')
         self.assertEqual(node.public_ips[0].name, 'Network 5')
         self.assertEqual(node.public_ips[0].address, '192.168.0.3')



Mime
View raw message