You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/21 05:42:49 UTC
[02/16] libcloud git commit: make more explicit value checks,
fix line length
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/4d06cfe6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4d06cfe6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4d06cfe6
Branch: refs/heads/trunk
Commit: 4d06cfe66ec5d09d255996f775ed40af8f14d76a
Parents: 55cf64a
Author: ViktorOgnev <v....@scalr.com>
Authored: Mon Mar 28 11:58:26 2016 +0300
Committer: ViktorOgnev <v....@scalr.com>
Committed: Mon Mar 28 11:58:26 2016 +0300
----------------------------------------------------------------------
libcloud/compute/drivers/ec2.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4d06cfe6/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(