add docker start command as argument
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 17 Feb 2016 10:42:55 +0000 (11:42 +0100)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 17 Feb 2016 10:42:55 +0000 (11:42 +0100)
emuvim/dcemulator/node.py

index 6c1ecf7..13007eb 100755 (executable)
@@ -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