diff --git a/hooks/neutron_ovs_context.py b/hooks/neutron_ovs_context.py index 9f8c1407..d8b373a1 100644 --- a/hooks/neutron_ovs_context.py +++ b/hooks/neutron_ovs_context.py @@ -20,7 +20,7 @@ def _neutron_security_groups(): ''' for rid in relation_ids('neutron-plugin-api'): for unit in related_units(rid): - sec_group = relation_get('neutron_security_groups', + sec_group = relation_get('neutron-security-groups', rid=rid, unit=unit) if sec_group is not None: @@ -62,7 +62,7 @@ class OVSPluginContext(context.NeutronContext): ovs_ctxt['local_ip'] = get_host_ip(unit_get('private-address')) ovs_ctxt['neutron_security_groups'] = self.neutron_security_groups # TODO: We need to sort out the syslog and debug/verbose options as a - # general context helper + # general context helper ovs_ctxt['use_syslog'] = conf['use-syslog'] ovs_ctxt['verbose'] = conf['verbose'] ovs_ctxt['debug'] = conf['debug'] diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index 4e23d015..e21637d2 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -29,7 +29,12 @@ TEMPLATES = 'templates/' def determine_packages(): - return set(neutron_plugin_attribute('ovs', 'packages', 'neutron')) + ovs_pkgs = [] + pkgs = neutron_plugin_attribute('ovs', 'packages', + 'neutron') + for pkg in pkgs: + ovs_pkgs.extend(pkg) + return set(ovs_pkgs) def register_configs(release=None): diff --git a/hooks/start b/hooks/start new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/start @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/stop b/hooks/stop new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/stop @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/unit_tests/test_neutron_ovs_context.py b/unit_tests/test_neutron_ovs_context.py index b0c6ca25..2c46b3cf 100644 --- a/unit_tests/test_neutron_ovs_context.py +++ b/unit_tests/test_neutron_ovs_context.py @@ -53,7 +53,7 @@ class OVSPluginContextTest(CharmTestCase): _is_clus.return_value = False self.related_units.return_value = ['unit1'] self.relation_ids.return_value = ['rid2'] - self.test_relation.set({'neutron_security_groups': 'yes'}) + self.test_relation.set({'neutron-security-groups': 'yes'}) self.get_host_ip.return_value = '127.0.0.15' self.service_running.return_value = False napi_ctxt = context.OVSPluginContext()