removes old module.connected property from result (#21977)
This commit is contained in:
parent
216877c6ca
commit
ebc2716be7
16 changed files with 19 additions and 45 deletions
|
@ -856,7 +856,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -954,7 +954,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -613,7 +613,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -966,7 +966,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -336,7 +336,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -305,7 +305,6 @@ def main():
|
|||
changed = True
|
||||
|
||||
result = {}
|
||||
result['connected'] = module.connected
|
||||
result['changed'] = changed
|
||||
if module._verbosity > 0:
|
||||
final_system_mode = get_system_mode(module)
|
||||
|
|
|
@ -207,7 +207,6 @@ def main():
|
|||
changed = True
|
||||
end_state = invoke('get_existing', module)
|
||||
|
||||
result['connected'] = module.connected
|
||||
result['changed'] = changed
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module)
|
||||
|
|
|
@ -527,7 +527,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -196,7 +196,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -442,7 +442,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -179,7 +179,6 @@ def main():
|
|||
exc = get_exception()
|
||||
module.fail_json(msg=str(exc))
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -259,7 +259,6 @@ def main():
|
|||
exc = get_exception()
|
||||
module.fail_json(msg=str(exc))
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -207,15 +207,12 @@ changed:
|
|||
type: boolean
|
||||
sample: true
|
||||
'''
|
||||
|
||||
from ansible.module_utils.nxos import get_config, load_config, run_commands
|
||||
from ansible.module_utils.nxos import nxos_argument_spec, check_args
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netcfg import CustomNetworkConfig
|
||||
|
||||
import os
|
||||
import re
|
||||
import re
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.nxos import load_config, run_commands
|
||||
from ansible.module_utils.nxos import nxos_argument_spec, check_args
|
||||
|
||||
|
||||
def execute_show_command(command, module, command_type='cli_show_ascii'):
|
||||
|
@ -379,37 +376,30 @@ def write_on_file(content, filename, module):
|
|||
|
||||
def main():
|
||||
argument_spec = dict(
|
||||
action=dict(required=True, choices=['create', 'add',
|
||||
'compare', 'delete',
|
||||
'delete_all']),
|
||||
snapshot_name=dict(required=False, type='str'),
|
||||
description=dict(required=False, type='str'),
|
||||
snapshot1=dict(required=False, type='str'),
|
||||
snapshot2=dict(required=False, type='str'),
|
||||
compare_option=dict(required=False,
|
||||
choices=['summary', 'ipv4routes', 'ipv6routes']),
|
||||
comparison_results_file=dict(required=False, type='str'),
|
||||
section=dict(required=False, type='str'),
|
||||
show_command=dict(required=False, type='str'),
|
||||
row_id=dict(required=False, type='str'),
|
||||
element_key1=dict(required=False, type='str'),
|
||||
element_key2=dict(required=False, type='str'),
|
||||
save_snapshot_locally=dict(required=False, type='bool',
|
||||
default=False),
|
||||
path=dict(required=False, type='str', default='./')
|
||||
action=dict(required=True, choices=['create', 'add', 'compare', 'delete', 'delete_all']),
|
||||
snapshot_name=dict(type='str'),
|
||||
description=dict(type='str'),
|
||||
snapshot1=dict(type='str'),
|
||||
snapshot2=dict(type='str'),
|
||||
compare_option=dict(choices=['summary', 'ipv4routes', 'ipv6routes']),
|
||||
comparison_results_file=dict(type='str'),
|
||||
section=dict(type='str'),
|
||||
show_command=dict(type='str'),
|
||||
row_id=dict(type='str'),
|
||||
element_key1=dict(type='str'),
|
||||
element_key2=dict(type='str'),
|
||||
save_snapshot_locally=dict(type='bool', default=False),
|
||||
path=dict(type='str', default='./')
|
||||
)
|
||||
|
||||
argument_spec.update(nxos_argument_spec)
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
mutually_exclusive=[['delete_all',
|
||||
'delete_snapshot']],
|
||||
supports_check_mode=True)
|
||||
supports_check_mode=True)
|
||||
|
||||
warnings = list()
|
||||
check_args(module, warnings)
|
||||
|
||||
|
||||
action = module.params['action']
|
||||
comparison_results_file = module.params['comparison_results_file']
|
||||
|
||||
|
@ -469,7 +459,6 @@ def main():
|
|||
written_file = write_on_file(snapshot,
|
||||
module.params['snapshot_name'], module)
|
||||
|
||||
result['connected'] = module.connected
|
||||
result['changed'] = changed
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module)
|
||||
|
|
|
@ -278,7 +278,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -371,7 +371,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
|
@ -430,7 +430,6 @@ def main():
|
|||
else:
|
||||
result['updates'] = []
|
||||
|
||||
result['connected'] = module.connected
|
||||
if module._verbosity > 0:
|
||||
end_state, interface_exist = invoke('get_existing', module, args)
|
||||
result['end_state'] = end_state
|
||||
|
|
Loading…
Reference in a new issue