libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r958654 - /incubator/libcloud/trunk/libcloud/drivers/linode.py
Date Mon, 28 Jun 2010 17:39:59 GMT
Author: jed
Date: Mon Jun 28 17:39:59 2010
New Revision: 958654

URL: http://svn.apache.org/viewvc?rev=958654&view=rev
Log:
Rename Linode when created to reflect better

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

Modified: incubator/libcloud/trunk/libcloud/drivers/linode.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/linode.py?rev=958654&r1=958653&r2=958654&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/linode.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/linode.py Mon Jun 28 17:39:59 2010
@@ -319,6 +319,14 @@ class LinodeNodeDriver(NodeDriver):
         data = self.connection.request(LINODE_ROOT, params=params).object
         linode = { "id": data["LinodeID"] }
 
+        # Step 1b. linode.update to rename the Linode
+        params = {
+            "api_action": "linode.update",
+            "LinodeID": linode["id"],
+            "Label": name
+        }
+        data = self.connection.request(LINODE_ROOT, params=params).object
+
         # Step 2: linode.disk.createfromdistribution
         if not root:
             root = os.urandom(8).encode('hex')



Mime
View raw message