From fa00c7cbbd68c8bb02cf36e8fa629caded675fcc Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 29 Mar 2012 22:22:47 -0700 Subject: [PATCH] Made the db use the parent param map --- devstack/component.py | 2 +- devstack/components/db.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/devstack/component.py b/devstack/component.py index 9f8a6e0b..d9bfd46b 100644 --- a/devstack/component.py +++ b/devstack/component.py @@ -110,7 +110,7 @@ class ComponentBase(object): def __str__(self): return "%s: %s" % (self.__class__.__name__, self.component_name) - + def _get_params(self): return { 'COMPONENT_DIR': self.component_dir, diff --git a/devstack/components/db.py b/devstack/components/db.py index 0cd74e16..3d1d1186 100644 --- a/devstack/components/db.py +++ b/devstack/components/db.py @@ -86,15 +86,16 @@ class DBInstaller(comp.PkgInstallComponent): def _get_param_map(self, config_fn): # This dictionary will be used for parameter replacement # In pre-install and post-install sections - host_ip = self.cfg.get('host', 'ip') - out = { + mp = comp.PkgInstallComponent._get_param_map(self, config_fn) + adds = { 'PASSWORD': self.pw_gen.get_password("sql", PASSWORD_PROMPT), 'BOOT_START': ("%s" % (True)).lower(), 'USER': self.cfg.getdefaulted("db", "sql_user", 'root'), - 'SERVICE_HOST': host_ip, - 'HOST_IP': host_ip + 'SERVICE_HOST': self.cfg.get('host', 'ip'), + 'HOST_IP': self.cfg.get('host', 'ip'), } - return out + mp.update(adds) + return mp def warm_configs(self): for key, prompt in WARMUP_PWS: