More keystone swift/quantum additions fixes.

This commit is contained in:
Joshua Harlow 2012-02-29 16:16:25 -08:00
parent 00a58c75b8
commit 2eafcb8072
2 changed files with 13 additions and 10 deletions
devstack/components

@ -82,15 +82,13 @@ SWIFT_TEMPL_ADDS = ['catalog.RegionOne.object_store.publicURL = http://%SERVICE_
'catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s',
'catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/',
'catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s',
"catalog.RegionOne.object_store.name = 'Swift Service'",
'', '']
"catalog.RegionOne.object_store.name = 'Swift Service'"]
#quantum template additions
QUANTUM_TEMPL_ADDS = ['catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/',
'catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/',
'catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/',
"catalog.RegionOne.network.name = 'Quantum Service'",
'', '']
"catalog.RegionOne.network.name = 'Quantum Service'"]
class KeystoneUninstaller(comp.PythonUninstallComponent):
@ -173,12 +171,19 @@ class KeystoneInstaller(comp.PythonInstallComponent):
elif name == CATALOG_CONF:
nlines = list()
if utils.service_enabled(settings.SWIFT, self.instances):
nlines.extend(SWIFT_TEMPL_ADDS)
mp = dict()
mp['SERVICE_HOST'] = self.cfg.get('host', 'ip')
nlines.append("# Swift additions")
nlines.extend(utils.param_replace_list(SWIFT_TEMPL_ADDS, mp))
nlines.append("")
if utils.service_enabled(settings.QUANTUM, self.instances) or \
utils.service_enabled(settings.QUANTUM_CLIENT, self.instances):
nlines.extend(QUANTUM_TEMPL_ADDS)
mp = dict()
mp['SERVICE_HOST'] = self.cfg.get('host', 'ip')
nlines.append("# Quantum additions")
nlines.extend(utils.param_replace_list(QUANTUM_TEMPL_ADDS, mp))
nlines.append("")
if nlines:
nlines.insert(0, "")
nlines.insert(0, contents)
contents = cfg.add_header(name, utils.joinlinesep(*nlines))
return contents

@ -170,9 +170,7 @@ class QuantumInstaller(comp.PkgInstallComponent):
bridge = self.cfg.get("quantum", "ovs_bridge")
if bridge:
LOG.info("Fixing up ovs bridge named %s.", bridge)
external_id = self.cfg.get("quantum", 'ovs_bridge_external_name')
if not external_id:
external_id = bridge
external_id = self.cfg.getdefaulted("quantum", 'ovs_bridge_external_name', bridge)
params = dict()
params['OVS_BRIDGE'] = bridge
params['OVS_EXTERNAL_ID'] = external_id