PEP 8 W291 whitespace cleanup.

This commit is contained in:
Matt Clay
2017-01-27 15:20:31 -08:00
parent 95789f3949
commit d913f69ba1
166 changed files with 493 additions and 565 deletions

View File

@@ -157,7 +157,7 @@ def _get_ksclient(module, kwargs):
auth_url=kwargs.get('auth_url'))
except Exception as e:
module.fail_json(msg="Error authenticating to the keystone: %s " % e.message)
return client
return client
def _get_endpoint(module, client, endpoint_type):
@@ -186,7 +186,7 @@ def _glance_image_present(module, params, client):
try:
for image in client.images.list():
if image.name == params['name']:
return image.id
return image.id
return None
except Exception as e:
module.fail_json(msg="Error in fetching image list: %s" % e.message)

View File

@@ -337,7 +337,7 @@ def _add_floating_ip_from_pool(module, nova, server):
if not pool_ips:
try:
new_ip = nova.floating_ips.create(pool)
except Exception as e:
except Exception as e:
module.fail_json(msg = "Unable to create floating ip: %s" % (e.message))
pool_ips.append(new_ip.ip)
# Add to the main list

View File

@@ -135,7 +135,7 @@ def main():
if module.params['public_key'] and (module.params['public_key'] != key.public_key ):
module.fail_json(msg = "name {} present but key hash not the same as offered. Delete key first.".format(key['name']))
else:
module.exit_json(changed = False, result = "Key present")
module.exit_json(changed = False, result = "Key present")
try:
key = nova.keypairs.create(module.params['name'], module.params['public_key'])
except Exception as e:

View File

@@ -72,7 +72,7 @@ def main():
clouds.append(cloud.config)
module.exit_json(ansible_facts=dict(openstack=dict(clouds=clouds)))
except exceptions.OpenStackConfigException as e:
module.fail_json(msg=str(e))
module.fail_json(msg=str(e))
# import module snippets
from ansible.module_utils.basic import *

View File

@@ -96,7 +96,7 @@ openstack_projects:
returned: always, but can be null
type: complex
contains:
id:
id:
description: Unique UUID.
returned: success
type: string