mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -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
|
@ -118,7 +118,8 @@ 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 attach_volume(module, profitbricks):
|
||||
"""
|
||||
|
@ -150,7 +151,7 @@ def attach_volume(module, profitbricks):
|
|||
server_list = profitbricks.list_servers(datacenter)
|
||||
for s in server_list['items']:
|
||||
if server == s['properties']['name']:
|
||||
server= s['id']
|
||||
server = s['id']
|
||||
break
|
||||
|
||||
# Locate UUID for Volume
|
||||
|
@ -163,6 +164,7 @@ def attach_volume(module, profitbricks):
|
|||
|
||||
return profitbricks.attach_volume(datacenter, server, volume)
|
||||
|
||||
|
||||
def detach_volume(module, profitbricks):
|
||||
"""
|
||||
Detaches a volume.
|
||||
|
@ -193,7 +195,7 @@ def detach_volume(module, profitbricks):
|
|||
server_list = profitbricks.list_servers(datacenter)
|
||||
for s in server_list['items']:
|
||||
if server == s['properties']['name']:
|
||||
server= s['id']
|
||||
server = s['id']
|
||||
break
|
||||
|
||||
# Locate UUID for Volume
|
||||
|
@ -206,6 +208,7 @@ def detach_volume(module, profitbricks):
|
|||
|
||||
return profitbricks.detach_volume(datacenter, server, volume)
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue