Fixing nxos_ntp when no config exists (#19678)

This commit is contained in:
Gabriele 2017-01-03 16:50:31 +01:00 committed by Peter Sprygada
commit c58278b1c2

View file

@ -400,7 +400,9 @@ def get_ntp_peer(module):
command = 'show run | inc ntp.(server|peer)'
ntp_peer_list = []
ntp = execute_show_command(
command, module, command_type='cli_show_ascii')[0]
command, module, command_type='cli_show_ascii')
if ntp:
ntp = ntp[0]
ntp_regex = (
".*ntp\s(server\s(?P<address>\S+)|peer\s(?P<peer_address>\S+))"