From f1b20cd4a98891d5d63053e9e598232eb3160879 Mon Sep 17 00:00:00 2001 From: Maurice Schreiber Date: Wed, 11 Apr 2018 10:20:25 +0200 Subject: [PATCH] move securiy service error explanation from comment Change-Id: If81d6cfd41e8aec63aaa95f3190eec44d7d2fc01 --- manila/api/v1/security_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manila/api/v1/security_service.py b/manila/api/v1/security_service.py index 2ad26cc581..dca6add24a 100644 --- a/manila/api/v1/security_service.py +++ b/manila/api/v1/security_service.py @@ -66,9 +66,9 @@ class SecurityServiceController(wsgi.Controller): share_nets = db.share_network_get_all_by_security_service( context, id) if share_nets: - # Cannot delete security service - # if it is assigned to share networks - raise exc.HTTPForbidden() + msg = _("Cannot delete security service. It is " + "assigned to share network(s)") + raise exc.HTTPForbidden(explanation=msg) policy.check_policy(context, RESOURCE_NAME, 'delete', security_service) db.security_service_delete(context, id)