#!/usr/bin/env python\r
-\r
-###############################################################################\r
#\r
# NEPI, a framework to manage network experiments\r
+# Copyright (C) 2013 INRIA\r
#\r
# This program is free software: you can redistribute it and/or modify\r
-# it under the terms of the GNU General Public License as published by\r
-# the Free Software Foundation, either version 3 of the License, or\r
-# (at your option) any later version.\r
+# it under the terms of the GNU General Public License version 2 as\r
+# published by the Free Software Foundation;\r
#\r
# This program is distributed in the hope that it will be useful,\r
# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
# along with this program. If not, see <http://www.gnu.org/licenses/>.\r
#\r
# Author: Alina Quereilhac <alina.quereilhac@inria.fr>\r
-#\r
-###############################################################################\r
\r
from nepi.execution.ec import ExperimentController \r
from nepi.execution.runner import ExperimentRunner\r
"repoFile1.0.8.2")\r
\r
def get_simulator(ec):\r
- simulator = ec.filter_resources("LinuxNS3Simulation")\r
+ simulator = ec.filter_resources("linux::ns3::Simulation")\r
\r
if not simulator:\r
- node = ec.register_resource("LinuxNode")\r
+ node = ec.register_resource("linux::Node")\r
ec.set(node, "hostname", "localhost")\r
\r
- simu = ec.register_resource("LinuxNS3Simulation")\r
+ simu = ec.register_resource("linux::ns3::Simulation")\r
ec.register_connection(simu, node)\r
return simu\r
\r
host = ec.netgraph.node_annotation(nid, "host")\r
\r
# Add dce ccnd to the dce node\r
- ccnd = ec.register_resource("ns3::LinuxDceCCND")\r
+ ccnd = ec.register_resource("linux::ns3::dce::CCND")\r
ec.set (ccnd, "stackSize", 1<<20)\r
ec.set (ccnd, "debug", 7)\r
ec.set (ccnd, "capacity", 50000)\r
host = ec.netgraph.node_annotation(nid, "host")\r
\r
# Add a CCN content repository to the dce node\r
- ccnr = ec.register_resource("ns3::LinuxDceCCNR")\r
+ ccnr = ec.register_resource("linux::ns3::dce::CCNR")\r
ec.set (ccnr, "repoFile1", repofile) \r
ec.set (ccnr, "stackSize", 1<<20)\r
ec.set (ccnr, "StartTime", "2s")\r
host = ec.netgraph.node_annotation(nid, "host")\r
\r
# Add a ccncat application to the dce host\r
- ccncat = ec.register_resource("ns3::LinuxDceCCNCat")\r
+ ccncat = ec.register_resource("linux::ns3::dce::CCNCat")\r
ec.set (ccncat, "contentName", content_name)\r
ec.set (ccncat, "stackSize", 1<<20)\r
ec.set (ccncat, "StartTime", "8s")\r
ip2 = net[nid2]\r
\r
# Add FIB entry between peer hosts\r
- ccndc = ec.register_resource("ns3::LinuxDceFIBEntry")\r
+ ccndc = ec.register_resource("linux::ns3::dce::FIBEntry")\r
ec.set (ccndc, "protocol", "udp") \r
ec.set (ccndc, "uri", "ccnx:/") \r
ec.set (ccndc, "host", ip2)\r
hostname = NODES[nid]\r
\r
# Add a planetlab host to the experiment description\r
- host = ec.register_resource("PlanetlabNode")\r
+ host = ec.register_resource("planetlab::Node")\r
ec.set(host, "hostname", hostname)\r
ec.set(host, "username", pl_slice)\r
ec.set(host, "identity", pl_ssh_key)\r
host = ec.netgraph.node_annotation(nid, "host")\r
\r
# Add a CCN daemon to the planetlab node\r
- ccnd = ec.register_resource("LinuxCCND")\r
+ ccnd = ec.register_resource("linux::CCND")\r
ec.set(ccnd, "debug", 7)\r
ec.register_connection(ccnd, host)\r
\r
ccnd = ec.netgraph.node_annotation(nid, "ccnd")\r
\r
# Add a CCN content repository to the planetlab node\r
- ccnr = ec.register_resource("LinuxCCNR")\r
+ ccnr = ec.register_resource("linux::CCNR")\r
\r
ec.set(ccnr, "repoFile1", repofile)\r
ec.register_connection(ccnr, ccnd)\r
ccnd = ec.netgraph.node_annotation(nid, "ccnd")\r
\r
# Add a CCN cat application to the planetlab node\r
- ccncat = ec.register_resource("LinuxCCNCat")\r
+ ccncat = ec.register_resource("linux::CCNCat")\r
ec.set(ccncat, "contentName", content_name)\r
ec.register_connection(ccncat, ccnd)\r
\r
hostname2 = ec.netgraph.node_annotation(nid2, "hostname")\r
\r
# Add a FIB entry between one planetlab node and its peer\r
- entry = ec.register_resource("LinuxFIBEntry")\r
+ entry = ec.register_resource("linux::FIBEntry")\r
ec.set(entry, "host", hostname2)\r
ec.register_connection(entry, ccnd1)\r
\r
add_pl_ccncat(ec, nid)\r
\r
def wait_guids(ec):\r
- return ec.filter_resources("LinuxCCNCat")\r
+ return ec.filter_resources("linux::CCNCat")\r
\r
if __name__ == '__main__':\r
\r