Drop zeromq support
Support for the ZeroMQ messaging driver has bit-rotted over the last few years across the OpenStack charms; drop support for ZMQ inline with deprecation notices issued in 17.02 charm release. Change-Id: I3a4f4bc84327ee2e269d3ebd93d102494102b05e
This commit is contained in:
parent
84fb4b906d
commit
46faae4ff8
@ -21,7 +21,6 @@ from copy import deepcopy
|
|||||||
from charmhelpers.contrib.openstack.utils import (
|
from charmhelpers.contrib.openstack.utils import (
|
||||||
config_value_changed,
|
config_value_changed,
|
||||||
git_install_requested,
|
git_install_requested,
|
||||||
os_requires_version,
|
|
||||||
pausable_restart_on_change as restart_on_change,
|
pausable_restart_on_change as restart_on_change,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -42,7 +41,6 @@ from neutron_ovs_utils import (
|
|||||||
configure_ovs,
|
configure_ovs,
|
||||||
configure_sriov,
|
configure_sriov,
|
||||||
git_install,
|
git_install,
|
||||||
get_topics,
|
|
||||||
get_shared_secret,
|
get_shared_secret,
|
||||||
register_configs,
|
register_configs,
|
||||||
restart_map,
|
restart_map,
|
||||||
@ -99,8 +97,6 @@ def config_changed():
|
|||||||
# NOTE(fnordahl): configure_sriov must be run after CONFIGS.write_all()
|
# NOTE(fnordahl): configure_sriov must be run after CONFIGS.write_all()
|
||||||
# to allow us to enable boot time execution of init script
|
# to allow us to enable boot time execution of init script
|
||||||
configure_sriov()
|
configure_sriov()
|
||||||
for rid in relation_ids('zeromq-configuration'):
|
|
||||||
zeromq_configuration_relation_joined(rid)
|
|
||||||
for rid in relation_ids('neutron-plugin'):
|
for rid in relation_ids('neutron-plugin'):
|
||||||
neutron_plugin_joined(relation_id=rid)
|
neutron_plugin_joined(relation_id=rid)
|
||||||
|
|
||||||
@ -155,20 +151,6 @@ def amqp_changed():
|
|||||||
CONFIGS.write_all()
|
CONFIGS.write_all()
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('zeromq-configuration-relation-joined')
|
|
||||||
@os_requires_version('kilo', 'neutron-common')
|
|
||||||
def zeromq_configuration_relation_joined(relid=None):
|
|
||||||
relation_set(relation_id=relid,
|
|
||||||
topics=" ".join(get_topics()),
|
|
||||||
users="neutron")
|
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('zeromq-configuration-relation-changed')
|
|
||||||
@restart_on_change(restart_map(), stopstart=True)
|
|
||||||
def zeromq_configuration_relation_changed():
|
|
||||||
CONFIGS.write_all()
|
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('neutron-control-relation-changed')
|
@hooks.hook('neutron-control-relation-changed')
|
||||||
@restart_on_change(restart_map(), stopstart=True)
|
@restart_on_change(restart_map(), stopstart=True)
|
||||||
def restart_check():
|
def restart_check():
|
||||||
|
@ -392,18 +392,6 @@ def restart_map():
|
|||||||
return {k: v['services'] for k, v in resource_map().items()}
|
return {k: v['services'] for k, v in resource_map().items()}
|
||||||
|
|
||||||
|
|
||||||
def get_topics():
|
|
||||||
topics = []
|
|
||||||
topics.append('q-agent-notifier-port-update')
|
|
||||||
topics.append('q-agent-notifier-network-delete')
|
|
||||||
topics.append('q-agent-notifier-tunnel-update')
|
|
||||||
topics.append('q-agent-notifier-security_group-update')
|
|
||||||
topics.append('q-agent-notifier-dvr-update')
|
|
||||||
if context.NeutronAPIContext()()['l2_population']:
|
|
||||||
topics.append('q-agent-notifier-l2population-update')
|
|
||||||
return topics
|
|
||||||
|
|
||||||
|
|
||||||
def services():
|
def services():
|
||||||
"""Returns a list of (unique) services associate with this charm
|
"""Returns a list of (unique) services associate with this charm
|
||||||
Note that we drop the os-charm-phy-nic-mtu service as it's not an actual
|
Note that we drop the os-charm-phy-nic-mtu service as it's not an actual
|
||||||
|
@ -1 +0,0 @@
|
|||||||
neutron_ovs_hooks.py
|
|
@ -1 +0,0 @@
|
|||||||
neutron_ovs_hooks.py
|
|
@ -30,10 +30,10 @@ provides:
|
|||||||
neutron-control:
|
neutron-control:
|
||||||
interface: service-control
|
interface: service-control
|
||||||
requires:
|
requires:
|
||||||
|
juju-info:
|
||||||
|
interface: juju-info
|
||||||
|
scope: container
|
||||||
amqp:
|
amqp:
|
||||||
interface: rabbitmq
|
interface: rabbitmq
|
||||||
neutron-plugin-api:
|
neutron-plugin-api:
|
||||||
interface: neutron-plugin-api
|
interface: neutron-plugin-api
|
||||||
zeromq-configuration:
|
|
||||||
interface: zeromq-configuration
|
|
||||||
scope: container
|
|
||||||
|
@ -119,10 +119,8 @@ class NeutronOVSHooksTests(CharmTestCase):
|
|||||||
def test_config_changed(self, git_requested):
|
def test_config_changed(self, git_requested):
|
||||||
git_requested.return_value = False
|
git_requested.return_value = False
|
||||||
self.relation_ids.return_value = ['relid']
|
self.relation_ids.return_value = ['relid']
|
||||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
|
||||||
self._call_hook('config-changed')
|
self._call_hook('config-changed')
|
||||||
self.assertTrue(self.CONFIGS.write_all.called)
|
self.assertTrue(self.CONFIGS.write_all.called)
|
||||||
self.assertTrue(_zmq_joined.called_with('relid'))
|
|
||||||
self.configure_ovs.assert_called_with()
|
self.configure_ovs.assert_called_with()
|
||||||
self.configure_sriov.assert_called_with()
|
self.configure_sriov.assert_called_with()
|
||||||
|
|
||||||
@ -131,7 +129,6 @@ class NeutronOVSHooksTests(CharmTestCase):
|
|||||||
def test_config_changed_git(self, config_val_changed, git_requested):
|
def test_config_changed_git(self, config_val_changed, git_requested):
|
||||||
git_requested.return_value = True
|
git_requested.return_value = True
|
||||||
self.relation_ids.return_value = ['relid']
|
self.relation_ids.return_value = ['relid']
|
||||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
|
||||||
openstack_origin_git = {
|
openstack_origin_git = {
|
||||||
'repositories': [
|
'repositories': [
|
||||||
{'name': 'requirements',
|
{'name': 'requirements',
|
||||||
@ -149,7 +146,6 @@ class NeutronOVSHooksTests(CharmTestCase):
|
|||||||
self._call_hook('config-changed')
|
self._call_hook('config-changed')
|
||||||
self.git_install.assert_called_with(projects_yaml)
|
self.git_install.assert_called_with(projects_yaml)
|
||||||
self.assertTrue(self.CONFIGS.write_all.called)
|
self.assertTrue(self.CONFIGS.write_all.called)
|
||||||
self.assertTrue(_zmq_joined.called_with('relid'))
|
|
||||||
self.configure_ovs.assert_called_with()
|
self.configure_ovs.assert_called_with()
|
||||||
|
|
||||||
@patch.object(hooks, 'git_install_requested')
|
@patch.object(hooks, 'git_install_requested')
|
||||||
|
Loading…
Reference in New Issue
Block a user