diff --git a/hooks/neutron-plugin-api-relation-broken b/hooks/neutron-plugin-api-relation-broken new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/neutron-plugin-api-relation-broken @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-api-relation-changed b/hooks/neutron-plugin-api-relation-changed new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/neutron-plugin-api-relation-changed @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-api-relation-departed b/hooks/neutron-plugin-api-relation-departed new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/neutron-plugin-api-relation-departed @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-api-relation-joined b/hooks/neutron-plugin-api-relation-joined new file mode 120000 index 00000000..55aa8e52 --- /dev/null +++ b/hooks/neutron-plugin-api-relation-joined @@ -0,0 +1 @@ +neutron_ovs_hooks.py \ No newline at end of file diff --git a/hooks/neutron_ovs_context.py b/hooks/neutron_ovs_context.py index ebd6c227..c3d4b6bc 100644 --- a/hooks/neutron_ovs_context.py +++ b/hooks/neutron_ovs_context.py @@ -17,9 +17,11 @@ def _neutron_security_groups(): Inspects current neutron-plugin relation and determine if nova-c-c has instructed us to use neutron security groups. ''' - for rid in relation_ids('neutron-plugin'): + for rid in relation_ids('neutron-plugin-api'): for unit in related_units(rid): - return relation_get('neutron_security_groups',rid=rid, unit=unit) + sec_group=relation_get('neutron_security_groups',rid=rid, unit=unit) + if sec_group is not None: + return sec_group return False class OVSPluginContext(context.NeutronContext): diff --git a/metadata.yaml b/metadata.yaml index 69a365b2..7a5f2d26 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -16,4 +16,5 @@ requires: container: interface: juju-info scope: container - + neutron-plugin-api: + interface: neutron-plugin-api