Switch to using neutron-common for package version detection
This commit is contained in:
parent
e8f981f68a
commit
9457427f4d
@ -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(
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user