mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Manually fix issues that autopep8 introduced
* iam.py 161 -> 160 chars * lamba -> single line function -> multiline function Avoid redefining key iam line length iam.py now clean
This commit is contained in:
committed by
John R Barker
parent
c57a7f05e1
commit
10cd2cd1b7
@@ -223,7 +223,8 @@ def map_obj_to_commands(updates, module, warnings):
|
||||
commands = list()
|
||||
want, have = updates
|
||||
|
||||
def needs_update(x): return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
|
||||
def add(cmd):
|
||||
if 'management api http-commands' not in commands:
|
||||
|
||||
@@ -150,7 +150,8 @@ def map_obj_to_commands(want, have, module):
|
||||
commands = list()
|
||||
state = module.params['state']
|
||||
|
||||
def needs_update(x): return want.get(x) and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) and (want.get(x) != have.get(x))
|
||||
|
||||
if state == 'absent':
|
||||
if have['domain_name']:
|
||||
|
||||
@@ -174,9 +174,11 @@ def map_obj_to_commands(updates, module):
|
||||
for update in updates:
|
||||
want, have = update
|
||||
|
||||
def needs_update(x): return want.get(x) and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) and (want.get(x) != have.get(x))
|
||||
|
||||
def add(x): return commands.append('username %s %s' % (want['name'], x))
|
||||
def add(x):
|
||||
return commands.append('username %s %s' % (want['name'], x))
|
||||
|
||||
if want['state'] == 'absent':
|
||||
commands.append('no username %s' % want['name'])
|
||||
|
||||
@@ -150,7 +150,8 @@ def map_obj_to_commands(want, have, module):
|
||||
commands = list()
|
||||
state = module.params['state']
|
||||
|
||||
def needs_update(x): return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
|
||||
if state == 'absent':
|
||||
if have['hostname'] != 'Router':
|
||||
|
||||
@@ -164,7 +164,8 @@ def check_args(module, warnings):
|
||||
def map_obj_to_commands(want, have, module):
|
||||
commands = list()
|
||||
|
||||
def needs_update(x): return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) is not None and (want.get(x) != have.get(x))
|
||||
|
||||
if needs_update('state'):
|
||||
if want['state'] == 'absent':
|
||||
|
||||
@@ -134,9 +134,11 @@ def map_obj_to_commands(want, have, module):
|
||||
commands = list()
|
||||
state = module.params['state']
|
||||
|
||||
def needs_update(x): return want.get(x) and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) and (want.get(x) != have.get(x))
|
||||
|
||||
def difference(x, y, z): return [item for item in x[z] if item not in y[z]]
|
||||
def difference(x, y, z):
|
||||
return [item for item in x[z] if item not in y[z]]
|
||||
|
||||
def remove(cmd, commands, vrf=None):
|
||||
if vrf:
|
||||
|
||||
@@ -175,11 +175,14 @@ def map_obj_to_commands(updates, module):
|
||||
for update in updates:
|
||||
want, have = update
|
||||
|
||||
def needs_update(x): return want.get(x) and (want.get(x) != have.get(x))
|
||||
def needs_update(x):
|
||||
return want.get(x) and (want.get(x) != have.get(x))
|
||||
|
||||
def add(x): return commands.append('username %s %s' % (want['name'], x))
|
||||
def add(x):
|
||||
return commands.append('username %s %s' % (want['name'], x))
|
||||
|
||||
def remove(x): return commands.append('no username %s %s' % (want['name'], x))
|
||||
def remove(x):
|
||||
return commands.append('no username %s %s' % (want['name'], x))
|
||||
|
||||
if want['state'] == 'absent':
|
||||
commands.append('no username %s' % want['name'])
|
||||
|
||||
Reference in New Issue
Block a user