return docker configuration data on compute start
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Tue, 3 May 2016 09:22:54 +0000 (11:22 +0200)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Tue, 3 May 2016 09:22:54 +0000 (11:22 +0200)
src/emuvim/api/zerorpc/compute.py
src/emuvim/dcemulator/node.py

index f5d0799..7b6c1d4 100644 (file)
@@ -71,7 +71,9 @@ class MultiDatacenterApi(object):
         try:
             c = self.dcs.get(dc_label).startCompute(
                 compute_name, image=image, command=command, network=network)
-            return str(c.name)
+            #return str(c.name)
+            # return docker inspect dict
+            return c.getStatus()
         except Exception as ex:
             logging.exception("RPC error.")
             return ex.message
index 3a4fbc2..41da627 100755 (executable)
@@ -49,6 +49,7 @@ class EmulatorCompute(Docker):
         status = {}
         status["name"] = self.name
         status["network"] = self.getNetworkStatus()
+        status["docker_network"] = self.dcinfo['NetworkSettings']['IPAddress']
         status["image"] = self.dimage
         status["flavor_name"] = self.flavor_name
         status["cpu_quota"] = self.cpu_quota