summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Schreiber <maurice.schreiber@sap.com>2018-04-11 10:20:25 +0200
committerMaurice Schreiber <maurice.schreiber@sap.com>2018-04-11 20:11:40 +0200
commitf1b20cd4a98891d5d63053e9e598232eb3160879 (patch)
treeccfb62f58ef30ad4fc41ed9840bc6dc3f17c7061
parent80e9298418d9ccfa1057066700c781d17f584361 (diff)
move securiy service error explanation from comment7.0.0.0b1
Notes
Notes (review): Code-Review+2: Tom Barron <tpb@dyncloud.net> Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com> Code-Review+2: Mark Sturdevant <mark.sturdevant@ibm.com> Workflow+1: Mark Sturdevant <mark.sturdevant@ibm.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 13 Apr 2018 00:17:26 +0000 Reviewed-on: https://review.openstack.org/560416 Project: openstack/manila Branch: refs/heads/master
-rw-r--r--manila/api/v1/security_service.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/manila/api/v1/security_service.py b/manila/api/v1/security_service.py
index 2ad26cc..dca6add 100644
--- a/manila/api/v1/security_service.py
+++ b/manila/api/v1/security_service.py
@@ -66,9 +66,9 @@ class SecurityServiceController(wsgi.Controller):
66 share_nets = db.share_network_get_all_by_security_service( 66 share_nets = db.share_network_get_all_by_security_service(
67 context, id) 67 context, id)
68 if share_nets: 68 if share_nets:
69 # Cannot delete security service 69 msg = _("Cannot delete security service. It is "
70 # if it is assigned to share networks 70 "assigned to share network(s)")
71 raise exc.HTTPForbidden() 71 raise exc.HTTPForbidden(explanation=msg)
72 policy.check_policy(context, RESOURCE_NAME, 72 policy.check_policy(context, RESOURCE_NAME,
73 'delete', security_service) 73 'delete', security_service)
74 db.security_service_delete(context, id) 74 db.security_service_delete(context, id)