def upgrade_charm(): rel = openstack.get_os_codename_install_source(config('openstack-origin')) pkgs = determine_packages(rel) new_packages = filter_installed_packages(pkgs) if new_packages: apt_install(new_packages) update_rsync_acls()
def test_determine_packages(self): self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'python-keystone'], swift_utils.determine_packages('essex') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'python-keystone', 'swift-plugin-s3', 'swauth'], swift_utils.determine_packages('folsom') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'swift-plugin-s3', 'swauth', 'python-ceilometermiddleware', 'python-keystonemiddleware'], swift_utils.determine_packages('mitaka') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'swauth', 'python-ceilometermiddleware', 'python-keystonemiddleware'], swift_utils.determine_packages('rocky') )
def test_determine_packages(self): self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'python-keystone'], swift_utils.determine_packages('essex') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'python-keystone', 'swift-plugin-s3', 'swauth'], swift_utils.determine_packages('folsom') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'swift-plugin-s3', 'swauth', 'python-ceilometermiddleware', 'python-keystonemiddleware'], swift_utils.determine_packages('mitaka') ) self.assertEqual( ['swift', 'swift-proxy', 'memcached', 'apache2', 'swauth', 'python-ceilometermiddleware', 'python-keystonemiddleware'], swift_utils.determine_packages('rocky') )
def upgrade_charm(): rel = openstack.get_os_codename_install_source(config('openstack-origin')) pkgs = determine_packages(rel) new_packages = filter_installed_packages(pkgs) if new_packages: apt_install(new_packages) update_rsync_acls() # call the policy overrides handler which will install any policy overrides policyd.maybe_do_policyd_overrides(openstack.os_release('swift-proxy'), 'swift')
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if src != 'distro': openstack.configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) rel = openstack.get_os_codename_install_source(src) pkgs = determine_packages(rel) apt_install(pkgs, fatal=True) apt_install(extra_pkgs, fatal=True) ensure_swift_dir() # configure a directory on webserver for distributing rings. ensure_www_dir_permissions(get_www_dir())
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if src != 'distro': openstack.configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) rel = openstack.get_os_codename_install_source(src) pkgs = determine_packages(rel) apt_install(pkgs, fatal=True) apt_install(extra_pkgs, fatal=True) ensure_swift_dir() # configure a directory on webserver for distributing rings. ensure_www_dir_permissions(get_www_dir())
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if src != 'distro': openstack.configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) rel = openstack.get_os_codename_install_source(src) pkgs = determine_packages(rel) apt_install(pkgs, fatal=True) apt_install(extra_pkgs, fatal=True) ensure_swift_dir() # configure a directory on webserver for distributing rings. ensure_www_dir_permissions(get_www_dir()) # call the policy overrides handler which will install any policy overrides policyd.maybe_do_policyd_overrides(openstack.os_release('swift-proxy'), 'swift')