summaryrefslogtreecommitdiffstats
path: root/api/resources/v2/images.py
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-07-27 05:04:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-27 05:04:37 +0000
commitd184d8714e543e4f2497db682154820f7eecf1de (patch)
tree0dd1709c01ff9f34b4d39dad4af50ff6b789234f /api/resources/v2/images.py
parentd9b9b8970312e13f798a367439cfc2c333c7fca4 (diff)
parentedbe3568a052da8afd24b6877c4c6fdcc7627ba3 (diff)
Merge "Yardstick GUI & GUI deployment"
Diffstat (limited to 'api/resources/v2/images.py')
-rw-r--r--api/resources/v2/images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/resources/v2/images.py b/api/resources/v2/images.py
index 8755e5265..8359e105b 100644
--- a/api/resources/v2/images.py
+++ b/api/resources/v2/images.py
@@ -37,6 +37,8 @@ class V2Images(ApiResource):
else:
images = [self.get_info(change_obj_to_dict(i)) for i in images_list]
status = 1 if all(i['status'] == 'ACTIVE' for i in images) else 0
+ if not images:
+ status = 0
return result_handler(consts.API_SUCCESS, {'status': status, 'images': images})