diff --git a/hooks/neutron_ovs_hooks.py b/hooks/neutron_ovs_hooks.py index f1647461..caa05a7c 100755 --- a/hooks/neutron_ovs_hooks.py +++ b/hooks/neutron_ovs_hooks.py @@ -21,7 +21,6 @@ from copy import deepcopy from charmhelpers.contrib.openstack.utils import ( config_value_changed, git_install_requested, - os_requires_version, pausable_restart_on_change as restart_on_change, ) @@ -42,7 +41,6 @@ from neutron_ovs_utils import ( configure_ovs, configure_sriov, git_install, - get_topics, get_shared_secret, register_configs, restart_map, @@ -99,8 +97,6 @@ def config_changed(): # NOTE(fnordahl): configure_sriov must be run after CONFIGS.write_all() # to allow us to enable boot time execution of init script configure_sriov() - for rid in relation_ids('zeromq-configuration'): - zeromq_configuration_relation_joined(rid) for rid in relation_ids('neutron-plugin'): neutron_plugin_joined(relation_id=rid) @@ -155,20 +151,6 @@ def amqp_changed(): 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') @restart_on_change(restart_map(), stopstart=True) def restart_check(): diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index b7ddd8ea..050c5131 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -392,18 +392,6 @@ def restart_map(): 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(): """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 diff --git a/hooks/zeromq-configuration-relation-changed b/hooks/zeromq-configuration-relation-changed deleted file mode 120000 index 55aa8e52..00000000 --- a/hooks/zeromq-configuration-relation-changed +++ /dev/null @@ -1 +0,0 @@ -neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/zeromq-configuration-relation-joined b/hooks/zeromq-configuration-relation-joined deleted file mode 120000 index 55aa8e52..00000000 --- a/hooks/zeromq-configuration-relation-joined +++ /dev/null @@ -1 +0,0 @@ -neutron_ovs_hooks.py \ No newline at end of file diff --git a/metadata.yaml b/metadata.yaml index 4efbffdf..c1413c97 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -30,10 +30,10 @@ provides: neutron-control: interface: service-control requires: + juju-info: + interface: juju-info + scope: container amqp: interface: rabbitmq neutron-plugin-api: interface: neutron-plugin-api - zeromq-configuration: - interface: zeromq-configuration - scope: container diff --git a/unit_tests/test_neutron_ovs_hooks.py b/unit_tests/test_neutron_ovs_hooks.py index c8e75858..89c21061 100644 --- a/unit_tests/test_neutron_ovs_hooks.py +++ b/unit_tests/test_neutron_ovs_hooks.py @@ -119,10 +119,8 @@ class NeutronOVSHooksTests(CharmTestCase): def test_config_changed(self, git_requested): git_requested.return_value = False self.relation_ids.return_value = ['relid'] - _zmq_joined = self.patch('zeromq_configuration_relation_joined') self._call_hook('config-changed') self.assertTrue(self.CONFIGS.write_all.called) - self.assertTrue(_zmq_joined.called_with('relid')) self.configure_ovs.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): git_requested.return_value = True self.relation_ids.return_value = ['relid'] - _zmq_joined = self.patch('zeromq_configuration_relation_joined') openstack_origin_git = { 'repositories': [ {'name': 'requirements', @@ -149,7 +146,6 @@ class NeutronOVSHooksTests(CharmTestCase): self._call_hook('config-changed') self.git_install.assert_called_with(projects_yaml) self.assertTrue(self.CONFIGS.write_all.called) - self.assertTrue(_zmq_joined.called_with('relid')) self.configure_ovs.assert_called_with() @patch.object(hooks, 'git_install_requested')