Skip to content

Commit

Permalink
Closes napalm-automation#2003: Fix NXOS ping source_interface bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
decoupca committed Sep 6, 2023
1 parent 480cc91 commit 88d19dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ def ping(
if source != "":
command += " source {}".format(source)
elif source_interface != "":
command += " source {}".format(source_interface)
command += " source-interface {}".format(source_interface)

if vrf != "":
command += " vrf {}".format(vrf)
output = self._send_command(command, raw_text=True)
assert isinstance(output, str)

if "connect:" in output:
if "connect:" in output.lower() or 'invalid' in output.lower():
ping_dict["error"] = output
elif "PING" in output:
ping_dict["success"] = {
Expand Down

0 comments on commit 88d19dd

Please sign in to comment.