summaryrefslogtreecommitdiffstats
path: root/keystone/catalog
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2013-01-11 15:04:39 -0600
committerDolph Mathews <dolph.mathews@gmail.com>2013-02-04 14:09:38 -0600
commit08baaa465b837ec6a46f27afbdf30102dc7dec0b (patch)
tree9ea188f9ad92743d6d4b688746b98cfc29e7b1a0 /keystone/catalog
parent4722c84fb90c51fb5810ad7b46c48230ecee1a6c (diff)
downloadkeystone-08baaa465b837ec6a46f27afbdf30102dc7dec0b.tar.gz
keystone-08baaa465b837ec6a46f27afbdf30102dc7dec0b.tar.xz
keystone-08baaa465b837ec6a46f27afbdf30102dc7dec0b.zip
Why .pop()'ing urls first is important
The following code review made me realize that this really needed to be commented: https://review.openstack.org/#/c/19431/ Change-Id: I70c1e640db716f6bc0a01bf8fdf8145a8ea730ac
Diffstat (limited to 'keystone/catalog')
-rw-r--r--keystone/catalog/controllers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/keystone/catalog/controllers.py b/keystone/catalog/controllers.py
index 8dddf469..b0b2d934 100644
--- a/keystone/catalog/controllers.py
+++ b/keystone/catalog/controllers.py
@@ -86,8 +86,10 @@ class Endpoint(controller.V2Controller):
legacy_endpoint_ref = endpoint.copy()
+ # pop all urls off the endpoint so we don't persist them more than once
urls = dict((i, endpoint.pop('%surl' % i)) for i in INTERFACES
if endpoint.get('%surl' % i) is not None)
+
legacy_endpoint_id = uuid.uuid4().hex
for interface, url in urls.iteritems():
endpoint_ref = endpoint.copy()