summaryrefslogtreecommitdiffstats
path: root/api/database
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-07-19 07:21:24 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-07-19 07:21:24 +0000
commit7d67a9a3bb7eddf9505d7a232e121c6c59bde287 (patch)
tree97d3e56f2e2b494d020f382138821cbb84d0ad75 /api/database
parent7ea08628579d2e8e50e748ae1bf337687235ca62 (diff)
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 <chenjiankun1@huawei.com>
Diffstat (limited to 'api/database')
-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 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)