summaryrefslogtreecommitdiffstats
path: root/api/database/v2
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-07-13 06:14:43 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-07-13 07:12:47 +0000
commitcc3c7796ccb30b021c219cabdbe73bfc14fb38cc (patch)
tree95e3b5468ee76e4d8e023fad7a43775fa6213ef2 /api/database/v2
parent49be6a8c0f42c9a12af305721beac95285f74b2b (diff)
Add API to get environments
JIRA: YARDSTICK-716 API: /api/v2/yardstick/environments METHOD: GET Change-Id: I46b7fb2b143fe76b6a0edbf1ecc8281187b85918 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'api/database/v2')
-rw-r--r--api/database/v2/handlers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/database/v2/handlers.py b/api/database/v2/handlers.py
index eb732817d..095ad724c 100644
--- a/api/database/v2/handlers.py
+++ b/api/database/v2/handlers.py
@@ -24,6 +24,9 @@ class V2EnvironmentHandler(object):
db_session.commit()
return environment
+ def list_all(self):
+ return V2Environment.query.all()
+
def get_by_uuid(self, uuid):
environment = V2Environment.query.filter_by(uuid=uuid).first()
if not environment: