Fixing default components.
This commit is contained in:
parent
5041f3a0c5
commit
0ed3b45d02
@ -140,7 +140,19 @@ class ActionRunner(object):
|
|||||||
self.cfg = config
|
self.cfg = config
|
||||||
self.pkg_manager = pkg_manager
|
self.pkg_manager = pkg_manager
|
||||||
self.kargs = kargs
|
self.kargs = kargs
|
||||||
self.components = kargs.pop("components")
|
self.components = dict()
|
||||||
|
def_components = common.get_default_components()
|
||||||
|
unclean_components = kargs.pop("components")
|
||||||
|
if not unclean_components:
|
||||||
|
self.components = def_components
|
||||||
|
else:
|
||||||
|
for (c, opts) in unclean_components:
|
||||||
|
if opts is None and c in def_components:
|
||||||
|
self.components[c] = def_components[c]
|
||||||
|
elif opts is None:
|
||||||
|
self.components[c] = list()
|
||||||
|
else:
|
||||||
|
self.components[c] = opts
|
||||||
self.force = kargs.get('force', False)
|
self.force = kargs.get('force', False)
|
||||||
self.ignore_deps = kargs.get('ignore_deps', False)
|
self.ignore_deps = kargs.get('ignore_deps', False)
|
||||||
self.ref_components = kargs.get("ref_components")
|
self.ref_components = kargs.get("ref_components")
|
||||||
@ -148,13 +160,7 @@ class ActionRunner(object):
|
|||||||
self.gen_rc = action in _RC_FILE_MAKE_ACTIONS
|
self.gen_rc = action in _RC_FILE_MAKE_ACTIONS
|
||||||
|
|
||||||
def _get_components(self):
|
def _get_components(self):
|
||||||
components = self.components
|
return dict(self.components)
|
||||||
if not components:
|
|
||||||
components = common.get_default_components(self.distro)
|
|
||||||
LOG.info("Activating default components [%s]" % (", ".join(sorted(components.keys()))))
|
|
||||||
else:
|
|
||||||
LOG.info("Activating components [%s]" % (", ".join(sorted(components.keys()))))
|
|
||||||
return components
|
|
||||||
|
|
||||||
def _order_components(self, components):
|
def _order_components(self, components):
|
||||||
adjusted_components = dict(components)
|
adjusted_components = dict(components)
|
||||||
|
@ -106,7 +106,7 @@ _PKGR_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_default_components(distro):
|
def get_default_components():
|
||||||
def_components = dict()
|
def_components = dict()
|
||||||
def_components[settings.GLANCE] = [
|
def_components[settings.GLANCE] = [
|
||||||
glance.GAPI,
|
glance.GAPI,
|
||||||
|
@ -628,9 +628,8 @@ def goodbye(worked):
|
|||||||
|
|
||||||
|
|
||||||
def parse_components(components):
|
def parse_components(components):
|
||||||
#none provided, init it
|
|
||||||
if not components:
|
if not components:
|
||||||
components = list()
|
return list()
|
||||||
adjusted_components = dict()
|
adjusted_components = dict()
|
||||||
for c in components:
|
for c in components:
|
||||||
mtch = EXT_COMPONENT.match(c)
|
mtch = EXT_COMPONENT.match(c)
|
||||||
@ -638,8 +637,9 @@ def parse_components(components):
|
|||||||
component_name = mtch.group(1).lower().strip()
|
component_name = mtch.group(1).lower().strip()
|
||||||
if component_name in settings.COMPONENT_NAMES:
|
if component_name in settings.COMPONENT_NAMES:
|
||||||
component_opts = mtch.group(2)
|
component_opts = mtch.group(2)
|
||||||
components_opts_cleaned = list()
|
components_opts_cleaned = None
|
||||||
if component_opts:
|
if component_opts:
|
||||||
|
components_opts_cleaned = list()
|
||||||
sp_component_opts = component_opts.split(",")
|
sp_component_opts = component_opts.split(",")
|
||||||
for co in sp_component_opts:
|
for co in sp_component_opts:
|
||||||
cleaned_opt = co.strip()
|
cleaned_opt = co.strip()
|
||||||
|
@ -9,8 +9,9 @@ sys.path.insert(0, possible_topdir)
|
|||||||
from devstack import settings
|
from devstack import settings
|
||||||
from devstack.progs import common
|
from devstack.progs import common
|
||||||
|
|
||||||
|
|
||||||
distro = settings.RHEL6
|
distro = settings.RHEL6
|
||||||
comps = common.get_default_components(distro)
|
comps = common.get_default_components()
|
||||||
|
|
||||||
|
|
||||||
def filter_c(c):
|
def filter_c(c):
|
||||||
|
Loading…
Reference in New Issue
Block a user