From: stevenvanrossem Date: Wed, 17 Feb 2016 10:42:55 +0000 (+0100) Subject: add docker start command as argument X-Git-Tag: v3.1~179^2~5 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fvim-emu.git;a=commitdiff_plain;h=e55975e6f82bde07a168693abb7863b2902c67a4 add docker start command as argument --- diff --git a/emuvim/dcemulator/node.py b/emuvim/dcemulator/node.py index 6c1ecf7..13007eb 100755 --- a/emuvim/dcemulator/node.py +++ b/emuvim/dcemulator/node.py @@ -99,7 +99,7 @@ class Datacenter(object): def start(self): pass - def startCompute(self, name, image=None, network=None): + def startCompute(self, name, image=None, command=None,network=None): """ Create a new container as compute resource and connect it to this data center. @@ -117,7 +117,7 @@ class Datacenter(object): if network is None: network = {} # {"ip": "10.0.0.254/8"} # create the container and connect it to the given network - d = self.net.addDocker("%s" % (name), dimage=image) + d = self.net.addDocker("%s" % (name), dimage=image, dcmd=command) self.net.addLink(d, self.switch, params1=network) # do bookkeeping self.containers[name] = d