Add support for neutron-plugin-api relation and switch to using that for security group settings

This commit is contained in:
Liam Young 2014-06-17 16:14:17 +01:00
parent 5ccb59d6e9
commit 55de68b794
6 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1 @@
neutron_ovs_hooks.py

View File

@ -0,0 +1 @@
neutron_ovs_hooks.py

View File

@ -0,0 +1 @@
neutron_ovs_hooks.py

View File

@ -0,0 +1 @@
neutron_ovs_hooks.py

View File

@ -17,9 +17,11 @@ def _neutron_security_groups():
Inspects current neutron-plugin relation and determine if nova-c-c has Inspects current neutron-plugin relation and determine if nova-c-c has
instructed us to use neutron security groups. 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): 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 return False
class OVSPluginContext(context.NeutronContext): class OVSPluginContext(context.NeutronContext):

View File

@ -16,4 +16,5 @@ requires:
container: container:
interface: juju-info interface: juju-info
scope: container scope: container
neutron-plugin-api:
interface: neutron-plugin-api