-# 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
#
# 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):
import time
def add_node(ec, host, user, ssh_key = None):
ec.set(node, "hostname", host)
ec.set(node, "username", user)
ec.set(node, "identity", ssh_key)
ec.set(node, "hostname", host)
ec.set(node, "username", user)
ec.set(node, "identity", ssh_key)
ec.register_connection(ccnr, ccnd)
return ccnr
def add_fib_entry(ec, ccnd, peer_host):
ec.register_connection(ccnr, ccnd)
return ccnr
def add_fib_entry(ec, ccnd, peer_host):
ec.set(entry, "host", peer_host)
ec.register_connection(entry, ccnd)
return entry
def add_content(ec, ccnr, content_name, content):
ec.set(entry, "host", peer_host)
ec.register_connection(entry, ccnd)
return entry
def add_content(ec, ccnr, content_name, content):
ec.set(co, "contentName", content_name)
ec.set(co, "content", content)
ec.register_connection(co, ccnr)
ec.set(co, "contentName", content_name)
ec.set(co, "content", content)
ec.register_connection(co, ccnr)
ec.set(app, "command", command)
ec.register_connection(app, ccnd)
ec.set(app, "command", command)
ec.register_connection(app, ccnd)
ring_hosts = [host1, host2, host3, host4]
ccnds = dict()
ring_hosts = [host1, host2, host3, host4]
ccnds = dict()
host = ring_hosts[i]
node = add_node(ec, host, pl_user, pl_ssh_key)
ccnd = add_ccnd(ec, node)
host = ring_hosts[i]
node = add_node(ec, host, pl_user, pl_ssh_key)
ccnd = add_ccnd(ec, node)
# Register a collector to automatically collect traces
collector = add_collector(ec, "stderr")
# Register a collector to automatically collect traces
collector = add_collector(ec, "stderr")
ec.register_connection(collector, ccnd)
# deploy all ResourceManagers
ec.register_connection(collector, ccnd)
# deploy all ResourceManagers