We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0923ffa commit e017bceCopy full SHA for e017bce
napalm/nxos/nxos.py
@@ -371,8 +371,12 @@ def ping(
371
elif source_interface != "":
372
command += " source-interface {}".format(source_interface)
373
374
- if vrf != "":
375
- command += " vrf {}".format(vrf)
+ # source_interface and vrf are mutually exclusive, but since they
+ # provide the same behavior, no need to raise an exception--just
376
+ # prefer source_interface.
377
+ if not source_interface:
378
+ if vrf != "":
379
+ command += " vrf {}".format(vrf)
380
output = self._send_command(command, raw_text=True)
381
assert isinstance(output, str)
382
0 commit comments