git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing nasty ugly bug in DCE ccndc RM. Fix: Adding missing HOME environment set to...
[nepi.git]
/
examples
/
ccn_emu_live
/
dce.py
diff --git
a/examples/ccn_emu_live/dce.py
b/examples/ccn_emu_live/dce.py
index
06c3405
..
693293a
100644
(file)
--- a/
examples/ccn_emu_live/dce.py
+++ b/
examples/ccn_emu_live/dce.py
@@
-45,6
+45,8
@@
def get_simulator(ec):
ec.set(node, "hostname", "localhost")
simu = ec.register_resource("LinuxNS3Simulation")
ec.set(node, "hostname", "localhost")
simu = ec.register_resource("LinuxNS3Simulation")
+ ec.set(simu, "enableDump", True)
+ ec.set(simu, "StopTime", STOP_TIME)
ec.register_connection(simu, node)
return simu
ec.register_connection(simu, node)
return simu
@@
-79,7
+81,6
@@
def add_dce_ccnd(ec, nid):
ec.set (ccnd, "debug", 7)
ec.set (ccnd, "capacity", 50000)
ec.set (ccnd, "StartTime", "1s")
ec.set (ccnd, "debug", 7)
ec.set (ccnd, "capacity", 50000)
ec.set (ccnd, "StartTime", "1s")
- ec.set (ccnd, "StopTime", STOP_TIME)
ec.register_connection(ccnd, host)
# Collector to retrieve ccnd log
ec.register_connection(ccnd, host)
# Collector to retrieve ccnd log
@@
-98,7
+99,6
@@
def add_dce_ccnr(ec, nid):
ec.set (ccnr, "repoFile1", repofile)
ec.set (ccnr, "stackSize", 1<<20)
ec.set (ccnr, "StartTime", "2s")
ec.set (ccnr, "repoFile1", repofile)
ec.set (ccnr, "stackSize", 1<<20)
ec.set (ccnr, "StartTime", "2s")
- ec.set (ccnr, "StopTime", STOP_TIME)
ec.register_connection(ccnr, host)
def add_dce_ccncat(ec, nid):
ec.register_connection(ccnr, host)
def add_dce_ccncat(ec, nid):
@@
-110,7
+110,6
@@
def add_dce_ccncat(ec, nid):
ec.set (ccncat, "contentName", content_name)
ec.set (ccncat, "stackSize", 1<<20)
ec.set (ccncat, "StartTime", "8s")
ec.set (ccncat, "contentName", content_name)
ec.set (ccncat, "stackSize", 1<<20)
ec.set (ccncat, "StartTime", "8s")
- ec.set (ccncat, "StopTime", STOP_TIME)
ec.register_connection(ccncat, host)
def add_dce_fib_entry(ec, nid1, nid2):
ec.register_connection(ccncat, host)
def add_dce_fib_entry(ec, nid1, nid2):
@@
-125,8
+124,7
@@
def add_dce_fib_entry(ec, nid1, nid2):
ec.set (ccndc, "uri", "ccnx:/")
ec.set (ccndc, "host", ip2)
ec.set (ccndc, "stackSize", 1<<20)
ec.set (ccndc, "uri", "ccnx:/")
ec.set (ccndc, "host", ip2)
ec.set (ccndc, "stackSize", 1<<20)
- ec.set (ccndc, "StartTime", "2s")
- ec.set (ccndc, "StopTime", STOP_TIME)
+ ec.set (ccndc, "StartTime", "4s")
ec.register_connection(ccndc, host1)
def add_dce_net_iface(ec, nid1, nid2):
ec.register_connection(ccndc, host1)
def add_dce_net_iface(ec, nid1, nid2):
@@
-172,7
+170,7
@@
def avg_interests(ec, run):
# TODO: DUMP RESULTS TO FILE
# TODO: DUMP GRAPH DELAYS!
# TODO: DUMP RESULTS TO FILE
# TODO: DUMP GRAPH DELAYS!
- f = open("/tmp/metric", "
w
+")
+ f = open("/tmp/metric", "
a
+")
f.write("%.2f\n" % metric)
f.close()
print " METRIC", metric
f.write("%.2f\n" % metric)
f.close()
print " METRIC", metric
@@
-211,7
+209,7
@@
if __name__ == '__main__':
#### Create NEPI Experiment Description with LINEAR topology
ec = ExperimentController("dce_ccn",
topo_type = TopologyType.LINEAR,
#### Create NEPI Experiment Description with LINEAR topology
ec = ExperimentController("dce_ccn",
topo_type = TopologyType.LINEAR,
- node_count =
4
,
+ node_count =
2
,
assign_st = True,
assign_ips = True,
add_node_callback = add_dce_node,
assign_st = True,
assign_ips = True,
add_node_callback = add_dce_node,