summaryrefslogtreecommitdiffstats
path: root/keystone/catalog
diff options
context:
space:
mode:
authorsathish-nagappan <sathish.nagappan@nebula.com>2012-10-23 23:18:20 -0700
committersathish-nagappan <sathish.nagappan@nebula.com>2012-10-24 19:49:48 -0700
commitf9a9e7f3278a3cf461acad4d688a4868c2f7ac94 (patch)
tree2f8de735d8942557f4835450f00c02c8ad146e47 /keystone/catalog
parent7db2f6aa595e2d1261bc59750519b59daab7ab07 (diff)
downloadkeystone-f9a9e7f3278a3cf461acad4d688a4868c2f7ac94.tar.gz
keystone-f9a9e7f3278a3cf461acad4d688a4868c2f7ac94.tar.xz
keystone-f9a9e7f3278a3cf461acad4d688a4868c2f7ac94.zip
Enable Deletion of Services with Endpoints
fixes Bug #1019475 Allows the user to delete a service that has endpoints. Change-Id: If2d669e50f73ea5bb7b269f941a3b2710808a98a
Diffstat (limited to 'keystone/catalog')
-rw-r--r--keystone/catalog/backends/sql.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/keystone/catalog/backends/sql.py b/keystone/catalog/backends/sql.py
index e6172db5..6876bdec 100644
--- a/keystone/catalog/backends/sql.py
+++ b/keystone/catalog/backends/sql.py
@@ -95,6 +95,7 @@ class Catalog(sql.Base, catalog.Driver):
def delete_service(self, service_id):
session = self.get_session()
with session.begin():
+ session.query(Endpoint).filter_by(service_id=service_id).delete()
if not session.query(Service).filter_by(id=service_id).delete():
raise exception.ServiceNotFound(service_id=service_id)
session.flush()