From 0f8c7107308a0191c2c4df8a3070ed8868c64480 Mon Sep 17 00:00:00 2001 From: Xiaohua Zhang Date: Fri, 30 Nov 2018 08:52:54 +0000 Subject: Fix issue of Delete Infra_workload Enforce client to pass in workload_id Change-Id: I017321920aad665bee352499e0b43f5c5db5898c Issue-ID: MULTICLOUD-423 Signed-off-by: Xiaohua Zhang --- windriver/titanium_cloud/resource/views/infra_workload.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'windriver/titanium_cloud/resource') diff --git a/windriver/titanium_cloud/resource/views/infra_workload.py b/windriver/titanium_cloud/resource/views/infra_workload.py index 681a7f91..74c187fe 100644 --- a/windriver/titanium_cloud/resource/views/infra_workload.py +++ b/windriver/titanium_cloud/resource/views/infra_workload.py @@ -196,6 +196,12 @@ class InfraWorkload(APIView): self._logger.debug("META: %s" % request.META) try: + if requri == "": + raise VimDriverNewtonException( + message="workload_id is not specified", + content="workload_id must be specified to delete the workload", + status_code=400) + # assume the workload_type is heat stack_id = requri cloud_owner, regionid = extsys.decode_vim_id(vimid) -- cgit 1.2.3-korg