fix when using vrf option (#35118)

ping did not include "vrf" keyword in command and would fail.
This commit is contained in:
Carl Buchmann 2018-01-26 11:52:23 -05:00 committed by Ganesh Nalawade
parent 44171b70c2
commit 1a4efca83c

View file

@ -176,7 +176,7 @@ def build_ping(dest, count=None, source=None, vrf=None):
to execute. All args come from the module's unique params.
"""
if vrf is not None:
cmd = "ping {0} {1}".format(vrf, dest)
cmd = "ping vrf {0} {1}".format(vrf, dest)
else:
cmd = "ping {0}".format(dest)