libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [8/9] git commit: Modify ex_delete_network method to take "vpc" as an argument.
Date Wed, 25 Dec 2013 20:53:14 GMT
Modify ex_delete_network method to take "vpc" as an argument.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1dea168d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1dea168d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1dea168d

Branch: refs/heads/trunk
Commit: 1dea168d3fd15db1d27aa0ab23ffd55e08ec2bec
Parents: 07c9f14
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Wed Dec 25 21:44:56 2013 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Dec 25 21:44:56 2013 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py   | 8 ++++----
 libcloud/test/compute/test_ec2.py | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1dea168d/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 346d261..981c436 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -1538,16 +1538,16 @@ class BaseEC2NodeDriver(NodeDriver):
 
         return network
 
-    def ex_delete_network(self, vpc_id):
+    def ex_delete_network(self, vpc):
         """
         Deletes a network/VPC.
 
-        :param      vpc_id: The ID of the VPC
-        :type       vpc_id: ``str``
+        :param      vpc: VPC to delete.
+        :type       vpc: :class:`.EC2Network`
 
         :rtype:     ``bool``
         """
-        params = {'Action': 'DeleteVpc', 'VpcId': vpc_id}
+        params = {'Action': 'DeleteVpc', 'VpcId': vpc.id}
 
         result = self.connection.request(self.path, params=params).object
         element = findtext(element=result, xpath='return',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1dea168d/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 83cdb8d..44116a0 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -808,7 +808,7 @@ class EC2Tests(LibcloudTestCase, TestCaseMixin):
         vpcs = self.driver.ex_list_networks()
         vpc = vpcs[0]
 
-        resp = self.driver.ex_delete_network(vpc.id)
+        resp = self.driver.ex_delete_network(vpc)
         self.assertTrue(resp)
 
 


Mime
View raw message