mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues Generated using: autopep8 1.3.3 (pycodestyle: 2.3.1) autopep8 -r --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules Manually fix issues that autopep8 has introduced
This commit is contained in:
parent
d13d7e9404
commit
c57a7f05e1
314 changed files with 3462 additions and 3383 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
#coding: utf-8 -*-
|
||||
# coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Mathieu Bultel <mbultel@redhat.com>
|
||||
# (c) 2016, Steve Baker <sbaker@redhat.com>
|
||||
|
@ -166,12 +166,12 @@ from ansible.module_utils.openstack import openstack_full_argument_spec, opensta
|
|||
def _create_stack(module, stack, cloud):
|
||||
try:
|
||||
stack = cloud.create_stack(module.params['name'],
|
||||
template_file=module.params['template'],
|
||||
environment_files=module.params['environment'],
|
||||
timeout=module.params['timeout'],
|
||||
wait=True,
|
||||
rollback=module.params['rollback'],
|
||||
**module.params['parameters'])
|
||||
template_file=module.params['template'],
|
||||
environment_files=module.params['environment'],
|
||||
timeout=module.params['timeout'],
|
||||
wait=True,
|
||||
rollback=module.params['rollback'],
|
||||
**module.params['parameters'])
|
||||
|
||||
stack = cloud.get_stack(stack.id, None)
|
||||
if stack.stack_status == 'CREATE_COMPLETE':
|
||||
|
@ -181,6 +181,7 @@ def _create_stack(module, stack, cloud):
|
|||
except shade.OpenStackCloudException as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
|
||||
def _update_stack(module, stack, cloud):
|
||||
try:
|
||||
stack = cloud.update_stack(
|
||||
|
@ -195,11 +196,12 @@ def _update_stack(module, stack, cloud):
|
|||
if stack['stack_status'] == 'UPDATE_COMPLETE':
|
||||
return stack
|
||||
else:
|
||||
module.fail_json(msg = "Failure in updating stack: %s" %
|
||||
module.fail_json(msg="Failure in updating stack: %s" %
|
||||
stack['stack_status_reason'])
|
||||
except shade.OpenStackCloudException as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
|
||||
def _system_state_change(module, stack, cloud):
|
||||
state = module.params['state']
|
||||
if state == 'present':
|
||||
|
@ -209,6 +211,7 @@ def _system_state_change(module, stack, cloud):
|
|||
return True
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
argument_spec = openstack_full_argument_spec(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue