Add the count and interval optional parameters for IcmpPing module. The
change is backward-compatible, as the defalt values remain unchanged.
Signed-off-by: Yotam Gigi <yotamg(a)mellanox.com>
---
recipes/switchdev/TestLib.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/recipes/switchdev/TestLib.py b/recipes/switchdev/TestLib.py
index 152e76e..5b93efd 100644
--- a/recipes/switchdev/TestLib.py
+++ b/recipes/switchdev/TestLib.py
@@ -75,7 +75,7 @@ class TestLib:
m2.run(linkneg_mod, desc=desc, netns=if2.get_netns())
def ping_simple(self, if1, if2, fail_expected=False, desc=None,
- limit_rate=90):
+ limit_rate=90, count=100, interval=0.2):
if not desc:
desc = self._generate_default_desc(if1, [if2])
@@ -88,16 +88,16 @@ class TestLib:
ping_mod = self._ctl.get_module("IcmpPing",
options={
"addr": if2.get_ip(0),
- "count": 100,
- "interval": 0.2,
+ "count": count,
+ "interval": interval,
"iface" : if1.get_devname(),
"limit_rate": limit_rate})
ping_mod6 = self._ctl.get_module("Icmp6Ping",
options={
"addr": if2.get_ip(1),
- "count": 100,
- "interval": 0.2,
+ "count": count,
+ "interval": interval,
"iface" : if1.get_ip(1),
"limit_rate": limit_rate})
--
2.4.11