From libcloud-commits-return-289samanthafuller@example.net Thu Apr 01 02:50:16 2010 Return-Path: <libcloud-commits-return-289samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 10530 invoked from network); 1 Apr 2010 02:50:16 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 02:50:16 -0000 Received: (qmail 91113 invoked by uid 500); 1 Apr 2010 02:50:16 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 91093 invoked by uid 500); 1 Apr 2010 02:50:15 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 91083 invoked by uid 99); 1 Apr 2010 02:50:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 02:50:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 02:50:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ECB6323888E4; Thu, 1 Apr 2010 02:49:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r929789 - /incubator/libcloud/site/devinfo.html Date: Thu, 01 Apr 2010 02:49:53 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: jerry Date: Thu Apr 1 02:49:53 2010 New Revision: 929789 URL: http://svn.apache.org/viewvc?rev=929789&view=rev Log: Site: Fixed link typo LIBCLOUD-16 Modified: incubator/libcloud/site/devinfo.html Modified: incubator/libcloud/site/devinfo.html URL: http://svn.apache.org/viewvc/incubator/libcloud/site/devinfo.html?rev=929789&r1=929788&r2=929789&view=diff ============================================================================== --- incubator/libcloud/site/devinfo.html (original) +++ incubator/libcloud/site/devinfo.html Thu Apr 1 02:49:53 2010 @@ -37,7 +37,7 @@ <h2>Mailing lists</h2> <p><ul> - <li><a href="mailto:samanthafuller@example.net">samanthafuller@example.net</a> - <a href="http://mail-archives.apache.org/mod_mbox/incubator-libcloud/">archives</a> - Main mailing list.</li> + <li><a href="mailto:samanthafuller@example.net">samanthafuller@example.net</a> - <a href="http://mail-archives.apache.org/mod_mbox/incubator-libcloud/">archives</a> - Main mailing list.</li> <li><a href="mailto:samanthafuller@example.net">samanthafuller@example.net</a> - <a href="http://mail-archives.apache.org/mod_mbox/incubator-libcloud-commits/">archives</a> - SVN Commits mailing list.</li> </ul></a>. From libcloud-commits-return-290samanthafuller@example.net Thu Apr 01 20:30:49 2010 Return-Path: <libcloud-commits-return-290samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 90740 invoked from network); 1 Apr 2010 20:30:49 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 20:30:49 -0000 Received: (qmail 83579 invoked by uid 500); 1 Apr 2010 20:30:49 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 83558 invoked by uid 500); 1 Apr 2010 20:30:49 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 83551 invoked by uid 99); 1 Apr 2010 20:30:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 20:30:49 +0000 X-ASF-Spam-Status: No, hits=-1038.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 20:30:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 37EE023888EC; Thu, 1 Apr 2010 20:30:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r930077 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py Date: Thu, 01 Apr 2010 20:30:28 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Thu Apr 1 20:30:27 2010 New Revision: 930077 URL: http://svn.apache.org/viewvc?rev=930077&view=rev Log: Handle OptInRequired for ec2 Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=930077&r1=930076&r2=930077&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 1 20:30:27 2010 @@ -137,6 +137,8 @@ class EC2Response(Response): raise InvalidCredsException(err_list[-1]) if code.text == "AuthFailure": raise InvalidCredsException(err_list[-1]) + if code.text == "OptInRequired": + raise InvalidCredsException(err_list[-1]) return "\n".join(err_list) class EC2Connection(ConnectionUserAndKey): From libcloud-commits-return-291samanthafuller@example.net Fri Apr 09 19:00:10 2010 Return-Path: <libcloud-commits-return-291samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 46436 invoked from network); 9 Apr 2010 19:00:10 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 9 Apr 2010 19:00:10 -0000 Received: (qmail 71791 invoked by uid 500); 9 Apr 2010 19:00:10 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 71771 invoked by uid 500); 9 Apr 2010 19:00:10 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 71764 invoked by uid 99); 9 Apr 2010 19:00:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 19:00:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 19:00:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 63C6723888E8; Fri, 9 Apr 2010 18:59:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r932546 - in /incubator/libcloud/trunk: libcloud/drivers/softlayer.py test/test_softlayer.py Date: Fri, 09 Apr 2010 18:59:48 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: oremj Date: Fri Apr 9 18:59:48 2010 New Revision: 932546 URL: http://svn.apache.org/viewvc?rev=932546&view=rev Log: Softlayer: modify create_node, add static list_images and list_sizes. Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py incubator/libcloud/trunk/test/test_softlayer.py Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/softlayer.py?rev=932546&r1=932545&r2=932546&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/softlayer.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/softlayer.py Fri Apr 9 18:59:48 2010 @@ -20,7 +20,7 @@ import xmlrpclib import libcloud from libcloud.types import Provider, InvalidCredsException, NodeState -from libcloud.base import NodeDriver, Node, NodeLocation +from libcloud.base import NodeDriver, Node, NodeLocation, NodeSize, NodeImage DATACENTERS = { 'sea01': {'country': 'US'}, @@ -34,6 +34,89 @@ NODE_STATE_MAP = { 'PAUSED': NodeState.TERMINATED, } +DEFAULT_PACKAGE = 46 + +SL_IMAGES = [ + {'id': 1684, 'name': 'CentOS 5 - Minimal Install (32 bit)'}, + {'id': 1685, 'name': 'CentOS 5 - Minimal Install (64 bit)'}, + {'id': 1686, 'name': 'CentOS 5 - LAMP Install (32 bit)'}, + {'id': 1687, 'name': 'CentOS 5 - LAMP Install (64 bit)'}, + {'id': 1688, 'name': 'Red Hat Enterprise Linux 5 - Minimal Install (32 bit)'}, + {'id': 1689, 'name': 'Red Hat Enterprise Linux 5 - Minimal Install (64 bit)'}, + {'id': 1690, 'name': 'Red Hat Enterprise Linux 5 - LAMP Install (32 bit)'}, + {'id': 1691, 'name': 'Red Hat Enterprise Linux 5 - LAMP Install (64 bit)'}, + {'id': 1692, 'name': 'Ubuntu Linux 8 LTS Hardy Heron - Minimal Install (32 bit)'}, + {'id': 1693, 'name': 'Ubuntu Linux 8 LTS Hardy Heron - Minimal Install (64 bit)'}, + {'id': 1694, 'name': 'Ubuntu Linux 8 LTS Hardy Heron - LAMP Install (32 bit)'}, + {'id': 1695, 'name': 'Ubuntu Linux 8 LTS Hardy Heron - LAMP Install (64 bit)'}, + {'id': 1696, 'name': 'Debian GNU/Linux 5.0 Lenny/Stable - Minimal Install (32 bit)'}, + {'id': 1697, 'name': 'Debian GNU/Linux 5.0 Lenny/Stable - Minimal Install (64 bit)'}, + {'id': 1698, 'name': 'Debian GNU/Linux 5.0 Lenny/Stable - LAMP Install (32 bit)'}, + {'id': 1699, 'name': 'Debian GNU/Linux 5.0 Lenny/Stable - LAMP Install (64 bit)'}, + {'id': 1700, 'name': 'Windows Server 2003 Standard SP2 with R2 (32 bit)'}, + {'id': 1701, 'name': 'Windows Server 2003 Standard SP2 with R2 (64 bit)'}, + {'id': 1703, 'name': 'Windows Server 2003 Enterprise SP2 with R2 (64 bit)'}, + {'id': 1705, 'name': 'Windows Server 2008 Standard Edition (64bit)'}, + {'id': 1715, 'name': 'Windows Server 2003 Datacenter SP2 (64 bit)'}, + {'id': 1716, 'name': 'Windows Server 2003 Datacenter SP2 (32 bit)'}, + {'id': 1742, 'name': 'Windows Server 2008 Standard Edition SP2 (32bit)'}, + {'id': 1752, 'name': 'Windows Server 2008 Standard Edition SP2 (64bit)'}, + {'id': 1756, 'name': 'Windows Server 2008 Enterprise Edition SP2 (32bit)'}, + {'id': 1761, 'name': 'Windows Server 2008 Enterprise Edition SP2 (64bit)'}, + {'id': 1766, 'name': 'Windows Server 2008 Datacenter Edition SP2 (32bit)'}, + {'id': 1770, 'name': 'Windows Server 2008 Datacenter Edition SP2 (64bit)'}, + {'id': 1857, 'name': 'Windows Server 2008 R2 Standard Edition (64bit)'}, + {'id': 1860, 'name': 'Windows Server 2008 R2 Enterprise Edition (64bit)'}, + {'id': 1863, 'name': 'Windows Server 2008 R2 Datacenter Edition (64bit)'}, +] + +SL_TEMPLATES = { + 'sl1': { + 'imagedata': { + 'name': '2 x 2.0 GHz, 1GB ram, 100GB', + 'ram': 1024, + 'disk': 100, + 'bandwidth': None + }, + 'prices': [ + {'id': 1644}, # 1 GB + {'id': 1639}, # 100 GB (SAN) + {'id': 1963}, # Private 2 x 2.0 GHz Cores + {'id': 21}, # 1 IP Address + {'id': 55}, # Host Ping + {'id': 58}, # Automated Notification + {'id': 1800}, # 0 GB Bandwidth + {'id': 57}, # Email and Ticket + {'id': 274}, # 1000 Mbps Public & Private Networks + {'id': 905}, # Reboot / Remote Console + {'id': 418}, # Nessus Vulnerability Assessment & Reporting + {'id': 420}, # Unlimited SSL VPN Users & 1 PPTP VPN User per account + ], + }, + 'sl2': { + 'imagedata': { + 'name': '2 x 2.0 GHz, 4GB ram, 250GB', + 'ram': 4096, + 'disk': 250, + 'bandwidth': None + }, + 'prices': [ + {'id': 1646}, # 4 GB + {'id': 1638}, # 250 GB (SAN) + {'id': 1963}, # Private 2 x 2.0 GHz Cores + {'id': 21}, # 1 IP Address + {'id': 55}, # Host Ping + {'id': 58}, # Automated Notification + {'id': 1800}, # 0 GB Bandwidth + {'id': 57}, # Email and Ticket + {'id': 274}, # 1000 Mbps Public & Private Networks + {'id': 905}, # Reboot / Remote Console + {'id': 418}, # Nessus Vulnerability Assessment & Reporting + {'id': 420}, # Unlimited SSL VPN Users & 1 PPTP VPN User per account + ], + } +} + class SoftLayerException(Exception): pass @@ -164,30 +247,22 @@ class SoftLayerNodeDriver(NodeDriver): def create_node(self, **kwargs): """ - Right now the best way to create a new node in softlayer is by - cloning an already created node, so size and image do not apply. - - @keyword node: A Node which will serve as the template for the new node - @type node: L{Node} - @keyword domain: e.g. libcloud.org @type domain: str """ name = kwargs['name'] - location = kwargs['location'] - node = kwargs['node'] + image = kwargs['image'] + size = kwargs['size'] domain = kwargs['domain'] + location = kwargs['location'] - res = self.connection.request( - "SoftLayer_Virtual_Guest", - "getOrderTemplate", - "HOURLY", - id=node.id - ) - + res = {'prices': SL_TEMPLATES[size.id]['prices']} + res['packageId'] = DEFAULT_PACKAGE + res['prices'].append({'id': image.id}) # Add OS to order res['location'] = location.id res['complexType'] = 'SoftLayer_Container_Product_Order_Virtual_Guest' res['quantity'] = 1 + res['useHourlyPricing'] = True res['virtualGuests'] = [ { 'hostname': name, @@ -201,7 +276,40 @@ class SoftLayerNodeDriver(NodeDriver): res ) - return None # the instance won't be available for a while. + # Softlayer's create node doesn't really tell us anything. + return Node( + id=None, + name=res['orderDetails']['virtualGuests'][0]['hostname'], + state=NodeState.PENDING, + public_ip=None, + private_ip=None, + driver=self.connection.driver + ) + + + def _to_image(self, img): + return NodeImage( + id=img['id'], + name=img['name'], + driver=self.connection.driver + ) + + def list_images(self): + return [self._to_image(i) for i in SL_IMAGES] + + def _to_size(self, id, size): + return NodeSize( + id=id, + name=size['name'], + ram=size['ram'], + disk=size['disk'], + bandwidth=size['bandwidth'], + price=None, + driver=self.connection.driver, + ) + + def list_sizes(self): + return [self._to_size(id, s['imagedata']) for id, s in SL_TEMPLATES.iteritems()] def _to_loc(self, loc): return NodeLocation( Modified: incubator/libcloud/trunk/test/test_softlayer.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_softlayer.py?rev=932546&r1=932545&r2=932546&view=diff ============================================================================== --- incubator/libcloud/trunk/test/test_softlayer.py (original) +++ incubator/libcloud/trunk/test/test_softlayer.py Fri Apr 9 18:59:48 2010 @@ -56,6 +56,16 @@ class SoftLayerTests(unittest.TestCase): self.assertEqual(seattle.country, 'US') self.assertEqual(seattle.id, 18171) + def test_list_images(self): + images = self.driver.list_images() + image = images[0] + self.assertEqual(image.id, 1684) + + def test_list_sizes(self): + sizes = self.driver.list_sizes() + self.assertEqual(len(sizes), 2) + self.assertEqual(sizes[0].id, 'sl1') + class SoftLayerMockHttp(MockHttp): fixtures = FileFixtures('softlayer') From libcloud-commits-return-292samanthafuller@example.net Wed Apr 14 17:55:54 2010 Return-Path: <libcloud-commits-return-292samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 19733 invoked from network); 14 Apr 2010 17:55:54 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 14 Apr 2010 17:55:54 -0000 Received: (qmail 80883 invoked by uid 500); 14 Apr 2010 17:55:54 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 80863 invoked by uid 500); 14 Apr 2010 17:55:54 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 80856 invoked by uid 99); 14 Apr 2010 17:55:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 17:55:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 17:55:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5F52523889DA; Wed, 14 Apr 2010 17:55:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r934057 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py Date: Wed, 14 Apr 2010 17:55:30 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: oremj Date: Wed Apr 14 17:55:30 2010 New Revision: 934057 URL: http://svn.apache.org/viewvc?rev=934057&view=rev Log: EC2 SecurityGroups in list_nodes (DescribeInstances) [p=richard kreuter] Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=934057&r1=934056&r2=934057&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Wed Apr 14 17:55:30 2010 @@ -230,11 +230,11 @@ class EC2NodeDriver(NodeDriver): for term_status in ('shutting-down', 'terminated') ]) - def _to_nodes(self, object, xpath): - return [ self._to_node(el) + def _to_nodes(self, object, xpath, groups=None): + return [ self._to_node(el, groups=groups) for el in object.findall(self._fixxpath(xpath)) ] - def _to_node(self, element): + def _to_node(self, element, groups=None): try: state = self.NODE_STATE_MAP[ self._findattr(element, "instanceState/name") @@ -266,7 +266,8 @@ class EC2NodeDriver(NodeDriver): 'availability': self._findattr(element, "placement/availabilityZone"), 'kernelid': self._findattr(element, "kernelId"), - 'ramdiskid': self._findattr(element, "ramdiskId") + 'ramdiskid': self._findattr(element, "ramdiskId"), + 'groups': groups } ) return n @@ -285,9 +286,12 @@ class EC2NodeDriver(NodeDriver): def list_nodes(self): params = {'Action': 'DescribeInstances' } - nodes = self._to_nodes( - self.connection.request('/', params=params).object, - 'reservationSet/item/instancesSet/item') + elem=self.connection.request('/', params=params).object + nodes=[] + for rs in self._findall(elem, 'reservationSet/item'): + groups=[g.findtext('') + for g in self._findall(rs, 'groupSet/item/groupId')] + nodes += self._to_nodes(rs, 'instancesSet/item', groups) return nodes def list_sizes(self, location=None): From libcloud-commits-return-293samanthafuller@example.net Wed Apr 14 20:18:23 2010 Return-Path: <libcloud-commits-return-293samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 61287 invoked from network); 14 Apr 2010 20:18:23 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 14 Apr 2010 20:18:23 -0000 Received: (qmail 3906 invoked by uid 500); 14 Apr 2010 20:18:23 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 3886 invoked by uid 500); 14 Apr 2010 20:18:23 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 3879 invoked by uid 99); 14 Apr 2010 20:18:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:18:23 +0000 X-ASF-Spam-Status: No, hits=-1055.4 required=10.0 tests=ALL_TRUSTED,AWL,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:18:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E19D123888FE; Wed, 14 Apr 2010 20:18:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r934172 - /incubator/libcloud/trunk/libcloud/drivers/slicehost.py Date: Wed, 14 Apr 2010 20:18:01 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Wed Apr 14 20:18:01 2010 New Revision: 934172 URL: http://svn.apache.org/viewvc?rev=934172&view=rev Log: expose more attributes in the slicehost driver Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/slicehost.py?rev=934172&r1=934171&r2=934172&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/slicehost.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/slicehost.py Wed Apr 14 20:18:01 2010 @@ -174,15 +174,15 @@ class SlicehostNodeDriver(NodeDriver): except: state = NodeState.UNKNOWN + # for consistency with other drivers, we put this in two places. + node_attrs['password'] = node_attrs['root-password'] n = Node(id=element.findtext('id'), name=element.findtext('name'), state=state, public_ip=[public_ip], private_ip=[private_ip], driver=self.connection.driver, - extra={ - 'password': element.findtext('root-password'), - }) + extra=node_attrs) return n def _to_sizes(self, object): From libcloud-commits-return-294samanthafuller@example.net Wed Apr 14 20:36:23 2010 Return-Path: <libcloud-commits-return-294samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 84985 invoked from network); 14 Apr 2010 20:36:22 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 14 Apr 2010 20:36:22 -0000 Received: (qmail 22702 invoked by uid 500); 14 Apr 2010 20:36:22 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 22685 invoked by uid 500); 14 Apr 2010 20:36:22 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 22678 invoked by uid 99); 14 Apr 2010 20:36:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:36:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:36:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ADE3423889DA; Wed, 14 Apr 2010 20:35:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r934185 - /incubator/libcloud/trunk/libcloud/drivers/slicehost.py Date: Wed, 14 Apr 2010 20:35:59 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Wed Apr 14 20:35:59 2010 New Revision: 934185 URL: http://svn.apache.org/viewvc?rev=934185&view=rev Log: use underscore, not - Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/slicehost.py?rev=934185&r1=934184&r2=934185&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/slicehost.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/slicehost.py Wed Apr 14 20:35:59 2010 @@ -176,13 +176,17 @@ class SlicehostNodeDriver(NodeDriver): # for consistency with other drivers, we put this in two places. node_attrs['password'] = node_attrs['root-password'] + extra = {} + for k in node_attrs.keys(): + ek = k.replace("-", "_") + extra[ek] = node_attrs[k] n = Node(id=element.findtext('id'), name=element.findtext('name'), state=state, public_ip=[public_ip], private_ip=[private_ip], driver=self.connection.driver, - extra=node_attrs) + extra=extra) return n def _to_sizes(self, object): From libcloud-commits-return-295samanthafuller@example.net Wed Apr 14 20:57:37 2010 Return-Path: <libcloud-commits-return-295samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 98077 invoked from network); 14 Apr 2010 20:57:37 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 14 Apr 2010 20:57:37 -0000 Received: (qmail 53647 invoked by uid 500); 14 Apr 2010 20:57:37 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 53639 invoked by uid 500); 14 Apr 2010 20:57:37 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 53610 invoked by uid 99); 14 Apr 2010 20:57:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:57:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 20:57:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 37E7123889DA; Wed, 14 Apr 2010 20:57:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r934197 - /incubator/libcloud/trunk/libcloud/drivers/slicehost.py Date: Wed, 14 Apr 2010 20:57:14 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Wed Apr 14 20:57:13 2010 New Revision: 934197 URL: http://svn.apache.org/viewvc?rev=934197&view=rev Log: Fix Slicehost Destroy node: Slicehost is returning a 1 byte response, with content type of XML, but no XML. This was breaking the ET parser when it couldn't parse it to an object. Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/slicehost.py?rev=934197&r1=934196&r2=934197&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/slicehost.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/slicehost.py Wed Apr 14 20:57:13 2010 @@ -27,7 +27,9 @@ from xml.parsers.expat import ExpatError class SlicehostResponse(Response): def parse_body(self): - if not self.body: + # length of 1 can't be valid XML, but on destroy node, slicehost returns + # a 1 byte response with a "Content-Type: application/xml" header. booya. + if not self.body or len(self.body) <= 1: return None return ET.XML(self.body) From libcloud-commits-return-296samanthafuller@example.net Thu Apr 22 00:04:05 2010 Return-Path: <libcloud-commits-return-296samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 82190 invoked from network); 22 Apr 2010 00:04:05 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 00:04:05 -0000 Received: (qmail 7932 invoked by uid 500); 22 Apr 2010 00:04:05 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 7912 invoked by uid 500); 22 Apr 2010 00:04:04 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 7905 invoked by uid 99); 22 Apr 2010 00:04:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 00:04:04 +0000 X-ASF-Spam-Status: No, hits=-1072.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 00:04:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0A85A23888A2; Thu, 22 Apr 2010 00:03:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r936574 - in /incubator/libcloud/trunk/libcloud: base.py drivers/ec2.py providers.py types.py Date: Thu, 22 Apr 2010 00:03:21 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Thu Apr 22 00:03:21 2010 New Revision: 936574 URL: http://svn.apache.org/viewvc?rev=936574&view=rev Log: Start a eucalyptus driver. Modified: incubator/libcloud/trunk/libcloud/base.py incubator/libcloud/trunk/libcloud/drivers/ec2.py incubator/libcloud/trunk/libcloud/providers.py incubator/libcloud/trunk/libcloud/types.py Modified: incubator/libcloud/trunk/libcloud/base.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=936574&r1=936573&r2=936574&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/base.py (original) +++ incubator/libcloud/trunk/libcloud/base.py Thu Apr 22 00:03:21 2010 @@ -319,7 +319,7 @@ class ConnectionKey(object): secure = 1 driver = None - def __init__(self, key, secure=True): + def __init__(self, key, secure=True, host=None): """ Initialize `user_id` and `key`; set `secure` to an C{int} based on passed value. @@ -327,6 +327,8 @@ class ConnectionKey(object): self.key = key self.secure = secure and 1 or 0 self.ua = [] + if host: + self.host = host def connect(self, host=None, port=None): """ @@ -454,8 +456,8 @@ class ConnectionUserAndKey(ConnectionKey user_id = None - def __init__(self, user_id, key, secure=True): - super(ConnectionUserAndKey, self).__init__(key, secure) + def __init__(self, user_id, key, secure=True, host=None): + super(ConnectionUserAndKey, self).__init__(key, secure, host) self.user_id = user_id @@ -480,7 +482,7 @@ class NodeDriver(object): """ NODE_STATE_MAP = {} - def __init__(self, key, secret=None, secure=True): + def __init__(self, key, secret=None, secure=True, host=None): """ @keyword key: API key or username to used @type key: str @@ -495,10 +497,17 @@ class NodeDriver(object): self.key = key self.secret = secret self.secure = secure + args = [self.key] + if self.secret: - self.connection = self.connectionCls(key, secret, secure) - else: - self.connection = self.connectionCls(key, secure) + args.append(self.secret) + + args.append(secure) + + if host: + args.append(host) + + self.connection = self.connectionCls(*args) self.connection.driver = self self.connection.connect() Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=936574&r1=936573&r2=936574&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 00:03:21 2010 @@ -444,3 +444,15 @@ class EC2USWestNodeDriver(EC2NodeDriver) _instance_types = EC2_US_WEST_INSTANCE_TYPES def list_locations(self): return [NodeLocation(0, 'Amazon US N. California', 'US', self)] + +class EucConnection(EC2Connection): + + host = None + +class EucNodeDriver(EC2NodeDriver): + + connectionCls = EucConnection + _instance_types = EC2_US_WEST_INSTANCE_TYPES + def list_locations(self): + raise NotImplementedError, \ + 'list_locations not implemented for this driver' Modified: incubator/libcloud/trunk/libcloud/providers.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/providers.py?rev=936574&r1=936573&r2=936574&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/providers.py (original) +++ incubator/libcloud/trunk/libcloud/providers.py Thu Apr 22 00:03:21 2010 @@ -43,6 +43,8 @@ DRIVERS = { ('libcloud.drivers.voxel', 'VoxelNodeDriver'), Provider.SOFTLAYER: ('libcloud.drivers.softlayer', 'SoftLayerNodeDriver'), + Provider.EUCALYPTUS: + ('libcloud.drivers.ec2', 'EucNodeDriver'), } def get_driver(provider): Modified: incubator/libcloud/trunk/libcloud/types.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/types.py?rev=936574&r1=936573&r2=936574&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/types.py (original) +++ incubator/libcloud/trunk/libcloud/types.py Thu Apr 22 00:03:21 2010 @@ -47,6 +47,7 @@ class Provider(object): EC2_US_WEST = 10 VOXEL = 11 SOFTLAYER = 12 + EUCALYPTUS = 13 class NodeState(object): """ From libcloud-commits-return-297samanthafuller@example.net Thu Apr 22 18:27:19 2010 Return-Path: <libcloud-commits-return-297samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 10709 invoked from network); 22 Apr 2010 18:27:19 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 18:27:19 -0000 Received: (qmail 81196 invoked by uid 500); 22 Apr 2010 18:27:19 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 81176 invoked by uid 500); 22 Apr 2010 18:27:18 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 81169 invoked by uid 99); 22 Apr 2010 18:27:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 18:27:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 18:27:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 35660238897A; Thu, 22 Apr 2010 18:26:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r936995 - in /incubator/libcloud/trunk: libcloud/drivers/softlayer.py test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml test/test_softlayer.py Date: Thu, 22 Apr 2010 18:26:30 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: oremj Date: Thu Apr 22 18:26:29 2010 New Revision: 936995 URL: http://svn.apache.org/viewvc?rev=936995&view=rev Log: List node: - add password to extra. Create node: - block until we have all node information. Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py incubator/libcloud/trunk/test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml incubator/libcloud/trunk/test/test_softlayer.py Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/softlayer.py?rev=936995&r1=936994&r2=936995&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/softlayer.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/softlayer.py Thu Apr 22 18:26:29 2010 @@ -16,6 +16,7 @@ Softlayer driver """ +import time import xmlrpclib import libcloud @@ -202,10 +203,18 @@ class SoftLayerConnection(object): return {} class SoftLayerNodeDriver(NodeDriver): + """ + SoftLayer node driver + + Extra node attributes: + - password: root password + """ connectionCls = SoftLayerConnection name = 'SoftLayer' type = Provider.SOFTLAYER + features = {"create_node": ["generates_password"]} + def __init__(self, key, secret=None, secure=False): self.key = key self.secret = secret @@ -213,6 +222,11 @@ class SoftLayerNodeDriver(NodeDriver): self.connection.driver = self def _to_node(self, host): + try: + password = host['softwareComponents'][0]['passwords'][0]['password'] + except IndexError, KeyError: + password = None + return Node( id=host['id'], name=host['hostname'], @@ -222,7 +236,10 @@ class SoftLayerNodeDriver(NodeDriver): ), public_ip=host['primaryIpAddress'], private_ip=host['primaryBackendIpAddress'], - driver=self + driver=self, + extra={ + 'password': password + } ) def _to_nodes(self, hosts): @@ -245,6 +262,39 @@ class SoftLayerNodeDriver(NodeDriver): else: return False + def _get_order_information(self, order_id, timeout=1200, check_interval=5): + mask = { + 'orderTopLevelItems': { + 'billingItem': { + 'resource': { + 'softwareComponents': { + 'passwords': '' + }, + 'powerState': '', + } + }, + } + } + + for i in range(0, timeout, check_interval): + try: + res = self.connection.request( + "SoftLayer_Billing_Order", + "getObject", + id=order_id, + object_mask=mask + ) + item = res['orderTopLevelItems'][0]['billingItem']['resource'] + if item['softwareComponents'][0]['passwords']: + return item + + except KeyError, IndexError: + pass + + time.sleep(check_interval) + + return None + def create_node(self, **kwargs): """ @keyword domain: e.g. libcloud.org @@ -276,16 +326,10 @@ class SoftLayerNodeDriver(NodeDriver): res ) - # Softlayer's create node doesn't really tell us anything. - return Node( - id=None, - name=res['orderDetails']['virtualGuests'][0]['hostname'], - state=NodeState.PENDING, - public_ip=None, - private_ip=None, - driver=self.connection.driver - ) + order_id = res['orderId'] + raw_node = self._get_order_information(order_id) + return self._to_node(raw_node) def _to_image(self, img): return NodeImage( @@ -330,7 +374,12 @@ class SoftLayerNodeDriver(NodeDriver): def list_nodes(self): mask = { - 'virtualGuests': {'powerState': ''} + 'virtualGuests': { + 'powerState': '', + 'softwareComponents': { + 'passwords': '' + } + } } res = self.connection.request( "SoftLayer_Account", Modified: incubator/libcloud/trunk/test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml?rev=936995&r1=936994&r2=936995&view=diff ============================================================================== --- incubator/libcloud/trunk/test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml (original) +++ incubator/libcloud/trunk/test/fixtures/softlayer/v3_SoftLayer_Account_getVirtualGuests.xml Thu Apr 22 18:26:29 2010 @@ -15,7 +15,7 @@ <member> <name>id</name> <value> - <int>1111</int> + <int>1832</int> </value> </member> <member> @@ -33,13 +33,13 @@ <member> <name>uuid</name> <value> - <string>11111111-8121-d110-c111-6fh1e165hh9c</string> + <string>eaa9aaa2-8e2e-d6e0-ce11-6f01e765779c</string> </value> </member> <member> <name>hostname</name> <value> - <string>test01</string> + <string>test1</string> </value> </member> <member> @@ -81,13 +81,13 @@ <member> <name>modifyDate</name> <value> - <string>2010-03-24T18:54:01-05:00</string> + <string>2010-04-22T13:08:47-05:00</string> </value> </member> <member> <name>metricPollDate</name> <value> - <string>2010-03-24T18:53:00-05:00</string> + <string>2010-04-22T13:08:00-05:00</string> </value> </member> <member> @@ -116,15 +116,101 @@ </value> </member> <member> + <name>softwareComponents</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>191115</int> + </value> + </member> + <member> + <name>hardwareId</name> + <value> + <string /> + </value> + </member> + <member> + <name>manufacturerLicenseInstance</name> + <value> + <string /> + </value> + </member> + <member> + <name>passwords</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>166980</int> + </value> + </member> + <member> + <name>softwareId</name> + <value> + <int>191115</int> + </value> + </member> + <member> + <name>username</name> + <value> + <string>root</string> + </value> + </member> + <member> + <name>password</name> + <value> + <string>TEST</string> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2009-09-04T14:49:51-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2009-09-04T14:49:51-05:00</string> + </value> + </member> + <member> + <name>port</name> + <value> + <string /> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + <member> <name>primaryIpAddress</name> <value> - <string>83.161.120.155</string> + <string>83.161.120.155</string> </value> </member> <member> <name>primaryBackendIpAddress</name> <value> - <string>83.161.120.155</string> + <string>83.161.120.155</string> </value> </member> </struct> @@ -140,7 +226,7 @@ <member> <name>id</name> <value> - <int>11111</int> + <int>13402</int> </value> </member> <member> @@ -158,13 +244,13 @@ <member> <name>uuid</name> <value> - <string>21a11114-4111-4141-19f3-51111610dd86</string> + <string>9e9e9e99-4ed9-4645-19f3-55ee4e404d56</string> </value> </member> <member> <name>hostname</name> <value> - <string>test02</string> + <string>test2</string> </value> </member> <member> @@ -206,13 +292,13 @@ <member> <name>modifyDate</name> <value> - <string>2010-03-24T18:58:48-05:00</string> + <string>2010-04-22T13:08:43-05:00</string> </value> </member> <member> <name>metricPollDate</name> <value> - <string>2010-03-24T18:58:00-05:00</string> + <string>2010-04-22T13:08:00-05:00</string> </value> </member> <member> @@ -241,15 +327,734 @@ </value> </member> <member> + <name>softwareComponents</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>257314</int> + </value> + </member> + <member> + <name>hardwareId</name> + <value> + <string /> + </value> + </member> + <member> + <name>manufacturerLicenseInstance</name> + <value> + <string /> + </value> + </member> + <member> + <name>passwords</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>235268</int> + </value> + </member> + <member> + <name>softwareId</name> + <value> + <int>257314</int> + </value> + </member> + <member> + <name>username</name> + <value> + <string>root</string> + </value> + </member> + <member> + <name>password</name> + <value> + <string>TEST</string> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-03-23T17:06:17-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-03-23T17:06:17-05:00</string> + </value> + </member> + <member> + <name>port</name> + <value> + <string /> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + <member> + <name>primaryIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + <member> + <name>primaryBackendIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + </struct> + </value> + <value> + <struct> + <member> + <name>privateNetworkOnlyFlag</name> + <value> + <boolean>0</boolean> + </value> + </member> + <member> + <name>id</name> + <value> + <int>19293</int> + </value> + </member> + <member> + <name>accountId</name> + <value> + <int>11111</int> + </value> + </member> + <member> + <name>statusId</name> + <value> + <int>1001</int> + </value> + </member> + <member> + <name>uuid</name> + <value> + <string>9f99e19b-2c61-9cd5-2081-67b57fd7977b</string> + </value> + </member> + <member> + <name>hostname</name> + <value> + <string>test3</string> + </value> + </member> + <member> + <name>domain</name> + <value> + <string>libcloud.org</string> + </value> + </member> + <member> + <name>maxCpu</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>maxCpuUnits</name> + <value> + <string>CORE</string> + </value> + </member> + <member> + <name>maxMemory</name> + <value> + <int>1024</int> + </value> + </member> + <member> + <name>startCpus</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:38:53-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T13:08:01-05:00</string> + </value> + </member> + <member> + <name>metricPollDate</name> + <value> + <string>2010-04-22T13:08:00-05:00</string> + </value> + </member> + <member> + <name>dedicatedAccountHostOnlyFlag</name> + <value> + <boolean>1</boolean> + </value> + </member> + <member> + <name>powerState</name> + <value> + <struct> + <member> + <name>name</name> + <value> + <string>Running</string> + </value> + </member> + <member> + <name>keyName</name> + <value> + <string>RUNNING</string> + </value> + </member> + </struct> + </value> + </member> + <member> + <name>softwareComponents</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>277185</int> + </value> + </member> + <member> + <name>hardwareId</name> + <value> + <string /> + </value> + </member> + <member> + <name>manufacturerLicenseInstance</name> + <value> + <string /> + </value> + </member> + <member> + <name>passwords</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>250826</int> + </value> + </member> + <member> + <name>softwareId</name> + <value> + <int>277185</int> + </value> + </member> + <member> + <name>username</name> + <value> + <string>root</string> + </value> + </member> + <member> + <name>password</name> + <value> + <string>TEST</string> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:38:57-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T12:38:57-05:00</string> + </value> + </member> + <member> + <name>port</name> + <value> + <string /> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + <member> + <name>primaryIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + <member> + <name>primaryBackendIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + </struct> + </value> + <value> + <struct> + <member> + <name>privateNetworkOnlyFlag</name> + <value> + <boolean>0</boolean> + </value> + </member> + <member> + <name>id</name> + <value> + <int>19288</int> + </value> + </member> + <member> + <name>accountId</name> + <value> + <int>11111</int> + </value> + </member> + <member> + <name>statusId</name> + <value> + <int>1001</int> + </value> + </member> + <member> + <name>uuid</name> + <value> + <string>999f77d9-679b-c47d-136d-04cd302384ec</string> + </value> + </member> + <member> + <name>hostname</name> + <value> + <string>test4</string> + </value> + </member> + <member> + <name>domain</name> + <value> + <string>libcloud.org</string> + </value> + </member> + <member> + <name>maxCpu</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>maxCpuUnits</name> + <value> + <string>CORE</string> + </value> + </member> + <member> + <name>maxMemory</name> + <value> + <int>1024</int> + </value> + </member> + <member> + <name>startCpus</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:15:24-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T13:08:31-05:00</string> + </value> + </member> + <member> + <name>metricPollDate</name> + <value> + <string>2010-04-22T13:08:00-05:00</string> + </value> + </member> + <member> + <name>dedicatedAccountHostOnlyFlag</name> + <value> + <boolean>1</boolean> + </value> + </member> + <member> + <name>powerState</name> + <value> + <struct> + <member> + <name>name</name> + <value> + <string>Running</string> + </value> + </member> + <member> + <name>keyName</name> + <value> + <string>RUNNING</string> + </value> + </member> + </struct> + </value> + </member> + <member> + <name>softwareComponents</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>277171</int> + </value> + </member> + <member> + <name>hardwareId</name> + <value> + <string /> + </value> + </member> + <member> + <name>manufacturerLicenseInstance</name> + <value> + <string /> + </value> + </member> + <member> + <name>passwords</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>250815</int> + </value> + </member> + <member> + <name>softwareId</name> + <value> + <int>277171</int> + </value> + </member> + <member> + <name>username</name> + <value> + <string>root</string> + </value> + </member> + <member> + <name>password</name> + <value> + <string>TEST</string> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:15:26-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T12:15:26-05:00</string> + </value> + </member> + <member> + <name>port</name> + <value> + <string /> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + <member> + <name>primaryIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + <member> + <name>primaryBackendIpAddress</name> + <value> + <string>83.161.120.155</string> + </value> + </member> + </struct> + </value> + <value> + <struct> + <member> + <name>privateNetworkOnlyFlag</name> + <value> + <boolean>0</boolean> + </value> + </member> + <member> + <name>id</name> + <value> + <int>19284</int> + </value> + </member> + <member> + <name>accountId</name> + <value> + <int>11111</int> + </value> + </member> + <member> + <name>statusId</name> + <value> + <int>1001</int> + </value> + </member> + <member> + <name>uuid</name> + <value> + <string>f3c73738-7731-1372-f3c3-e6808082f824</string> + </value> + </member> + <member> + <name>hostname</name> + <value> + <string>test5</string> + </value> + </member> + <member> + <name>domain</name> + <value> + <string>libcloud.org</string> + </value> + </member> + <member> + <name>maxCpu</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>maxCpuUnits</name> + <value> + <string>CORE</string> + </value> + </member> + <member> + <name>maxMemory</name> + <value> + <int>1024</int> + </value> + </member> + <member> + <name>startCpus</name> + <value> + <int>2</int> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:11:23-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T13:08:31-05:00</string> + </value> + </member> + <member> + <name>metricPollDate</name> + <value> + <string>2010-04-22T13:08:00-05:00</string> + </value> + </member> + <member> + <name>dedicatedAccountHostOnlyFlag</name> + <value> + <boolean>1</boolean> + </value> + </member> + <member> + <name>powerState</name> + <value> + <struct> + <member> + <name>name</name> + <value> + <string>Running</string> + </value> + </member> + <member> + <name>keyName</name> + <value> + <string>RUNNING</string> + </value> + </member> + </struct> + </value> + </member> + <member> + <name>softwareComponents</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>277167</int> + </value> + </member> + <member> + <name>hardwareId</name> + <value> + <string /> + </value> + </member> + <member> + <name>manufacturerLicenseInstance</name> + <value> + <string /> + </value> + </member> + <member> + <name>passwords</name> + <value> + <array> + <data> + <value> + <struct> + <member> + <name>id</name> + <value> + <int>250811</int> + </value> + </member> + <member> + <name>softwareId</name> + <value> + <int>277167</int> + </value> + </member> + <member> + <name>username</name> + <value> + <string>root</string> + </value> + </member> + <member> + <name>password</name> + <value> + <string>TEST</string> + </value> + </member> + <member> + <name>createDate</name> + <value> + <string>2010-04-22T12:11:27-05:00</string> + </value> + </member> + <member> + <name>modifyDate</name> + <value> + <string>2010-04-22T12:11:27-05:00</string> + </value> + </member> + <member> + <name>port</name> + <value> + <string /> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + </struct> + </value> + </data> + </array> + </value> + </member> + <member> <name>primaryIpAddress</name> <value> - <string>83.161.120.155</string> + <string>83.161.120.155</string> </value> </member> <member> <name>primaryBackendIpAddress</name> <value> - <string>83.161.120.155</string> + <string>83.161.120.155</string> </value> </member> </struct> Modified: incubator/libcloud/trunk/test/test_softlayer.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_softlayer.py?rev=936995&r1=936994&r2=936995&view=diff ============================================================================== --- incubator/libcloud/trunk/test/test_softlayer.py (original) +++ incubator/libcloud/trunk/test/test_softlayer.py Thu Apr 22 18:26:29 2010 @@ -47,8 +47,9 @@ class SoftLayerTests(unittest.TestCase): def test_list_nodes(self): node = self.driver.list_nodes()[0] - self.assertEqual(node.name, 'test01') + self.assertEqual(node.name, 'test1') self.assertEqual(node.state, NodeState.RUNNING) + self.assertEqual(node.extra['password'], 'TEST') def test_list_locations(self): locations = self.driver.list_locations() From libcloud-commits-return-298samanthafuller@example.net Thu Apr 22 19:01:37 2010 Return-Path: <libcloud-commits-return-298samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 31997 invoked from network); 22 Apr 2010 19:01:37 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 19:01:37 -0000 Received: (qmail 52496 invoked by uid 500); 22 Apr 2010 19:01:37 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 52485 invoked by uid 500); 22 Apr 2010 19:01:37 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 52478 invoked by uid 99); 22 Apr 2010 19:01:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:01:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:01:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B908023888CC; Thu, 22 Apr 2010 19:00:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937011 - in /incubator/libcloud/trunk/libcloud: base.py drivers/ec2.py Date: Thu, 22 Apr 2010 19:00:51 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Thu Apr 22 19:00:51 2010 New Revision: 937011 URL: http://svn.apache.org/viewvc?rev=937011&view=rev Log: Improve the Eucalyptus for endpoints not on the root path. Modified: incubator/libcloud/trunk/libcloud/base.py incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/base.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=937011&r1=937010&r2=937011&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/base.py (original) +++ incubator/libcloud/trunk/libcloud/base.py Thu Apr 22 19:00:51 2010 @@ -318,6 +318,7 @@ class ConnectionKey(object): port = (80, 443) secure = 1 driver = None + action = None def __init__(self, key, secure=True, host=None): """ @@ -398,6 +399,8 @@ class ConnectionKey(object): params = {} if headers is None: headers = {} + + self.action = action # Extend default parameters params = self.add_default_params(params) # Extend default headers Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=937011&r1=937010&r2=937011&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 19:00:51 2010 @@ -153,7 +153,7 @@ class EC2Connection(ConnectionUserAndKey params['Version'] = API_VERSION params['Timestamp'] = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()) - params['Signature'] = self._get_aws_auth_param(params, self.key) + params['Signature'] = self._get_aws_auth_param(params, self.key, self.action) return params def _get_aws_auth_param(self, params, secret_key, path='/'): @@ -186,6 +186,7 @@ class EC2NodeDriver(NodeDriver): connectionCls = EC2Connection type = Provider.EC2 name = 'Amazon EC2 (us-east-1)' + path = '/' _instance_types = EC2_US_EAST_INSTANCE_TYPES @@ -286,7 +287,7 @@ class EC2NodeDriver(NodeDriver): def list_nodes(self): params = {'Action': 'DescribeInstances' } - elem=self.connection.request('/', params=params).object + elem=self.connection.request(self.path, params=params).object nodes=[] for rs in self._findall(elem, 'reservationSet/item'): groups=[g.findtext('') @@ -301,7 +302,7 @@ class EC2NodeDriver(NodeDriver): def list_images(self, location=None): params = {'Action': 'DescribeImages'} images = self._to_images( - self.connection.request('/', params=params).object + self.connection.request(self.path, params=params).object ) return images @@ -309,7 +310,7 @@ class EC2NodeDriver(NodeDriver): params = {'Action': 'CreateSecurityGroup', 'GroupName': name, 'GroupDescription': description} - return self.connection.request('/', params=params).object + return self.connection.request(self.path, params=params).object def authorize_security_group_permissive(self, name): results = [] @@ -321,7 +322,7 @@ class EC2NodeDriver(NodeDriver): 'CidrIp': '83.161.120.155/0'} try: results.append( - self.connection.request('/', params=params.copy()).object + self.connection.request(self.path, params=params.copy()).object ) except Exception, e: if e.args[0].find("InvalidPermission.Duplicate") == -1: @@ -330,7 +331,7 @@ class EC2NodeDriver(NodeDriver): try: results.append( - self.connection.request('/', params=params.copy()).object + self.connection.request(self.path, params=params.copy()).object ) except Exception, e: if e.args[0].find("InvalidPermission.Duplicate") == -1: @@ -340,7 +341,7 @@ class EC2NodeDriver(NodeDriver): try: results.append( - self.connection.request('/', params=params.copy()).object + self.connection.request(self.path, params=params.copy()).object ) except Exception, e: if e.args[0].find("InvalidPermission.Duplicate") == -1: @@ -394,7 +395,7 @@ class EC2NodeDriver(NodeDriver): if 'userdata' in kwargs: params['UserData'] = base64.b64encode(kwargs['userdata']) - object = self.connection.request('/', params=params).object + object = self.connection.request(self.path, params=params).object nodes = self._to_nodes(object, 'instancesSet/item') if len(nodes) == 1: @@ -408,7 +409,7 @@ class EC2NodeDriver(NodeDriver): """ params = {'Action': 'RebootInstances'} params.update(self._pathlist('InstanceId', [node.id])) - res = self.connection.request('/', params=params).object + res = self.connection.request(self.path, params=params).object return self._get_boolean(res) def destroy_node(self, node): @@ -417,7 +418,7 @@ class EC2NodeDriver(NodeDriver): """ params = {'Action': 'TerminateInstances'} params.update(self._pathlist('InstanceId', [node.id])) - res = self.connection.request('/', params=params).object + res = self.connection.request(self.path, params=params).object return self._get_terminate_boolean(res) def list_locations(self): @@ -453,6 +454,12 @@ class EucNodeDriver(EC2NodeDriver): connectionCls = EucConnection _instance_types = EC2_US_WEST_INSTANCE_TYPES + + def __init__(self, key, secret=None, secure=True, host=None, path=None): + super(EucNodeDriver, self).__init__(key, secret, secure, host) + if path: + self.path = path + def list_locations(self): raise NotImplementedError, \ 'list_locations not implemented for this driver' From libcloud-commits-return-299samanthafuller@example.net Thu Apr 22 19:08:16 2010 Return-Path: <libcloud-commits-return-299samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 36167 invoked from network); 22 Apr 2010 19:08:16 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 19:08:16 -0000 Received: (qmail 70686 invoked by uid 500); 22 Apr 2010 19:08:16 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 70671 invoked by uid 500); 22 Apr 2010 19:08:16 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 70664 invoked by uid 99); 22 Apr 2010 19:08:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:08:16 +0000 X-ASF-Spam-Status: No, hits=-1080.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:08:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0CAC223889D5; Thu, 22 Apr 2010 19:07:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937014 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py Date: Thu, 22 Apr 2010 19:07:32 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Thu Apr 22 19:07:32 2010 New Revision: 937014 URL: http://svn.apache.org/viewvc?rev=937014&view=rev Log: Handle invalid user/passwords from Eucalyptus, which don't return XML like amazon does. Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=937014&r1=937013&r2=937014&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 19:07:32 2010 @@ -128,6 +128,12 @@ class EC2Response(Response): def parse_error(self): err_list = [] + # Okay, so for Eucalyptus, you can get a 403, with no body, + # if you are using the wrong user/password. + msg = "Failure: 403 Forbidden" + if self.status == 403 and self.body[:len(msg)] == msg: + raise InvalidCredsException(msg) + for err in ET.XML(self.body).findall('Errors/Error'): code, message = err.getchildren() err_list.append("%s: %s" % (code.text, message.text)) From libcloud-commits-return-300samanthafuller@example.net Thu Apr 22 19:15:43 2010 Return-Path: <libcloud-commits-return-300samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 40574 invoked from network); 22 Apr 2010 19:15:43 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 19:15:43 -0000 Received: (qmail 83713 invoked by uid 500); 22 Apr 2010 19:15:43 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 83697 invoked by uid 500); 22 Apr 2010 19:15:43 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 83690 invoked by uid 99); 22 Apr 2010 19:15:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:15:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:15:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 59EF323888DD; Thu, 22 Apr 2010 19:14:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937019 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py Date: Thu, 22 Apr 2010 19:14:58 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Thu Apr 22 19:14:58 2010 New Revision: 937019 URL: http://svn.apache.org/viewvc?rev=937019&view=rev Log: Add correct name values for the various AWS driver types Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=937019&r1=937018&r2=937019&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 19:14:58 2010 @@ -436,6 +436,7 @@ class EC2EUConnection(EC2Connection): class EC2EUNodeDriver(EC2NodeDriver): + name = 'Amazon EC2 (eu-east-1)' connectionCls = EC2EUConnection _instance_types = EC2_EU_WEST_INSTANCE_TYPES def list_locations(self): @@ -447,6 +448,7 @@ class EC2USWestConnection(EC2Connection) class EC2USWestNodeDriver(EC2NodeDriver): + name = 'Amazon EC2 (us-west-1)' connectionCls = EC2USWestConnection _instance_types = EC2_US_WEST_INSTANCE_TYPES def list_locations(self): @@ -458,6 +460,7 @@ class EucConnection(EC2Connection): class EucNodeDriver(EC2NodeDriver): + name = 'Eucalyptus' connectionCls = EucConnection _instance_types = EC2_US_WEST_INSTANCE_TYPES From libcloud-commits-return-301samanthafuller@example.net Thu Apr 22 20:05:44 2010 Return-Path: <libcloud-commits-return-301samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 66496 invoked from network); 22 Apr 2010 20:05:44 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 20:05:44 -0000 Received: (qmail 65685 invoked by uid 500); 22 Apr 2010 20:05:44 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 65669 invoked by uid 500); 22 Apr 2010 20:05:44 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 65661 invoked by uid 99); 22 Apr 2010 20:05:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:05:44 +0000 X-ASF-Spam-Status: No, hits=-1088.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:05:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9C7E8238897D; Thu, 22 Apr 2010 20:05:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937041 - in /incubator/libcloud/trunk/libcloud: base.py drivers/ec2.py Date: Thu, 22 Apr 2010 20:05:01 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Thu Apr 22 20:05:01 2010 New Revision: 937041 URL: http://svn.apache.org/viewvc?rev=937041&view=rev Log: Add support for specifying the port used for an eucalyptus cluster endpoint. Modified: incubator/libcloud/trunk/libcloud/base.py incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/base.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=937041&r1=937040&r2=937041&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/base.py (original) +++ incubator/libcloud/trunk/libcloud/base.py Thu Apr 22 20:05:01 2010 @@ -320,7 +320,7 @@ class ConnectionKey(object): driver = None action = None - def __init__(self, key, secure=True, host=None): + def __init__(self, key, secure=True, host=None, force_port=None): """ Initialize `user_id` and `key`; set `secure` to an C{int} based on passed value. @@ -331,6 +331,9 @@ class ConnectionKey(object): if host: self.host = host + if force_port: + self.port = (force_port, force_port) + def connect(self, host=None, port=None): """ Establish a connection with the API server. @@ -459,8 +462,8 @@ class ConnectionUserAndKey(ConnectionKey user_id = None - def __init__(self, user_id, key, secure=True, host=None): - super(ConnectionUserAndKey, self).__init__(key, secure, host) + def __init__(self, user_id, key, secure=True, host=None, port=None): + super(ConnectionUserAndKey, self).__init__(key, secure, host, port) self.user_id = user_id @@ -474,6 +477,7 @@ class NodeDriver(object): connectionCls = ConnectionKey name = None type = None + port = None features = {"create_node": []} """ List of available features for a driver. @@ -485,7 +489,7 @@ class NodeDriver(object): """ NODE_STATE_MAP = {} - def __init__(self, key, secret=None, secure=True, host=None): + def __init__(self, key, secret=None, secure=True, host=None, port=None): """ @keyword key: API key or username to used @type key: str @@ -510,6 +514,9 @@ class NodeDriver(object): if host: args.append(host) + if port: + args.append(port) + self.connection = self.connectionCls(*args) self.connection.driver = self Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=937041&r1=937040&r2=937041&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 20:05:01 2010 @@ -464,8 +464,8 @@ class EucNodeDriver(EC2NodeDriver): connectionCls = EucConnection _instance_types = EC2_US_WEST_INSTANCE_TYPES - def __init__(self, key, secret=None, secure=True, host=None, path=None): - super(EucNodeDriver, self).__init__(key, secret, secure, host) + def __init__(self, key, secret=None, secure=True, host=None, path=None, port=None): + super(EucNodeDriver, self).__init__(key, secret, secure, host, port) if path: self.path = path From libcloud-commits-return-302samanthafuller@example.net Thu Apr 22 20:07:06 2010 Return-Path: <libcloud-commits-return-302samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 67489 invoked from network); 22 Apr 2010 20:07:06 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 22 Apr 2010 20:07:06 -0000 Received: (qmail 68199 invoked by uid 500); 22 Apr 2010 20:07:06 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 68183 invoked by uid 500); 22 Apr 2010 20:07:06 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 68176 invoked by uid 99); 22 Apr 2010 20:07:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:07:06 +0000 X-ASF-Spam-Status: No, hits=-1096.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:07:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 84BF9238897D; Thu, 22 Apr 2010 20:06:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937042 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py Date: Thu, 22 Apr 2010 20:06:23 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: pquerna Date: Thu Apr 22 20:06:23 2010 New Revision: 937042 URL: http://svn.apache.org/viewvc?rev=937042&view=rev Log: set default path for eucalyptus Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=937042&r1=937041&r2=937042&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Thu Apr 22 20:06:23 2010 @@ -466,8 +466,9 @@ class EucNodeDriver(EC2NodeDriver): def __init__(self, key, secret=None, secure=True, host=None, path=None, port=None): super(EucNodeDriver, self).__init__(key, secret, secure, host, port) - if path: - self.path = path + if path is None: + path = "/services/Eucalyptus" + self.path = path def list_locations(self): raise NotImplementedError, \ From libcloud-commits-return-303samanthafuller@example.net Fri Apr 23 00:30:21 2010 Return-Path: <libcloud-commits-return-303samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 88641 invoked from network); 23 Apr 2010 00:30:21 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 23 Apr 2010 00:30:21 -0000 Received: (qmail 69221 invoked by uid 500); 23 Apr 2010 00:30:21 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 69211 invoked by uid 500); 23 Apr 2010 00:30:21 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:samanthafuller@example.net> List-Unsubscribe: <mailto:samanthafuller@example.net> List-Post: <mailto:samanthafuller@example.net> List-Id: <libcloud-commits.incubator.apache.org> Reply-To: samanthafuller@example.net Delivered-To: mailing list samanthafuller@example.net Received: (qmail 69198 invoked by uid 99); 23 Apr 2010 00:30:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Apr 2010 00:30:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Apr 2010 00:30:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 55B8723889B3; Fri, 23 Apr 2010 00:29:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937114 - /incubator/libcloud/trunk/libcloud/drivers/softlayer.py Date: Fri, 23 Apr 2010 00:29:38 -0000 To: samanthafuller@example.net From: samanthafuller@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <samanthafuller@example.net> Author: oremj Date: Fri Apr 23 00:29:38 2010 New Revision: 937114 URL: http://svn.apache.org/viewvc?rev=937114&view=rev Log: Fix IndexError in _get_order_information. Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py Modified: incubator/libcloud/trunk/libcloud/drivers/softlayer.py URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/softlayer.py?rev=937114&r1=937113&r2=937114&view=diff ============================================================================== --- incubator/libcloud/trunk/libcloud/drivers/softlayer.py (original) +++ incubator/libcloud/trunk/libcloud/drivers/softlayer.py Fri Apr 23 00:29:38 2010 @@ -288,7 +288,7 @@ class SoftLayerNodeDriver(NodeDriver): if item['softwareComponents'][0]['passwords']: return item - except KeyError, IndexError: + except (KeyError, IndexError): pass time.sleep(check_interval) From libcloud-commits-return-304samanthafuller@example.net Fri Apr 23 22:21:49 2010 Return-Path: <libcloud-commits-return-304samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 17510 invoked from network); 23 Apr 2010 22:21:49 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 23 Apr 2010 22:21:49 -0000 Received: (qmail 53155 invoked by uid 500); 23 Apr 2010 22:21:49 -0000 Delivered-To: samanthafuller@example.net Received: (qmail 53136 invoked
{'source': 'Apache Software Foundation Public Mail Archives'}