aboutsummaryrefslogtreecommitdiffstats
path: root/moon_orchestrator/moon_orchestrator/api
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2018-01-08 16:20:29 +0100
committerThomas Duval <thomas.duval@orange.com>2018-01-08 16:20:29 +0100
commit9e25cdc18d6a5013db876641ef0a151f34ff62c5 (patch)
tree12ce89c8b33d174c4cc978ddfa9f17e04a7349d1 /moon_orchestrator/moon_orchestrator/api
parent48857b80be18bb0985aab643f5c8c899194d636b (diff)
Implement the delete_pod function in Manager and Orchestrator
Change-Id: I55da3610fa791ec9b3343cca49c5ca034cc7579f
Diffstat (limited to 'moon_orchestrator/moon_orchestrator/api')
-rw-r--r--moon_orchestrator/moon_orchestrator/api/pods.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/moon_orchestrator/moon_orchestrator/api/pods.py b/moon_orchestrator/moon_orchestrator/api/pods.py
index 7b89372e..a83ca9ae 100644
--- a/moon_orchestrator/moon_orchestrator/api/pods.py
+++ b/moon_orchestrator/moon_orchestrator/api/pods.py
@@ -27,7 +27,6 @@ class Pods(Resource):
def __init__(self, **kwargs):
self.driver = kwargs.get("driver")
- self.create_pipeline = kwargs.get("create_pipeline_hook")
@check_auth
def get(self, uuid=None, user_id=None):
@@ -75,7 +74,7 @@ class Pods(Resource):
}
"""
logger.debug("POST param={}".format(request.json))
- self.create_pipeline(
+ self.driver.create_pipeline(
request.json.get("keystone_project_id"),
request.json.get("pdp_id"),
request.json.get("security_pipeline"),
@@ -102,7 +101,11 @@ class Pods(Resource):
"message": "optional message"
}
"""
- return {"result": True}
+ try:
+ self.driver.delete_pipeline(uuid)
+ return {'result': True}
+ except Exception as e:
+ return {"result": False, "message": str(e)}, 500
@check_auth
def patch(self, uuid=None, user_id=None):