summaryrefslogtreecommitdiffstats
path: root/share/newton_base
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-22 08:47:40 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-22 08:47:40 +0000
commita0db0636571ff8bc39d16ac76fa9fde98f90173c (patch)
treea0e598f46d12faa18ca9b407e4448bd64a11313a /share/newton_base
parentdf8a90f400d85bdf910d25b988886c110d051de2 (diff)
Fix bug of interaction with artifact broker
Change-Id: I3dffcc4463fd5ec7004bbb7cc20c0dcbf1622f6d Issue-ID: MULTICLOUD-567 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'share/newton_base')
-rw-r--r--share/newton_base/resource/infra_workload_helper.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/share/newton_base/resource/infra_workload_helper.py b/share/newton_base/resource/infra_workload_helper.py
index f340157c..f274148b 100644
--- a/share/newton_base/resource/infra_workload_helper.py
+++ b/share/newton_base/resource/infra_workload_helper.py
@@ -164,7 +164,7 @@ class InfraWorkloadHelper(object):
errmsg = "stack:%s, query fails: %s" %\
(resource_uri, content)
logger.error(errmsg)
- return os_status, "UPDATE_FAILED", errmsg
+ return os_status, "UPDATE_FAILED", content
# find and update resources
# transactions = []
@@ -192,7 +192,7 @@ class InfraWorkloadHelper(object):
errmsg = "stack resource:%s, query fails: %s" % \
(resource_uri, content)
logger.error(errmsg)
- return os_status, "UPDATE_FAILED", errmsg
+ return os_status, "UPDATE_FAILED", content
vserver_detail = content.get('server', None) if retcode == 0 and content else None
if vserver_detail:
# compose inventory entry for vserver
@@ -254,7 +254,7 @@ class InfraWorkloadHelper(object):
errmsg = "stack resource:%s, query fails: %s" % \
(resource_uri, content)
logger.error(errmsg)
- return os_status, "UPDATE_FAILED", errmsg
+ return os_status, "UPDATE_FAILED", content
vport_detail = content.get('port', None) if retcode == 0 and content else None
if vport_detail:
@@ -436,7 +436,7 @@ class InfraWorkloadHelper(object):
if retcode > 0 or not content:
errmsg = "Stack query %s response: %s" % (resource_uri, content)
self._logger.debug(errmsg)
- return os_status, "GET_FAILED", errmsg
+ return os_status, "GET_FAILED", content
stacks = content.get('stacks', []) # if retcode == 0 and content else []
# stack_status = stacks[0].get("stack_status", "GET_FAILED") if len(stacks) > 0 else "GET_FAILED"
@@ -489,11 +489,11 @@ class InfraWorkloadHelper(object):
if retcode > 0 or not content:
errmsg = "Stack query %s response: %s" % (resource_uri, content)
self._logger.debug(errmsg)
- return os_status, "GET_FAILED", errmsg
+ return os_status, "GET_FAILED", content
stack = content.get('stack', {}) # if retcode == 0 and content else []
- # stack_status = stack.get("stack_status", "GET_FAILED")
- workload_status = "GET_COMPLETE"
+ workload_status = stack.get("stack_status", "GET_FAILED")
+ # workload_status = "GET_COMPLETE"
return 0, workload_status, content
except Exception as e: