From: stevenvanrossem Date: Tue, 3 May 2016 09:22:54 +0000 (+0200) Subject: return docker configuration data on compute start X-Git-Tag: v3.1~133^2~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=e66ef121ed968d234bf984d01ee92ecdf6b21a72;p=osm%2Fvim-emu.git return docker configuration data on compute start --- 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