summaryrefslogtreecommitdiffstats
path: root/api/resources/v2/environments.py
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-08-25 00:50:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-25 00:50:21 +0000
commitf5a96ffd959b11a122c4beea1fc99c89f755678c (patch)
tree1c0cad1b94f33a3275c816999653870e6955d6eb /api/resources/v2/environments.py
parentffecd5b84eecdb74d7534b801c1359251c34b34e (diff)
parentefb4f088f14aee394599bea21973f82f1867c4fe (diff)
Merge "Add function to upload image from local/url in GUI"
Diffstat (limited to 'api/resources/v2/environments.py')
-rw-r--r--api/resources/v2/environments.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/api/resources/v2/environments.py b/api/resources/v2/environments.py
index f021a3c5a..158e98be7 100644
--- a/api/resources/v2/environments.py
+++ b/api/resources/v2/environments.py
@@ -35,6 +35,9 @@ class V2Environments(ApiResource):
container_info = e['container_id']
e['container_id'] = jsonutils.loads(container_info) if container_info else {}
+ image_id = e['image_id']
+ e['image_id'] = image_id.split(',') if image_id else []
+
data = {
'environments': environments
}
@@ -78,8 +81,13 @@ class V2Environment(ApiResource):
return result_handler(consts.API_ERROR, 'no such environment id')
environment = change_obj_to_dict(environment)
+
container_id = environment['container_id']
environment['container_id'] = jsonutils.loads(container_id) if container_id else {}
+
+ image_id = environment['image_id']
+ environment['image_id'] = image_id.split(',') if image_id else []
+
return result_handler(consts.API_SUCCESS, {'environment': environment})
def delete(self, environment_id):