From e66ef121ed968d234bf984d01ee92ecdf6b21a72 Mon Sep 17 00:00:00 2001 From: stevenvanrossem Date: Tue, 3 May 2016 11:22:54 +0200 Subject: [PATCH] return docker configuration data on compute start --- src/emuvim/api/zerorpc/compute.py | 4 +++- src/emuvim/dcemulator/node.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emuvim/api/zerorpc/compute.py b/src/emuvim/api/zerorpc/compute.py index f5d0799..7b6c1d4 100644 --- a/src/emuvim/api/zerorpc/compute.py +++ b/src/emuvim/api/zerorpc/compute.py @@ -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 diff --git a/src/emuvim/dcemulator/node.py b/src/emuvim/dcemulator/node.py index 3a4fbc2..41da627 100755 --- a/src/emuvim/dcemulator/node.py +++ b/src/emuvim/dcemulator/node.py @@ -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 -- 2.25.1