last modifications about Openflow after merging
[nepi.git] / examples / openvswitch / ovs_ping_3switches_loop.py
index 9465f08..2b04dd9 100644 (file)
 #    You should have received a copy of the GNU General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
-#         Alexandros Kouvakas <alexandros.kouvakas@gmail.com>
+# Authors :  Julien Tribino <julien.tribino@inria.fr>
+#          Alina Quereilhac <alina.quereilhac@inria.fr>
 #
-#         Switch1 ------- Switch2         
-#            /                \           
-#           /                  \          
-#          /                    \         
-#       Host1                  Host2      
+# Topology :
+#
+#                  Host3
+#                    |
+#                    |
+#                    |   
+#                 Switch3                         
+#                 /    \          
+#                /      \                
+#               /        \              
+#              /          \             
+#         Switch1 ----- Switch2         
+#            /              \           
+#           /                \          
+#          /                  \         
+#       Host1                Host2      
 
 
 
@@ -44,7 +55,7 @@ def add_node(ec, host, user, pl_user, pl_password):
     return node
 
 def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, node):
-    ovs = ec.register_resource("OVSWitch")
+    ovs = ec.register_resource("OVSSwitch")
     ec.set(ovs, "bridge_name", bridge_name)
     ec.set(ovs, "virtual_ip_pref", virtual_ip_pref)
     ec.set(ovs, "controller_ip", controller_ip)
@@ -83,6 +94,7 @@ def add_app(ec, command, node):
 # Create the EC
 ec = ExperimentController(exp_id = "test-tr")
 
+#XXX : Need to put 6 working nodes or to let Nepi find for you
 switch1 = "planetlab2.virtues.fi"
 switch2 = "planetlab2.upc.es"
 switch3 = "planetlab2.cs.aueb.gr"
@@ -90,9 +102,13 @@ host1 = "planetlab2.ionio.gr"
 host2 = "iraplab2.iralab.uni-karlsruhe.de"
 host3 = "planetlab2.diku.dk"
 
-ip_controller = "194.254.215.12"
+#ip_controller = "194.254.215.12"
+ip_controller = "xxx.yyy.zzz.ttt"
+
+#XXX : Depends on the Vsys_tag of your slice
 network = "192.168.3.0"
 
+#XXX : Name of your slice
 slicename = "inria_nepi"
 
 pl_user = os.environ.get("PL_USER")
@@ -154,8 +170,7 @@ ec.deploy()
 
 ec.wait_finished([app1, app2, app3, app4, app5, app6, app7, app8, app9, app10, app11, app12])
 
-# Retreive ping results and save
-# them in a file
+# Retreive ping results and save them in a file
 ping1 = ec.trace(app1, 'stdout')
 ping2 = ec.trace(app2, 'stdout')
 ping3 = ec.trace(app3, 'stdout')