Use os_release() to determine OpenStack release
Use os_release() instead of get_os_codename_install_source() to determine the OpenStack release in resolve_services(). This is needed when deploying from source because it checks both openstack-origin and openstack-origin-git when determining the release. Change-Id: I39a61fc4394967bd70af493f6a69fe9d428274b1
This commit is contained in:
parent
195853220d
commit
a946731d24
@ -205,7 +205,7 @@ APACHE_24_CONF = '/etc/apache2/sites-available/openstack_https_frontend.conf'
|
||||
|
||||
def resolve_services():
|
||||
_services = deepcopy(BASE_SERVICES)
|
||||
os_rel = get_os_codename_install_source(config('openstack-origin'))
|
||||
os_rel = os_release('nova-common')
|
||||
for release in SERVICE_BLACKLIST:
|
||||
if os_rel >= release:
|
||||
[_services.remove(service)
|
||||
|
@ -15,6 +15,7 @@
|
||||
import mock
|
||||
|
||||
with mock.patch('charmhelpers.core.hookenv.config') as config:
|
||||
with mock.patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'): # noqa
|
||||
config.return_value = 'nova'
|
||||
import nova_cc_utils as utils # noqa
|
||||
|
||||
|
@ -24,6 +24,7 @@ sys.modules['apt_pkg'] = MagicMock()
|
||||
with patch('charmhelpers.contrib.hardening.harden.harden') as mock_dec:
|
||||
mock_dec.side_effect = (lambda *dargs, **dkwargs: lambda f:
|
||||
lambda *args, **kwargs: f(*args, **kwargs))
|
||||
with patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'):
|
||||
with patch('nova_cc_utils.restart_map'):
|
||||
with patch('nova_cc_utils.register_configs'):
|
||||
with patch('nova_cc_utils.guard_map') as gmap:
|
||||
|
@ -18,6 +18,7 @@ from mock import patch, MagicMock
|
||||
|
||||
os.environ['JUJU_UNIT_NAME'] = 'nova-cloud-controller'
|
||||
with patch('charmhelpers.core.hookenv.config') as config:
|
||||
with patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'):
|
||||
config.return_value = 'nova'
|
||||
import nova_cc_utils as utils # noqa
|
||||
|
||||
|
@ -18,6 +18,7 @@ import mock
|
||||
|
||||
import nova_cc_context as context
|
||||
with mock.patch('charmhelpers.core.hookenv.config'):
|
||||
with mock.patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'): # noqa
|
||||
import nova_cc_utils as _utils # noqa
|
||||
|
||||
from charmhelpers.contrib.openstack import neutron
|
||||
|
@ -21,6 +21,7 @@ from mock import MagicMock, patch, call
|
||||
from test_utils import CharmTestCase
|
||||
|
||||
with patch('charmhelpers.core.hookenv.config') as config:
|
||||
with patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'):
|
||||
config.return_value = 'neutron'
|
||||
import nova_cc_utils as utils
|
||||
|
||||
|
@ -16,6 +16,7 @@ from collections import OrderedDict
|
||||
from mock import patch, MagicMock, call
|
||||
|
||||
with patch('charmhelpers.core.hookenv.config'):
|
||||
with patch('charmhelpers.contrib.openstack.utils.get_os_codename_package'): # noqa
|
||||
import nova_cc_utils as utils
|
||||
|
||||
from test_utils import CharmTestCase, patch_open
|
||||
|
Loading…
Reference in New Issue
Block a user