From fa4bcc77c95dc01bfd98f664fafe433d255cfa33 Mon Sep 17 00:00:00 2001 From: peusterm Date: Fri, 15 Jan 2016 11:08:09 +0100 Subject: [PATCH] slight modification of internal API: startCompute returns EmulatorCompute object instead of name --- emuvim/api/zerorpcapi.py | 3 ++- emuvim/dcemulator/node.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emuvim/api/zerorpcapi.py b/emuvim/api/zerorpcapi.py index c6b9c70..8a08131 100644 --- a/emuvim/api/zerorpcapi.py +++ b/emuvim/api/zerorpcapi.py @@ -60,7 +60,8 @@ class MultiDatacenterApi(object): # TODO what to return UUID / given name / internal name ? logging.debug("RPC CALL: compute start") try: - return self.dcs.get(dc_name).startCompute(compute_name) + c = self.dcs.get(dc_name).startCompute(compute_name) + return str(c.name) except Exception as ex: logging.exception("RPC error.") return ex.message diff --git a/emuvim/dcemulator/node.py b/emuvim/dcemulator/node.py index 551ebaf..d506930 100644 --- a/emuvim/dcemulator/node.py +++ b/emuvim/dcemulator/node.py @@ -113,7 +113,7 @@ class Datacenter(object): # do bookkeeping self.containers[name] = d d.datacenter = self - return name # we might use UUIDs for naming later on + return d # we might use UUIDs for naming later on def stopCompute(self, name): """ -- 2.25.1