You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/05/23 19:42:15 UTC
svn commit: r1126614 - in /incubator/libcloud/trunk:
libcloud/compute/drivers/ec2.py test/compute/test_ec2.py
Author: tomaz
Date: Mon May 23 17:42:14 2011
New Revision: 1126614
URL: http://svn.apache.org/viewvc?rev=1126614&view=rev
Log:
ex_create_tags should be a pass-through in Nimbus driver since Nimbus doesn't support this method.
Modified:
incubator/libcloud/trunk/libcloud/compute/drivers/ec2.py
incubator/libcloud/trunk/test/compute/test_ec2.py
Modified: incubator/libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1126614&r1=1126613&r2=1126614&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ incubator/libcloud/trunk/libcloud/compute/drivers/ec2.py Mon May 23 17:42:14 2011
@@ -1006,10 +1006,17 @@ class NimbusNodeDriver(EC2NodeDriver):
_instance_types = NIMBUS_INSTANCE_TYPES
def ex_describe_addresses(self, nodes):
- """Nimbus doesn't support elastic IPs, so this is a passthrough
+ """
+ Nimbus doesn't support elastic IPs, so this is a passthrough
"""
nodes_elastic_ip_mappings = {}
for node in nodes:
# empty list per node
nodes_elastic_ip_mappings[node.id] = []
return nodes_elastic_ip_mappings
+
+ def ex_create_tags(self, node, tags):
+ """
+ Nimbus doesn't support creating tags, so this is a passthrough
+ """
+ pass
Modified: incubator/libcloud/trunk/test/compute/test_ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/compute/test_ec2.py?rev=1126614&r1=1126613&r2=1126614&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/compute/test_ec2.py (original)
+++ incubator/libcloud/trunk/test/compute/test_ec2.py Mon May 23 17:42:14 2011
@@ -340,5 +340,12 @@ class NimbusTests(EC2Tests):
self.assertEqual(len(node.public_ip), 1)
self.assertEqual(public_ips[0], '1.2.3.5')
+ def test_ex_create_tags(self):
+ # Nimbus doesn't support creating tags so this one should be a
+ # passthrough
+ node = self.driver.list_nodes()[0]
+ EC2MockHttp.type = 'EX_CREATE_TAGS'
+ self.driver.ex_create_tags(node=node, tags={'foo': 'bar'})
+
if __name__ == '__main__':
sys.exit(unittest.main())