Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
recipes/examples/netem/netem_test.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/recipes/examples/netem/netem_test.py b/recipes/examples/netem/netem_test.py
index 2405f11..af8c110 100644
--- a/recipes/examples/netem/netem_test.py
+++ b/recipes/examples/netem/netem_test.py
@@ -6,9 +6,12 @@ hostB = ctl.get_host("machine2")
hostA.sync_resources(modules=["IcmpPing", "Netperf"])
hostB.sync_resources(modules=["IcmpPing", "Netperf"])
+hostA_testiface = hostA.get_interface("testiface")
+hostB_testiface = hostB.get_interface("testiface")
+
ping_mod = ctl.get_module("IcmpPing",
options={
- "addr": hostB.get_ip("testiface", 0),
+ "addr": hostB_testiface.get_ip_addr(0),
"count": 1000,
"interval": 0.1,
"iface" : hostA.get_devname("testiface")})
@@ -16,20 +19,20 @@ ping_mod = ctl.get_module("IcmpPing",
netserver = ctl.get_module("Netperf",
options={
"role" : "server",
- "bind" : hostA.get_ip("testiface")})
+ "bind" : hostA_testiface.get_ip_addr(0)})
netperf_tcp = ctl.get_module("Netperf",
options={
"role" : "client",
- "netperf_server" : hostA.get_ip("testiface"),
+ "netperf_server" : hostA_testiface.get_ip_addr(0),
"duration" : 60,
"testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
hostB.get_ip("testiface")})
+ "netperf_opts" : "-L %s" %
hostB_testiface.get_ip_addr(0)})
netperf_udp= ctl.get_module("Netperf",
options={
"role" : "client",
- "netperf_server" : hostA.get_ip("testiface"),
+ "netperf_server" : hostA_testiface.get_ip_addr(0),
"duration" : 60,
"testname" : "UDP_STREAM"})
--
2.4.3