Updated to make get pkg list protected as it should be.

This commit is contained in:
Joshua Harlow
2012-01-25 17:48:56 -08:00
parent 1ebb18062f
commit ec8858174f
3 changed files with 6 additions and 10 deletions

View File

@@ -85,15 +85,11 @@ class PkgInstallComponent(ComponentBase):
def _get_param_map(self, config_fn):
return None
# Note that there's no underscore on this method because it's two levels
# in so that the component installers can't access it as a 'protected'
# method. E.g. componentInstall inherits from PythonInstallComponent
# which then inherits from here.
def get_pkglist(self):
def _get_pkglist(self):
return utils.get_pkg_list(self.distro, self.component_name)
def install(self):
pkgs = self.get_pkglist()
pkgs = self._get_pkglist()
if pkgs:
pkgnames = sorted(pkgs.keys())
LOG.info("Installing packages (%s)." % (", ".join(pkgnames)))

View File

@@ -93,8 +93,8 @@ class NovaInstaller(comp.PythonInstallComponent):
self.bindir = sh.joinpths(self.appdir, BIN_DIR)
self.paste_conf_fn = self._get_target_config_name(PASTE_CONF)
def get_pkglist(self):
pkgs = comp.PkgInstallComponent.get_pkglist(self)
def _get_pkglist(self):
pkgs = comp.PkgInstallComponent._get_pkglist(self)
# Walk through the subcomponents (like 'vol' and 'cpu') and add those
# those packages as well. (Let utils.get_pkglist handle any missing
# entries

View File

@@ -86,12 +86,12 @@ class QuantumInstaller(comp.PkgInstallComponent):
})
return places
def get_pkglist(self):
def _get_pkglist(self):
if self.q_vswitch_service:
listing_fn = sh.joinpths(settings.STACK_PKG_DIR, PKG_VSWITCH)
return utils.extract_pkg_list([listing_fn], self.distro)
else:
return comp.PkgInstallComponent.get_pkglist(self)
return comp.PkgInstallComponent._get_pkglist(self)
def _get_config_files(self):
parent_list = comp.PkgInstallComponent._get_config_files(self)