multiple fixes nxos (#32903)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha
2017-11-14 15:23:11 +00:00
committed by GitHub
parent 177a4fb3ec
commit 3ee2501c83
5 changed files with 14 additions and 13 deletions

View File

@@ -169,7 +169,7 @@ class Cli:
except ValueError:
out = to_text(out).strip()
if item['output'] == 'json' and out != 'ok' and isinstance(out, string_types):
if item['output'] == 'json' and out != '' and isinstance(out, string_types):
self._module.fail_json(msg='failed to retrieve output of %s in json format' % item['command'])
responses.append(out)

View File

@@ -488,6 +488,9 @@ def get_interface_config_commands(interface, intf, existing):
if mtu != 'None':
commands.append('mtu {0}'.format(mtu))
if 'mtu None' in commands:
commands.pop()
admin_state = interface.get('admin_state')
if admin_state:
command = get_admin_state(interface, intf, admin_state)