From 7d67a9a3bb7eddf9505d7a232e121c6c59bde287 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Wed, 19 Jul 2017 07:21:24 +0000 Subject: Add API(v2) to get all projects info JIRA: YARDSTICK-732 API: /api/v2/yardstick/projects METHOD: GET Change-Id: Ifd67f11f516270d96c0e80b5b8c76a939583d9e5 Signed-off-by: chenjiankun --- api/database/v2/handlers.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api/database') diff --git a/api/database/v2/handlers.py b/api/database/v2/handlers.py index 095ad724c..7aa02a0a5 100644 --- a/api/database/v2/handlers.py +++ b/api/database/v2/handlers.py @@ -130,6 +130,9 @@ class V2ContainerHandler(object): class V2ProjectHandler(object): + def list_all(self): + return V2Project.query.all() + def insert(self, kwargs): project = V2Project(**kwargs) db_session.add(project) -- cgit 1.2.3-korg