X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=examples%2Fopenvswitch%2Fovs_ping_3_switches.py;h=1562d709700971140cd36ac9356973a5125d7390;hb=2ff5b287769a5772968642c7b145062856e06f0f;hp=c97b3a77ead16f11c74cc3f672cbc2e3bd7f99db;hpb=039fbd9629d7570d4c175a5448d24badcd0f3aba;p=nepi.git diff --git a/examples/openvswitch/ovs_ping_3_switches.py b/examples/openvswitch/ovs_ping_3_switches.py index c97b3a77..1562d709 100644 --- a/examples/openvswitch/ovs_ping_3_switches.py +++ b/examples/openvswitch/ovs_ping_3_switches.py @@ -225,8 +225,8 @@ r2ip = dict({ }) # Ping from all resources to all other resources -for r1, (n1, ip1) in r2ip.iteritems(): - for r2, (n2, ip2) in r2ip.iteritems(): +for r1, (n1, ip1) in r2ip.items(): + for r2, (n2, ip2) in r2ip.items(): if r1 == r2: continue @@ -236,10 +236,12 @@ for r1, (n1, ip1) in r2ip.iteritems(): ec.deploy() +# py3: no need to transform into a list +# as wait_finished (wait in fact) will do it anyway ec.wait_finished(apps.values()) # collect results -for key, app in apps.iteritems(): +for key, app in apps.items(): stdout = ec.trace(app, "stdout") print("***************************", key, "************************") print(stdout)