mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -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
|
@ -238,7 +238,7 @@ def _wait_for_completion(profitbricks, promise, wait_timeout, msg):
|
|||
raise Exception(
|
||||
'Timed out waiting for async operation ' + msg + ' "' + str(
|
||||
promise['requestId']
|
||||
) + '" to complete.')
|
||||
) + '" to complete.')
|
||||
|
||||
|
||||
def _create_machine(module, profitbricks, datacenter, name):
|
||||
|
@ -290,7 +290,7 @@ def _create_machine(module, profitbricks, datacenter, name):
|
|||
|
||||
n = NIC(
|
||||
lan=int(lan)
|
||||
)
|
||||
)
|
||||
|
||||
s = Server(
|
||||
name=name,
|
||||
|
@ -299,7 +299,7 @@ def _create_machine(module, profitbricks, datacenter, name):
|
|||
cpu_family=cpu_family,
|
||||
create_volumes=[v],
|
||||
nics=[n],
|
||||
)
|
||||
)
|
||||
|
||||
try:
|
||||
create_server_response = profitbricks.create_server(
|
||||
|
@ -341,7 +341,7 @@ def _create_datacenter(module, profitbricks):
|
|||
i = Datacenter(
|
||||
name=datacenter,
|
||||
location=location
|
||||
)
|
||||
)
|
||||
|
||||
try:
|
||||
datacenter_response = profitbricks.create_datacenter(datacenter=i)
|
||||
|
@ -624,7 +624,7 @@ def main():
|
|||
if state == 'absent':
|
||||
if not module.params.get('datacenter'):
|
||||
module.fail_json(msg='datacenter parameter is required ' +
|
||||
'for running or stopping machines.')
|
||||
'for running or stopping machines.')
|
||||
|
||||
try:
|
||||
(changed) = remove_virtual_machine(module, profitbricks)
|
||||
|
@ -635,7 +635,7 @@ def main():
|
|||
elif state in ('running', 'stopped'):
|
||||
if not module.params.get('datacenter'):
|
||||
module.fail_json(msg='datacenter parameter is required for ' +
|
||||
'running or stopping machines.')
|
||||
'running or stopping machines.')
|
||||
try:
|
||||
(changed) = startstop_machine(module, profitbricks, state)
|
||||
module.exit_json(changed=changed)
|
||||
|
@ -649,10 +649,10 @@ def main():
|
|||
module.fail_json(msg='image parameter is required for new instance')
|
||||
if not module.params.get('subscription_user'):
|
||||
module.fail_json(msg='subscription_user parameter is ' +
|
||||
'required for new instance')
|
||||
'required for new instance')
|
||||
if not module.params.get('subscription_password'):
|
||||
module.fail_json(msg='subscription_password parameter is ' +
|
||||
'required for new instance')
|
||||
'required for new instance')
|
||||
|
||||
try:
|
||||
(machine_dict_array) = create_virtual_machine(module, profitbricks)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue