X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fopenvswitch%2Fovs_ping_2_switches.py;h=fe9962e4a231d038112c7592afa0c0feea32ac8d;hb=52e9a80764b98226727f1362d7c1f6246c06f92e;hp=3fe3d173c5d8b1d451369b936acd7401b28bd686;hpb=c98a137a49a4bffd571b24f4c08d89e90def5771;p=nepi.git diff --git a/examples/openvswitch/ovs_ping_2_switches.py b/examples/openvswitch/ovs_ping_2_switches.py index 3fe3d173..fe9962e4 100644 --- a/examples/openvswitch/ovs_ping_2_switches.py +++ b/examples/openvswitch/ovs_ping_2_switches.py @@ -158,6 +158,9 @@ ip2 = "%s.2" % ".".join(net_segs[:-1]) # x.x.x.2 ip3 = "%s.3" % ".".join(net_segs[:-1]) # x.x.x.3 ip4 = "%s.4" % ".".join(net_segs[:-1]) # x.x.x.4 +### Define topology + +# Add switches s1_node = add_node(ec, switch1, slicename, pl_user, pl_pass, identity) s2_node = add_node(ec, switch2, slicename, pl_user, pl_pass, identity) @@ -173,9 +176,11 @@ port3 = add_port(ec, "nepi_port3", network, ovs1) port2 = add_port(ec, "nepi_port2", network, ovs2) port4 = add_port(ec, "nepi_port4", network, ovs2) +# Add hosts h1_node = add_node(ec, host1, slicename, pl_user, pl_pass, identity) h2_node = add_node(ec, host2, slicename, pl_user, pl_pass, identity) +### Add overlay # Add tap devices tap1 = add_tap(ec, ip3, prefix, ip1, h1_node) tap2 = add_tap(ec, ip4, prefix, ip2, h2_node) @@ -185,6 +190,7 @@ tunnel1 = add_tunnel(ec, port1, tap1) tunnel2 = add_tunnel(ec, port2, tap2) tunnel3 = add_tunnel(ec, port3, port4) +### Add Pings # Ping switch 1 to switch2 app1 = add_app(ec, "ping -c5 %s" % ip2, s1_node) # Ping switch 1 to host1