Tidy up and fix bug causing sec group settings to not be updated by api service
This commit is contained in:
parent
b5b11f8c87
commit
d3fc9a8516
@ -20,7 +20,7 @@ def _neutron_security_groups():
|
|||||||
'''
|
'''
|
||||||
for rid in relation_ids('neutron-plugin-api'):
|
for rid in relation_ids('neutron-plugin-api'):
|
||||||
for unit in related_units(rid):
|
for unit in related_units(rid):
|
||||||
sec_group = relation_get('neutron_security_groups',
|
sec_group = relation_get('neutron-security-groups',
|
||||||
rid=rid,
|
rid=rid,
|
||||||
unit=unit)
|
unit=unit)
|
||||||
if sec_group is not None:
|
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['local_ip'] = get_host_ip(unit_get('private-address'))
|
||||||
ovs_ctxt['neutron_security_groups'] = self.neutron_security_groups
|
ovs_ctxt['neutron_security_groups'] = self.neutron_security_groups
|
||||||
# TODO: We need to sort out the syslog and debug/verbose options as a
|
# 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['use_syslog'] = conf['use-syslog']
|
||||||
ovs_ctxt['verbose'] = conf['verbose']
|
ovs_ctxt['verbose'] = conf['verbose']
|
||||||
ovs_ctxt['debug'] = conf['debug']
|
ovs_ctxt['debug'] = conf['debug']
|
||||||
|
@ -29,7 +29,12 @@ TEMPLATES = 'templates/'
|
|||||||
|
|
||||||
|
|
||||||
def determine_packages():
|
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):
|
def register_configs(release=None):
|
||||||
|
1
hooks/start
Symbolic link
1
hooks/start
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
neutron_ovs_hooks.py
|
1
hooks/stop
Symbolic link
1
hooks/stop
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
neutron_ovs_hooks.py
|
@ -53,7 +53,7 @@ class OVSPluginContextTest(CharmTestCase):
|
|||||||
_is_clus.return_value = False
|
_is_clus.return_value = False
|
||||||
self.related_units.return_value = ['unit1']
|
self.related_units.return_value = ['unit1']
|
||||||
self.relation_ids.return_value = ['rid2']
|
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.get_host_ip.return_value = '127.0.0.15'
|
||||||
self.service_running.return_value = False
|
self.service_running.return_value = False
|
||||||
napi_ctxt = context.OVSPluginContext()
|
napi_ctxt = context.OVSPluginContext()
|
||||||
|
Loading…
Reference in New Issue
Block a user