mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-20 15:20:21 -07:00
Some additional module cleanup of mistakes made during merging
This commit is contained in:
parent
6ba6819446
commit
fa5386c488
36 changed files with 183 additions and 183 deletions
|
@ -118,7 +118,7 @@ def to_list(val):
|
|||
return list(val)
|
||||
elif val is not None:
|
||||
return [val]
|
||||
else:
|
||||
else:
|
||||
return list()
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ class CustomNetworkConfig(NetworkConfig):
|
|||
|
||||
|
||||
def get_network_module(**kwargs):
|
||||
try:
|
||||
try:
|
||||
return get_module(**kwargs)
|
||||
except NameError:
|
||||
return NetworkModule(**kwargs)
|
||||
|
@ -238,13 +238,13 @@ def load_config(module, candidate):
|
|||
if commands:
|
||||
if not module.check_mode:
|
||||
try:
|
||||
module.configure(commands)
|
||||
module.configure(commands)
|
||||
except AttributeError:
|
||||
module.config(commands)
|
||||
|
||||
if save_config:
|
||||
try:
|
||||
module.config.save_config()
|
||||
module.config.save_config()
|
||||
except AttributeError:
|
||||
module.execute(['copy running-config startup-config'])
|
||||
|
||||
|
@ -486,8 +486,8 @@ def main():
|
|||
save=dict(type='bool', default=False)
|
||||
)
|
||||
module = get_network_module(argument_spec=argument_spec,
|
||||
mutually_exclusive=[['vpc', 'peer_link']],
|
||||
supports_check_mode=True)
|
||||
mutually_exclusive=[['vpc', 'peer_link']],
|
||||
supports_check_mode=True)
|
||||
|
||||
portchannel = module.params['portchannel']
|
||||
vpc = module.params['vpc']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue