[LIBCLOUD-749] CloudStack: minor fixes to comply with pep8. Closes #580
Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/64876e9f Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/64876e9f Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/64876e9f Branch: refs/heads/trunk Commit: 64876e9fc12d428fba99aafc4d3691db25d60598 Parents: 550dcf4 Author: lionel <[email protected]> Authored: Wed Sep 16 00:08:50 2015 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Sun Oct 11 16:09:29 2015 +0200 ---------------------------------------------------------------------- libcloud/compute/drivers/cloudstack.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/64876e9f/libcloud/compute/drivers/cloudstack.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py index 4e5e835..0f60195 100644 --- a/libcloud/compute/drivers/cloudstack.py +++ b/libcloud/compute/drivers/cloudstack.py @@ -3490,8 +3490,9 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver): method='GET')['success'] def ex_authorize_security_group_ingress(self, securitygroupname, protocol, - cidrlist, startport=None, endport=None, - icmptype=None, icmpcode=None, **kwargs): + cidrlist, startport=None, + endport=None, icmptype=None, + icmpcode=None, **kwargs): """ Creates a new Security Group Ingress rule @@ -3522,8 +3523,8 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver): :type icmptype: ``int`` :param icmpcode: Code of the ICMP packet for the specified type. - If the specified type doesn't require a code set this - value to 0. + If the specified type doesn't require a code set + this value to 0. -1 or None means "all codes". Applies to protocol ICMP. :type icmpcode: ``int`` @@ -3560,12 +3561,13 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver): if protocol not in ('TCP', 'UDP') and \ (startport is not None or endport is not None): - raise LibcloudError('"startport" and "endport" are only valid with ' - 'protocol TCP or UDP.') + raise LibcloudError('"startport" and "endport" are only valid ' + 'with protocol TCP or UDP.') - if protocol != 'ICMP' and (icmptype is not None or icmpcode is not None): - raise LibcloudError('"icmptype" and "icmpcode" are only valid with ' - 'protocol ICMP.') + if protocol != 'ICMP' and \ + (icmptype is not None or icmpcode is not None): + raise LibcloudError('"icmptype" and "icmpcode" are only valid ' + 'with protocol ICMP.') if protocol in ('TCP', 'UDP'): if startport is None:
