From: Eugene Nikanorov Date: Tue, 6 May 2014 11:35:04 +0000 (+0400) Subject: Make VPNaaS 'InUse' exception more clear X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=14ebdbe77479a72ad1f324663ec795460e03e99a;p=openstack-build%2Fneutron-build.git Make VPNaaS 'InUse' exception more clear In case IpSecPolicy or IKEPolicy is updated while VPN connection that uses it is already established, IPsecPolicyInUse or IKEPolicuInUse is raised. Need to clarify their messages to emphasize that policies can't be updated because they are used by established connection. Change-Id: I259f9b8bcff7f8ec13ac630285f6e881c6653309 Closes-Bug: #1315809 --- diff --git a/neutron/extensions/vpnaas.py b/neutron/extensions/vpnaas.py index 5c7cd46bf..f6bdcd761 100644 --- a/neutron/extensions/vpnaas.py +++ b/neutron/extensions/vpnaas.py @@ -54,7 +54,8 @@ class IPsecPolicyNotFound(qexception.NotFound): class IKEPolicyInUse(qexception.InUse): - message = _("IKEPolicy %(ikepolicy_id)s is still in use") + message = _("IKEPolicy %(ikepolicy_id)s is in use by existing " + "IPsecSiteConnection and can't be updated or deleted") class VPNServiceInUse(qexception.InUse): @@ -71,7 +72,8 @@ class VPNStateInvalidToUpdate(qexception.BadRequest): class IPsecPolicyInUse(qexception.InUse): - message = _("IPsecPolicy %(ipsecpolicy_id)s is still in use") + message = _("IPsecPolicy %(ipsecpolicy_id)s is in use by existing " + "IPsecSiteConnection and can't be updated or deleted") class DeviceDriverImportError(qexception.NeutronException):