diff options
author | thuva4 <tharma.thuva@gmail.com> | 2017-11-30 14:44:45 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2017-12-02 09:08:09 +0530 |
commit | ae88dfd997ae0516ec097033c378740ea8580483 (patch) | |
tree | f04e1356afa0126ab1064b34bff3c11504b89022 /testapi/opnfv_testapi/handlers/pod_handlers.py | |
parent | 3e69f8623c87f0d1d673d702d3516e688daf9a0d (diff) |
redesign the pods interface
redesign the pods interface and add the delate operation
for the podas in backend.
Fix the issue in creating pods: Owner is null
Change-Id: I2f8e907f9ab62362a3003d6457662ab85bf2cb12
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/handlers/pod_handlers.py')
-rw-r--r-- | testapi/opnfv_testapi/handlers/pod_handlers.py | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/testapi/opnfv_testapi/handlers/pod_handlers.py b/testapi/opnfv_testapi/handlers/pod_handlers.py index abf5bf9..9e52ca0 100644 --- a/testapi/opnfv_testapi/handlers/pod_handlers.py +++ b/testapi/opnfv_testapi/handlers/pod_handlers.py @@ -57,22 +57,11 @@ class PodGURHandler(GenericPodHandler): """ self._get_one(query={'name': pod_name}) + @swagger.operation(nickname='deletePodByName') def delete(self, pod_name): - """ Remove a POD - - # check for an existing pod to be deleted - mongo_dict = yield self.db.pods.find_one( - {'name': pod_name}) - pod = TestProject.pod(mongo_dict) - if pod is None: - raise HTTPError(HTTP_NOT_FOUND, - "{} could not be found as a pod to be deleted" - .format(pod_name)) - - # just delete it, or maybe save it elsewhere in a future - res = yield self.db.projects.remove( - {'name': pod_name}) - - self.finish_request(answer) """ - pass + @description: delete a pod by pod_name + @return 200: delete success + @raise 404: pods not exist + """ + self._delete(query={'name': pod_name}) |