summaryrefslogtreecommitdiffstats
path: root/keystone
diff options
context:
space:
mode:
authorAlan Pevec <apevec@redhat.com>2012-03-07 21:31:37 +0100
committerAlan Pevec <apevec@redhat.com>2012-03-09 08:21:18 +0100
commit2f4fb46159e8b73c8aba231ec2239b41bb53183c (patch)
treecad1a7a615653898fb5bda966cbced7870deeccd /keystone
parent0a124fa6a114ba357f6aec9ba4da5eb503483a95 (diff)
downloadkeystone-2f4fb46159e8b73c8aba231ec2239b41bb53183c.tar.gz
keystone-2f4fb46159e8b73c8aba231ec2239b41bb53183c.tar.xz
keystone-2f4fb46159e8b73c8aba231ec2239b41bb53183c.zip
create service endpoints in sample data
Enable creation of endpoints by setting ENABLE_ENDPOINTS environment variable. Works with Catalog SQL backend. Change-Id: I9ba0ea1b3cf35720fb338e91f48fcbddc326971b
Diffstat (limited to 'keystone')
-rw-r--r--keystone/catalog/backends/sql.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/keystone/catalog/backends/sql.py b/keystone/catalog/backends/sql.py
index a3a46cda..3fb53167 100644
--- a/keystone/catalog/backends/sql.py
+++ b/keystone/catalog/backends/sql.py
@@ -19,11 +19,15 @@ import sqlalchemy.exc
import webob.exc
from keystone import catalog
+from keystone import config
from keystone import exception
from keystone.common import sql
from keystone.common.sql import migration
+CONF = config.CONF
+
+
class Service(sql.ModelBase, sql.DictBase):
__tablename__ = 'service'
id = sql.Column(sql.String(64), primary_key=True)
@@ -140,7 +144,9 @@ class Catalog(sql.Base):
return [e['id'] for e in list(endpoints)]
def get_catalog(self, user_id, tenant_id, metadata=None):
- d = {'tenant_id': tenant_id, 'user_id': user_id}
+ d = dict(CONF.iteritems())
+ d.update({'tenant_id': tenant_id,
+ 'user_id': user_id})
catalog = {}
endpoints = [self.get_endpoint(e)