Add ethernet-link-oam mapping to nxos_feature (#4956)
* Add ethernet-link-oam mapping * Adding port-secutiry mapping * Fixing command output format
This commit is contained in:
parent
67d6f2c0d6
commit
62bf8d0c78
1 changed files with 19 additions and 1 deletions
|
@ -813,6 +813,19 @@ def execute_show(cmds, module, command_type=None):
|
|||
clie = get_exception()
|
||||
module.fail_json(msg='Error sending {0}'.format(cmds),
|
||||
error=str(clie))
|
||||
except AttributeError:
|
||||
try:
|
||||
if command_type:
|
||||
command_type = command_type_map.get(command_type)
|
||||
module.cli.add_commands(cmds, output=command_type)
|
||||
response = module.cli.run_commands()
|
||||
else:
|
||||
module.cli.add_commands(cmds, raw=True)
|
||||
response = module.cli.run_commands()
|
||||
except ShellError:
|
||||
clie = get_exception()
|
||||
module.fail_json(msg='Error sending {0}'.format(cmds),
|
||||
error=str(clie))
|
||||
return response
|
||||
|
||||
|
||||
|
@ -908,7 +921,10 @@ def validate_feature(module, mode='show'):
|
|||
'sla sender': 'sla_sender',
|
||||
'ssh': 'sshServer',
|
||||
'tacacs+': 'tacacs',
|
||||
'telnet': 'telnetServer'},
|
||||
'telnet': 'telnetServer',
|
||||
'ethernet-link-oam': 'elo',
|
||||
'port-security': 'eth_port_sec'
|
||||
},
|
||||
'config':
|
||||
{
|
||||
'nve': 'nv overlay',
|
||||
|
@ -922,6 +938,8 @@ def validate_feature(module, mode='show'):
|
|||
'sshServer': 'ssh',
|
||||
'tacacs': 'tacacs+',
|
||||
'telnetServer': 'telnet',
|
||||
'elo': 'ethernet-link-oam',
|
||||
'eth_port_sec': 'port-security'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue