Updated with pylint warnings and symlinking more config files into /etc/XYZ
This commit is contained in:
parent
764bc5403e
commit
d17c842c02
devstack
@ -102,6 +102,13 @@ class GlanceInstaller(comp.PythonInstallComponent):
|
||||
def _get_pkgs(self):
|
||||
return list(REQ_PKGS)
|
||||
|
||||
def _get_symlinks(self):
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "glance", fn)
|
||||
return links
|
||||
|
||||
def post_install(self):
|
||||
comp.PythonInstallComponent.post_install(self)
|
||||
self._setup_db()
|
||||
|
@ -108,8 +108,11 @@ class HorizonInstaller(comp.PythonInstallComponent):
|
||||
self._check_ug()
|
||||
|
||||
def _get_symlinks(self):
|
||||
src = self._get_target_config_name(HORIZON_APACHE_CONF)
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "horizon", fn)
|
||||
src = self._get_target_config_name(HORIZON_APACHE_CONF)
|
||||
links[src] = APACHE_CONF_TARGETS[self.distro]
|
||||
if settings.QUANTUM_CLIENT in self.instances:
|
||||
#TODO remove this junk, blah, puke that we have to do this
|
||||
|
@ -90,7 +90,11 @@ class KeystoneInstaller(comp.PythonInstallComponent):
|
||||
return list(REQ_PKGS)
|
||||
|
||||
def _get_symlinks(self):
|
||||
return {sh.joinpths(self.cfgdir, ROOT_CONF): '/etc/keystone/keystone.conf'}
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "keystone", fn)
|
||||
return links
|
||||
|
||||
def post_install(self):
|
||||
comp.PythonInstallComponent.post_install(self)
|
||||
|
@ -89,6 +89,13 @@ class MelangeInstaller(comp.PythonInstallComponent):
|
||||
db.drop_db(self.cfg, DB_NAME)
|
||||
db.create_db(self.cfg, DB_NAME)
|
||||
|
||||
def _get_symlinks(self):
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "melange", fn)
|
||||
return links
|
||||
|
||||
def _get_pkgs(self):
|
||||
return list(REQ_PKGS)
|
||||
|
||||
|
@ -160,6 +160,7 @@ SUB_COMPONENT_NAME_MAP = {
|
||||
|
||||
#subdirs of the checkout/download
|
||||
BIN_DIR = 'bin'
|
||||
CONFIG_DIR = "etc"
|
||||
|
||||
#These are used by NovaConf
|
||||
QUANTUM_MANAGER = 'nova.network.quantum.manager.QuantumManager'
|
||||
@ -210,6 +211,7 @@ class NovaInstaller(comp.PythonInstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.PythonInstallComponent.__init__(self, TYPE, *args, **kargs)
|
||||
self.bindir = sh.joinpths(self.appdir, BIN_DIR)
|
||||
self.cfgdir = sh.joinpths(self.appdir, CONFIG_DIR)
|
||||
self.paste_conf_fn = self._get_target_config_name(PASTE_CONF)
|
||||
self.volumes_enabled = False
|
||||
if not self.component_opts or NVOL in self.component_opts:
|
||||
@ -225,7 +227,13 @@ class NovaInstaller(comp.PythonInstallComponent):
|
||||
return pkgs
|
||||
|
||||
def _get_symlinks(self):
|
||||
return {sh.joinpths(self.cfgdir, API_CONF): '/etc/nova/nova.conf'}
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "nova", fn)
|
||||
source_fn = sh.joinpths(self.cfgdir, API_CONF)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "nova", API_CONF)
|
||||
return links
|
||||
|
||||
def _get_pips(self):
|
||||
return list(REQ_PIPS)
|
||||
@ -391,13 +399,6 @@ class NovaInstaller(comp.PythonInstallComponent):
|
||||
else:
|
||||
return comp.PythonInstallComponent._get_source_config(self, config_fn)
|
||||
|
||||
def _get_target_config_name(self, config_fn):
|
||||
if config_fn == PASTE_CONF:
|
||||
#TODO Don't put nova-api-paste.ini in bin?
|
||||
return sh.joinpths(self.appdir, "bin", 'nova-api-paste.ini')
|
||||
else:
|
||||
return comp.PythonInstallComponent._get_target_config_name(self, config_fn)
|
||||
|
||||
def _get_param_map(self, config_fn):
|
||||
return keystone.get_shared_params(self.cfg)
|
||||
|
||||
|
@ -97,7 +97,11 @@ class SwiftInstaller(comp.PythonInstallComponent):
|
||||
return list(REQ_PKGS)
|
||||
|
||||
def _get_symlinks(self):
|
||||
return {self.cfgdir: '/etc/swift'}
|
||||
links = dict()
|
||||
for fn in self._get_config_files():
|
||||
source_fn = self._get_target_config_name(fn)
|
||||
links[source_fn] = sh.joinpths("/", "etc", "swift", fn)
|
||||
return links
|
||||
|
||||
def warm_configs(self):
|
||||
pws = ['service_token', 'swift_hash']
|
||||
|
@ -117,10 +117,10 @@ def _generate_header(fh, cfg):
|
||||
def _generate_general(fh, cfg):
|
||||
_write_line('# General stuff', fh)
|
||||
for (out_name, cfg_data) in CFG_MAKE.items():
|
||||
(section, key) = cfg_data
|
||||
value = cfg.get(section, key, auto_pw=False)
|
||||
if value:
|
||||
_write_env(out_name, value, fh)
|
||||
(section, key) = cfg_data
|
||||
value = cfg.get(section, key, auto_pw=False)
|
||||
if value:
|
||||
_write_env(out_name, value, fh)
|
||||
_write_line("", fh)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user