Add support for neutron-plugin-api relation and switch to using that for security group settings
This commit is contained in:
parent
5ccb59d6e9
commit
55de68b794
1
hooks/neutron-plugin-api-relation-broken
Symbolic link
1
hooks/neutron-plugin-api-relation-broken
Symbolic link
@ -0,0 +1 @@
|
||||
neutron_ovs_hooks.py
|
1
hooks/neutron-plugin-api-relation-changed
Symbolic link
1
hooks/neutron-plugin-api-relation-changed
Symbolic link
@ -0,0 +1 @@
|
||||
neutron_ovs_hooks.py
|
1
hooks/neutron-plugin-api-relation-departed
Symbolic link
1
hooks/neutron-plugin-api-relation-departed
Symbolic link
@ -0,0 +1 @@
|
||||
neutron_ovs_hooks.py
|
1
hooks/neutron-plugin-api-relation-joined
Symbolic link
1
hooks/neutron-plugin-api-relation-joined
Symbolic link
@ -0,0 +1 @@
|
||||
neutron_ovs_hooks.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):
|
||||
|
@ -16,4 +16,5 @@ requires:
|
||||
container:
|
||||
interface: juju-info
|
||||
scope: container
|
||||
|
||||
neutron-plugin-api:
|
||||
interface: neutron-plugin-api
|
||||
|
Loading…
Reference in New Issue
Block a user