Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License.
default='default_catalog.templates', group='catalog')
continue
# NOTE(termie): object-store insists on having a dash
# TODO(jaypipes): should be templated.Catalog, # not templated.TemplatedCatalog to be consistent with # other catalog backends """A backend that generates endpoints for the Catalog based on templates.
It is usually configured via config entries that look like:
catalog.$REGION.$SERVICE.$key = $value
and is stored in a similar looking hierarchy. Where a value can contain values to be interpolated by standard python string interpolation that look like (the % is replaced by a $ due to paste attmepting to interpolate on its own:
http://localhost:$(public_port)s/
When expanding the template it will pass in a dict made up of the conf instance plus a few additional key-values, notably tenant_id and user_id.
It does not care what the keys and values are but it is worth noting that keystone_compat will expect certain keys to be there so that it can munge them into the output format keystone expects. These keys are:
name - the name of the service, most likely repeated for all services of the same type, across regions.
adminURL - the url of the admin endpoint
publicURL - the url of the public endpoint
internalURL - the url of the internal endpoint
"""
self.templates = templates else: template_file = CONF.find_file(template_file)
except IOError: LOG.critical(_('Unable to open template file %s') % template_file) raise
'user_id': user_id})
|