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:
Gabriele 2016-09-30 16:25:02 -04:00 committed by Matt Clay
parent 67d6f2c0d6
commit 62bf8d0c78

View file

@ -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'
}
}