From cc3c7796ccb30b021c219cabdbe73bfc14fb38cc Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Thu, 13 Jul 2017 06:14:43 +0000 Subject: Add API to get environments JIRA: YARDSTICK-716 API: /api/v2/yardstick/environments METHOD: GET Change-Id: I46b7fb2b143fe76b6a0edbf1ecc8281187b85918 Signed-off-by: chenjiankun --- api/database/v2/handlers.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api/database/v2') 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: -- cgit 1.2.3-korg