From: Ondrej Lichtner <olichtne(a)redhat.com>
This commit adds a 'bg' function parameter to the ping wrapper
functions. This allows us to run multiple parallel pings at the same
time.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/RecipeCommon/ModuleWrap.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lnst/RecipeCommon/ModuleWrap.py b/lnst/RecipeCommon/ModuleWrap.py
index de3babb..2df953c 100644
--- a/lnst/RecipeCommon/ModuleWrap.py
+++ b/lnst/RecipeCommon/ModuleWrap.py
@@ -12,7 +12,7 @@ olichtne(a)redhat.com (Ondrej Lichtner)
from lnst.Controller.Task import ctl
-def ping(src, dst, options={}, expect="pass"):
+def ping(src, dst, options={}, expect="pass", bg=False):
""" Perform an IcmpPing from source to destination
Keyword arguments:
@@ -56,9 +56,9 @@ def ping(src, dst, options={}, expect="pass"):
ping_mod = ctl.get_module("IcmpPing",
options = options)
- return h1.run(ping_mod, expect=expect)
+ return h1.run(ping_mod, expect=expect, bg=bg)
-def ping6(src, dst, options={}, expect="pass"):
+def ping6(src, dst, options={}, expect="pass", bg=False):
""" Perform an Icmp6Ping from source to destination
Keyword arguments:
@@ -102,7 +102,7 @@ def ping6(src, dst, options={}, expect="pass"):
ping_mod = ctl.get_module("Icmp6Ping",
options = options)
- return h1.run(ping_mod, expect=expect)
+ return h1.run(ping_mod, expect=expect, bg=bg)
def netperf(src, dst, server_opts={}, client_opts={}, baseline={}, timeout=60):
""" Start a Netserver on the given machine and ip address
--
2.8.3
Show replies by date