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

fixes #27177 - nxos_aaa_server_host multiple issues (#29103)

This commit is contained in:
rahushen 2017-09-14 12:29:53 -04:00 committed by Nathaniel Case
parent 8749894ebc
commit 37f68bffc0

View file

@ -167,7 +167,7 @@ def execute_show_command(command, module, command_type='cli_show'):
cmds = [command] cmds = [command]
body = run_commands(module, cmds) body = run_commands(module, cmds)
elif module.params['transport'] == 'nxapi': elif module.params['transport'] == 'nxapi':
cmds = [command] cmds = {'command': command, 'output': 'text'}
body = run_commands(module, cmds) body = run_commands(module, cmds)
return body return body
@ -208,7 +208,7 @@ def get_aaa_host_info(module, server_type, address):
body = execute_show_command(command, module, command_type='cli_show_ascii') body = execute_show_command(command, module, command_type='cli_show_ascii')
if body: if body[0]:
try: try:
pattern = ('(acct-port \d+)|(timeout \d+)|(auth-port \d+)|' pattern = ('(acct-port \d+)|(timeout \d+)|(auth-port \d+)|'
'(key 7 "\w+")|( port \d+)') '(key 7 "\w+")|( port \d+)')
@ -217,7 +217,6 @@ def get_aaa_host_info(module, server_type, address):
'auth-port': 'auth_port', 'auth-port': 'auth_port',
'port': 'tacacs_port', 'port': 'tacacs_port',
'timeout': 'host_timeout'}) 'timeout': 'host_timeout'})
if aaa_host_info:
aaa_host_info['server_type'] = server_type aaa_host_info['server_type'] = server_type
aaa_host_info['address'] = address aaa_host_info['address'] = address
except TypeError: except TypeError: