libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [3/4] libcloud git commit: Force detaching ec2 volume Closes #1007
Date Sat, 01 Apr 2017 22:57:14 GMT
Force detaching ec2 volume
Closes #1007


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

Branch: refs/heads/trunk
Commit: e0f5fdd1aae321c78c75b14aa7e38e127cfe4c98
Parents: c0c38e4
Author: mermoldy <s.babak@scalr.com>
Authored: Wed Jan 11 01:28:34 2017 +0200
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Sun Apr 2 08:55:52 2017 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e0f5fdd1/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 1c7a655..3cf637d 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3622,11 +3622,13 @@ class BaseEC2NodeDriver(NodeDriver):
         self.connection.request(self.path, params=params)
         return True
 
-    def detach_volume(self, volume):
+    def detach_volume(self, volume, ex_force=False):
         params = {
             'Action': 'DetachVolume',
             'VolumeId': volume.id}
 
+        if ex_force:
+            params['Force'] = 1
         self.connection.request(self.path, params=params)
         return True
 


Mime
View raw message