From e82959493a99166f2ccf8dac7e134b8584df3eba Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Wed, 25 Oct 2017 16:03:50 +0000 Subject: [PATCH] Return 406 on force delete with bad api version Change-Id: I39c34e8a0984c81bd8863ab27022ca31a7b71a70 --- zun/api/controllers/v1/containers.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zun/api/controllers/v1/containers.py b/zun/api/controllers/v1/containers.py index 32b8007c0..f0df00735 100644 --- a/zun/api/controllers/v1/containers.py +++ b/zun/api/controllers/v1/containers.py @@ -566,11 +566,10 @@ class ContainersController(base.Controller): policy.enforce(context, "container:delete_force", action="container:delete_force") utils.validate_container_state(container, 'delete_force') -# Remove this line temporarily for tempest issues. -# else: -# raise exception.InvalidParamInVersion(param='force', -# req_version=req_version, -# min_version=min_version) + else: + raise exception.InvalidParamInVersion(param='force', + req_version=req_version, + min_version=min_version) elif stop: req_version = pecan.request.version min_version = versions.Version('', '', '', '1.12')