return s
def addLink(self, node1, node2):
+ """
+ Able to handle Datacenter objects as link
+ end points.
+ """
assert node1 is not None
assert node2 is not None
# ensure type of node1
raise Exception(
"one of the given nodes is not a Mininet switch or None")
+ def addDocker( self, name, **params ):
+ """
+ Wrapper for addDocker method provided by Dockernet.
+ """
+ return self.mnet.addDocker( name, **params)
+
+ def removeDocker( self, name, **params):
+ """
+ Wrapper for removeHost. Just to be complete.
+ """
+ return self.mnet.removeDocker(name, **params)
+
def start(self):
# start
for dc in self.dcs.itervalues():
Create a new container as compute resource and connect it to this
data center.
"""
- #TODO remove mnet shortcut to have a clean API
#TODO connect container to DC's swtich
- self.net.mnet.addDocker("%s.%s" % (self.name, name), dimage="ubuntu")
+ self.net.addDocker("%s.%s" % (self.name, name), dimage="ubuntu")
def removeCompute(self, name):
- #TODO remove mnet shortcut to have a clean API
#TODO disconnect container to DC's swtich
- self.net.mnet.removeDocker("%s.%s" % (self.name, name))
+ self.net.removeDocker("%s.%s" % (self.name, name))
"""
5. We want to access and control our data centers from the outside,
- e.g., we want to connect an orchestrate to start/stop compute
+ e.g., we want to connect an orchestrator to start/stop compute
resources aka. VNFs (represented by Docker containers in the emulated)
So we need to instantiate API endpoints (e.g. a zerorpc or REST