fix nxos_hsrp (#27306)

* fix nxos_hsrp

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* modify nxos_hsrp test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-07-26 11:38:55 +05:30 committed by GitHub
commit 41ce724801
2 changed files with 10 additions and 8 deletions

View file

@ -374,10 +374,7 @@ def main():
vip=dict(type='str', required=False),
auth_type=dict(choices=['text', 'md5'], required=False),
auth_string=dict(type='str', required=False),
state=dict(choices=['absent', 'present'], required=False, default='present'),
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
state=dict(choices=['absent', 'present'], required=False, default='present')
)
argument_spec.update(nxos_argument_spec)
@ -464,11 +461,15 @@ def main():
module.exit_json(**results)
else:
load_config(module, commands)
# validate IP
if transport == 'cli':
commands.insert(0, 'config t')
body = run_commands(module, commands)
validate_config(body, vip, module)
results['changed'] = True
end_state = get_hsrp_group(group, interface, module)
if 'configure' in commands:
commands.pop(0)