Skip to content

Commit

Permalink
Fix bug when providing both source_interface and vrf
Browse files Browse the repository at this point in the history
  • Loading branch information
decoupca committed Sep 14, 2023
1 parent 5e4f948 commit d6c5609
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,10 @@ def ping(
elif source_interface != "":
command += " source {}".format(source_interface)

if vrf != "":
command += " vrf {}".format(vrf)
# On NXOS, source_interface and vrf are mutually exclusive.
if not source_interface:
if vrf != "":
command += " vrf {}".format(vrf)
output = self._send_command(command, raw_text=True)
assert isinstance(output, str)

Expand Down

0 comments on commit d6c5609

Please sign in to comment.