libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [4/5] libcloud git commit: make more explicit value checks, fix line length
Date Mon, 28 Mar 2016 10:14:53 GMT
make more explicit value checks, fix line length


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

Branch: refs/heads/trunk
Commit: 4a9628d6a8f19ed42d1946d7d8229f1299d0d07b
Parents: 5dd36c5
Author: ViktorOgnev <v.ognev@scalr.com>
Authored: Mon Mar 28 11:58:26 2016 +0300
Committer: anthony-shaw <anthony.p.shaw@gmail.com>
Committed: Mon Mar 28 21:14:13 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a9628d6/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 1dacf40..f88bc52 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3108,10 +3108,13 @@ class BaseEC2NodeDriver(NodeDriver):
         :param ex_encrypted: Specifies whether the volume should be encrypted.
         :type ex_encrypted: ``bool``
 
-        :param ex_kms_key_id: The full ARN of the AWS Key Management Service (AWS KMS)
-                        customer master key (CMK) to use when creating the encrypted volume.
-                        Example: arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
-                        Only used if encrypted is set to True
+        :param ex_kms_key_id: The full ARN of the AWS Key Management
+                            Service (AWS KMS) customer master key (CMK) to use
+                            when creating the encrypted volume.
+                            Example:
+                            arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123
+                                                    -456a-a12b-a123b4cd56ef.
+                            Only used if encrypted is set to True
         :type ex_kms_key_id: ``str``
 
         :return: The newly created volume.
@@ -3139,10 +3142,10 @@ class BaseEC2NodeDriver(NodeDriver):
         if ex_volume_type == 'io1' and ex_iops:
             params['Iops'] = ex_iops
 
-        if ex_encrypted:
+        if ex_encrypted is not None:
             params['Encrypted'] = 1
 
-        if ex_kms_key_id:
+        if ex_kms_key_id is not None:
             params['KmsKeyId'] = ex_kms_key_id
 
         volume = self._to_volume(


Mime
View raw message