summaryrefslogtreecommitdiffstats
path: root/api/database/v2
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-07-14 03:56:16 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-14 03:56:16 +0000
commit6acd5d156ba25d1eed49763fb220a117a43d5ef8 (patch)
tree605b149c78ff2997f50cc054f301ea3edc5b804f /api/database/v2
parentebf9803aa3f8c9851e845f80145329f59863267c (diff)
parentcc3c7796ccb30b021c219cabdbe73bfc14fb38cc (diff)
Merge "Add API to get environments"
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: