# 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
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
# 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)
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)
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)