1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

removes old module.connected property from result (#21977)

This commit is contained in:
Peter Sprygada 2017-02-26 23:14:56 -05:00 committed by GitHub
parent 216877c6ca
commit ebc2716be7
16 changed files with 19 additions and 45 deletions

View file

@ -856,7 +856,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -954,7 +954,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -613,7 +613,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -966,7 +966,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -336,7 +336,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -305,7 +305,6 @@ def main():
changed = True changed = True
result = {} result = {}
result['connected'] = module.connected
result['changed'] = changed result['changed'] = changed
if module._verbosity > 0: if module._verbosity > 0:
final_system_mode = get_system_mode(module) final_system_mode = get_system_mode(module)

View file

@ -207,7 +207,6 @@ def main():
changed = True changed = True
end_state = invoke('get_existing', module) end_state = invoke('get_existing', module)
result['connected'] = module.connected
result['changed'] = changed result['changed'] = changed
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module) end_state = invoke('get_existing', module)

View file

@ -527,7 +527,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -196,7 +196,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module) end_state = invoke('get_existing', module)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -442,7 +442,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -179,7 +179,6 @@ def main():
exc = get_exception() exc = get_exception()
module.fail_json(msg=str(exc)) module.fail_json(msg=str(exc))
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -259,7 +259,6 @@ def main():
exc = get_exception() exc = get_exception()
module.fail_json(msg=str(exc)) module.fail_json(msg=str(exc))
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -207,15 +207,12 @@ changed:
type: boolean type: boolean
sample: true 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 os
import re 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'): def execute_show_command(command, module, command_type='cli_show_ascii'):
@ -379,37 +376,30 @@ def write_on_file(content, filename, module):
def main(): def main():
argument_spec = dict( argument_spec = dict(
action=dict(required=True, choices=['create', 'add', action=dict(required=True, choices=['create', 'add', 'compare', 'delete', 'delete_all']),
'compare', 'delete', snapshot_name=dict(type='str'),
'delete_all']), description=dict(type='str'),
snapshot_name=dict(required=False, type='str'), snapshot1=dict(type='str'),
description=dict(required=False, type='str'), snapshot2=dict(type='str'),
snapshot1=dict(required=False, type='str'), compare_option=dict(choices=['summary', 'ipv4routes', 'ipv6routes']),
snapshot2=dict(required=False, type='str'), comparison_results_file=dict(type='str'),
compare_option=dict(required=False, section=dict(type='str'),
choices=['summary', 'ipv4routes', 'ipv6routes']), show_command=dict(type='str'),
comparison_results_file=dict(required=False, type='str'), row_id=dict(type='str'),
section=dict(required=False, type='str'), element_key1=dict(type='str'),
show_command=dict(required=False, type='str'), element_key2=dict(type='str'),
row_id=dict(required=False, type='str'), save_snapshot_locally=dict(type='bool', default=False),
element_key1=dict(required=False, type='str'), path=dict(type='str', default='./')
element_key2=dict(required=False, type='str'),
save_snapshot_locally=dict(required=False, type='bool',
default=False),
path=dict(required=False, type='str', default='./')
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
mutually_exclusive=[['delete_all',
'delete_snapshot']],
supports_check_mode=True) supports_check_mode=True)
warnings = list() warnings = list()
check_args(module, warnings) check_args(module, warnings)
action = module.params['action'] action = module.params['action']
comparison_results_file = module.params['comparison_results_file'] comparison_results_file = module.params['comparison_results_file']
@ -469,7 +459,6 @@ def main():
written_file = write_on_file(snapshot, written_file = write_on_file(snapshot,
module.params['snapshot_name'], module) module.params['snapshot_name'], module)
result['connected'] = module.connected
result['changed'] = changed result['changed'] = changed
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module) end_state = invoke('get_existing', module)

View file

@ -278,7 +278,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -371,7 +371,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state = invoke('get_existing', module, args) end_state = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state

View file

@ -430,7 +430,6 @@ def main():
else: else:
result['updates'] = [] result['updates'] = []
result['connected'] = module.connected
if module._verbosity > 0: if module._verbosity > 0:
end_state, interface_exist = invoke('get_existing', module, args) end_state, interface_exist = invoke('get_existing', module, args)
result['end_state'] = end_state result['end_state'] = end_state