def test_determine_packages_rocky(self): horizon_utils.os_release.return_value = 'rocky' self.assertEqual( sorted(horizon_utils.determine_packages()), sorted([ p for p in horizon_utils.BASE_PACKAGES if not p.startswith('python-') ] + horizon_utils.PY3_PACKAGES))
def test_determine_packages_queens(self): horizon_utils.os_release.return_value = 'queens' self.assertEqual( sorted(horizon_utils.determine_packages()), sorted(horizon_utils.BASE_PACKAGES + [ 'python-pymysql', 'python-neutron-lbaas-dashboard', 'python-designate-dashboard', 'python-heat-dashboard', 'python-neutron-fwaas-dashboard' ]))
def test_determine_packages(self): horizon_utils.os_release.return_value = 'icehouse' self.assertEqual( sorted(horizon_utils.determine_packages()), sorted([ 'haproxy', 'python-novaclient', 'python-keystoneclient', 'openstack-dashboard-ubuntu-theme', 'python-memcache', 'openstack-dashboard', 'memcached' ]))
def test_determine_packages_with_dashboard_plugin_rocky(self): 'Ensure that plugin packages are part of determine_packages()' horizon_utils.os_release.return_value = 'rocky' pkgs = ([ p for p in horizon_utils.BASE_PACKAGES if not p.startswith('python-') ] + horizon_utils.PY3_PACKAGES + ['p1', 'p2', 'p3', 'p4', 'p5', 'p6']) self._patch_for_dashboard_plugin_packages() self.assertEqual(sorted(horizon_utils.determine_packages()), sorted(pkgs))
def upgrade_charm(): execd_preinstall() apt_install(filter_installed_packages(determine_packages()), fatal=True) packages_removed = remove_old_packages() update_nrpe_config() CONFIGS.write_all() if packages_removed: log("Package purge detected, restarting services", "INFO") for s in services(): service_restart(s) check_custom_theme()
def install(): execd_preinstall() configure_installation_source(config('openstack-origin')) apt_update(fatal=True) packages = determine_packages() _os_release = os_release('openstack-dashboard') if CompareOpenStackReleases(_os_release) < 'icehouse': packages += ['nodejs', 'node-less'] if lsb_release()['DISTRIB_CODENAME'] == 'precise': # Explicitly upgrade python-six Bug#1420708 apt_install('python-six', fatal=True) packages = filter_installed_packages(packages) if packages: status_set('maintenance', 'Installing packages') apt_install(packages, fatal=True)
def test_determine_packages_mitaka(self): horizon_utils.os_release.return_value = 'mitaka' self.assertTrue('python-pymysql' in horizon_utils.determine_packages())