libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quent...@apache.org
Subject [1/3] libcloud git commit: Fix ec2 volume encryption
Date Thu, 19 Oct 2017 05:14:22 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 7ea3646c0 -> bf35421ea


Fix ec2 volume encryption


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

Branch: refs/heads/trunk
Commit: 61c3e50374519212e4bc04e0f0c276054e58ec34
Parents: 7ea3646
Author: mermoldy <s.babak@scalr.com>
Authored: Wed Jan 11 01:11:47 2017 +0200
Committer: Quentin Pradet <quentinp@apache.org>
Committed: Thu Oct 19 09:08:19 2017 +0400

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/61c3e503/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index dd62097..9b4b218 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3906,7 +3906,7 @@ class BaseEC2NodeDriver(NodeDriver):
 
     def create_volume(self, size, name, location=None, snapshot=None,
                       ex_volume_type='standard', ex_iops=None,
-                      ex_encrypted=None, ex_kms_key_id=None):
+                      ex_encrypted=False, ex_kms_key_id=None):
         """
         Create a new volume.
 
@@ -3972,11 +3972,11 @@ class BaseEC2NodeDriver(NodeDriver):
         if ex_volume_type == 'io1' and ex_iops:
             params['Iops'] = ex_iops
 
-        if ex_encrypted is not None:
+        if ex_encrypted:
             params['Encrypted'] = 1
 
-        if ex_kms_key_id is not None:
-            params['KmsKeyId'] = ex_kms_key_id
+            if ex_kms_key_id is not None:
+                params['KmsKeyId'] = ex_kms_key_id
 
         volume = self._to_volume(
             self.connection.request(self.path, params=params).object,


Mime
View raw message