Write minimal paste configuration for heat-all.
Instead of relying on the system's paste configuration for heat api, we can write a minimal configuration that is needed by the heat-all process. This works in a similar way that we generate a minimal configuration for heat.conf. It also ensures that the configuration can be reprodcued if needed without having to rely on what may have been configured on an individual system. Change-Id: I27e98fa77966213fd14e9a5e3187fd4e02db0a10
This commit is contained in:
parent
a4bf4dbad5
commit
43896a6bc4
|
@ -212,7 +212,7 @@ connection = sqlite:///%(sqlite_db)s.db
|
|||
|
||||
[paste_deploy]
|
||||
flavor = noauth
|
||||
api_paste_config = /usr/share/heat/api-paste-dist.ini
|
||||
api_paste_config = api-paste.ini
|
||||
|
||||
[oslo_policy]
|
||||
policy_file = %(policy_file)s
|
||||
|
@ -226,6 +226,25 @@ limit_iterators=9000
|
|||
with open(config_file, 'w') as temp_file:
|
||||
temp_file.write(heat_config)
|
||||
|
||||
heat_api_paste_config = '''
|
||||
[pipeline:heat-api-noauth]
|
||||
pipeline = noauth context versionnegotiation apiv1app
|
||||
[app:apiv1app]
|
||||
paste.app_factory = heat.common.wsgi:app_factory
|
||||
heat.app_factory = heat.api.openstack.v1:API
|
||||
[filter:noauth]
|
||||
paste.filter_factory = heat.common.noauth:filter_factory
|
||||
[filter:context]
|
||||
paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
|
||||
[filter:versionnegotiation]
|
||||
paste.filter_factory = heat.common.wsgi:filter_factory
|
||||
heat.filter_factory = heat.api.openstack:version_negotiation_filter
|
||||
'''
|
||||
paste_file = os.path.join(
|
||||
os.path.dirname(config_file), 'api-paste.ini')
|
||||
with open(paste_file, 'w') as temp_file:
|
||||
temp_file.write(heat_api_paste_config)
|
||||
|
||||
def _write_fake_keystone_token(self, heat_api_port, config_file):
|
||||
ks_token = json.dumps(FAKE_TOKEN_RESPONSE) % {'heat_port':
|
||||
heat_api_port}
|
||||
|
|
Loading…
Reference in New Issue