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)