#!/usr/bin/env python
+##
+## Experiment topology:
+##
+## ccncatchunks ccnsendchunks
+## | |
+## .-> node1 -- .. -- nodei -- .. -- nodeN <-.
+##
+##
+## - Nodes are connected through an overlay network over the Intenet
+## - On each node runs a CCNx daemon
+## - Static multicast entries are added to the CCNx FIB on each node to communicate them in series.
+## (Nodes only have FIB entries to at most two nodes)
+##
+
+
from nepi.core.design import ExperimentDescription, FactoriesProvider
from nepi.core.execute import ExperimentController
from nepi.util.constants import ApplicationStatus as AS
slice_desc.set_attribute_value("plcHost", plc_host)
slice_desc.set_attribute_value("tapPortBase", port_base)
# Kills all running processes before starting the experiment
- slice_desc.set_attribute_value("dedicatedSlice", True)
+ slice_desc.set_attribute_value("cleanProc", True)
+ # NOTICE: Setting 'cleanHome' to 'True' will erase all previous
+ # folders in the sliver Home directory, including result files!
+ #slice_desc.set_attribute_value("cleanHome", True)
slice_desc.set_attribute_value("plLogLevel", "DEBUG")
return slice_desc
login = "%s@%s" % (slicename, hostname)
command = 'PATH=$PATH:$(ls | egrep nepi-ccnd- | head -1)/bin; ccncatchunks2 ccnx:/VIDEO'
proc1 = subprocess.Popen(['ssh', login, command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell = False)
- proc2 = subprocess.Popen(['vlc', '-'], stdin=proc1.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ proc2 = subprocess.Popen(['vlc',
+ '--sub-filter', 'marq',
+ '--marq-marquee',
+ '(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org',
+ '--marq-position=8',
+ '--no-video-title-show', '-'],
+ stdin=proc1.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return proc2
def create_ed(hostnames, vsys_vnet, slicename, plc_host, pl_user, pl_pwd, pl_ssh_key,
# Calculate the number of virtual networks required to connect all the nodes
# with all other nodes as the binomial coeficient C(n, 2), with n = #nodes
n = len(hostnames)
- c = math.factorial(n) / (2 * math.factorial(n-2))
+ c = n * (n-1) / 2
# Validate that we can get 'c' /30 subnetworks
if c > math.pow(2, (30 - base.prefixlen)):