use print() - import print_function - should be fine for both py2 and py3
[nepi.git] / examples / openvswitch / ovs_ping_2_switches.py
index 155fcbb..a28bef2 100644 (file)
@@ -4,9 +4,8 @@
 #    Copyright (C) 2013 INRIA
 #
 #    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
 #
 #    This program is distributed in the hope that it will be useful,
 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,6 +33,8 @@
 # $ PYTHONPATH=$PYTHONPATH:src/ python examples/openvswitch/ovs_ping_2_switches.py -n "192.168.3.0/24" -C "1.1.1.1" -s <slicename> -i /~/.ssh/id_rsa
 #
 
+from __future__ import print_function
+
 from nepi.execution.ec import ExperimentController
 
 import os
@@ -79,7 +80,6 @@ def add_tap(ec, ip, prefix, pointopoint, node):
     ec.set(tap, "ip", ip)
     ec.set(tap, "prefix", prefix)
     ec.set(tap, "pointopoint", pointopoint)
-    ec.set(tap, "up", True)
     ec.register_connection(tap, node)
     return tap
 
@@ -204,5 +204,4 @@ stdout = ec.trace(app, "stdout")
 # Delete the overlay network
 ec.shutdown()
 
-print stdout
-
+print(stdout)