Switch to using neutron-common for package version detection

This commit is contained in:
James Page 2015-09-03 10:16:17 +01:00
parent e8f981f68a
commit 9457427f4d
3 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ CONFIGS = register_configs()
def conditional_neutron_migration():
if os_release('neutron-server') < 'kilo':
if os_release('neutron-common') < 'kilo':
log('Not running neutron database migration as migrations are handled '
'by the neutron-server process or nova-cloud-controller charm.')
return
@ -180,7 +180,7 @@ def config_changed():
if config_value_changed('openstack-origin-git'):
git_install(config('openstack-origin-git'))
else:
if openstack_upgrade_available('neutron-server'):
if openstack_upgrade_available('neutron-common'):
do_openstack_upgrade(CONFIGS)
apt_install(filter_installed_packages(

View File

@ -245,7 +245,7 @@ def resource_map():
def register_configs(release=None):
release = release or os_release('neutron-server')
release = release or os_release('neutron-common')
configs = templating.OSConfigRenderer(templates_dir=TEMPLATES,
openstack_release=release)
for cfg, rscs in resource_map().iteritems():
@ -283,7 +283,7 @@ def do_openstack_upgrade(configs):
:param configs: The charms main OSConfigRenderer object.
"""
cur_os_rel = os_release('neutron-server')
cur_os_rel = os_release('neutron-common')
new_src = config('openstack-origin')
new_os_rel = get_os_codename_install_source(new_src)

View File

@ -227,7 +227,7 @@ class TestNeutronAPIUtils(CharmTestCase):
self.get_os_codename_install_source.return_value = 'juno'
configs = MagicMock()
nutils.do_openstack_upgrade(configs)
self.os_release.assert_called_with('neutron-server')
self.os_release.assert_called_with('neutron-common')
self.log.assert_called()
self.configure_installation_source.assert_called_with(
'cloud:trusty-juno'
@ -266,7 +266,7 @@ class TestNeutronAPIUtils(CharmTestCase):
self.get_os_codename_install_source.return_value = 'kilo'
configs = MagicMock()
nutils.do_openstack_upgrade(configs)
self.os_release.assert_called_with('neutron-server')
self.os_release.assert_called_with('neutron-common')
self.log.assert_called()
self.configure_installation_source.assert_called_with(
'cloud:trusty-kilo'
@ -306,7 +306,7 @@ class TestNeutronAPIUtils(CharmTestCase):
self.get_os_codename_install_source.return_value = 'kilo'
configs = MagicMock()
nutils.do_openstack_upgrade(configs)
self.os_release.assert_called_with('neutron-server')
self.os_release.assert_called_with('neutron-common')
self.log.assert_called()
self.configure_installation_source.assert_called_with(
'cloud:trusty-kilo'