dos2unix'es all files- only one affected : topology.py in the ns3 examples area
[nepi.git] / examples / linux / testing / ccncat_2_nodes.py
index 7efe118..cc47d82 100644 (file)
@@ -5,9 +5,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
@@ -48,11 +47,11 @@ import os
 import time
 
 def add_node(ec, host, user, ssh_key = None):
-    node = ec.register_resource("LinuxNode")
+    node = ec.register_resource("linux::Node")
     ec.set(node, "hostname", host)
     ec.set(node, "username", user)
     ec.set(node, "identity", ssh_key)
-    ec.set(node, "cleanHome", True)
+    ec.set(node, "cleanExperiment", True)
     ec.set(node, "cleanProcesses", True)
     return node
 
@@ -97,11 +96,11 @@ def add_ccnd(ec, os_type, peers):
 
     # BASH command -> ' ccndstart ; ccndc add ccnx:/ udp  host ;  ccnr '
     command = "ccndstart && "
-    peers = map(lambda peer: "ccndc add ccnx:/ udp  %s" % peer, peers)
+    peers = ["ccndc add ccnx:/ udp  %s" % peer for peer in peers]
     command += " ; ".join(peers) + " && "
     command += " ccnr & "
 
-    app = ec.register_resource("LinuxApplication")
+    app = ec.register_resource("linux::Application")
     ec.set(app, "depends", depends)
     ec.set(app, "sources", sources)
     ec.set(app, "install", install)
@@ -115,7 +114,7 @@ def add_publish(ec, movie):
     env = "PATH=$PATH:${BIN}/ccnx-0.7.1/bin"
     command = "ccnseqwriter -r ccnx:/VIDEO"
 
-    app = ec.register_resource("LinuxApplication")
+    app = ec.register_resource("linux::Application")
     ec.set(app, "stdin", movie)
     ec.set(app, "env", env)
     ec.set(app, "command", command)
@@ -126,7 +125,7 @@ def add_stream(ec):
     env = "PATH=$PATH:${BIN}/ccnx-0.7.1/bin"
     command = "sudo -S dbus-uuidgen --ensure ; ( ccncat ccnx:/VIDEO | vlc - ) "
 
-    app = ec.register_resource("LinuxApplication")
+    app = ec.register_resource("linux::Application")
     ec.set(app, "depends", "vlc")
     ec.set(app, "forwardX11", True)
     ec.set(app, "env", env)