diff --git a/hooks/neutron_api_hooks.py b/hooks/neutron_api_hooks.py index b79571e1..d5ccc561 100755 --- a/hooks/neutron_api_hooks.py +++ b/hooks/neutron_api_hooks.py @@ -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( diff --git a/hooks/neutron_api_utils.py b/hooks/neutron_api_utils.py index a7bda492..b741c24d 100644 --- a/hooks/neutron_api_utils.py +++ b/hooks/neutron_api_utils.py @@ -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) diff --git a/unit_tests/test_neutron_api_utils.py b/unit_tests/test_neutron_api_utils.py index d6160d22..11df6946 100644 --- a/unit_tests/test_neutron_api_utils.py +++ b/unit_tests/test_neutron_api_utils.py @@ -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'