Browse Source

Write all configs (need to include neutron-server) and pickup subordinate settings in neutron-server template

changes/98/286798/1
Liam Young 8 years ago
parent
commit
8db8e27956
  1. 4
      hooks/neutron_api_hooks.py
  2. 2
      hooks/neutron_api_utils.py
  3. 8
      templates/icehouse/neutron-server

4
hooks/neutron_api_hooks.py

@ -232,7 +232,7 @@ def neutron_api_relation_joined(rid=None):
@hooks.hook('neutron-api-relation-changed')
@restart_on_change(restart_map())
def neutron_api_relation_changed():
CONFIGS.write(NEUTRON_CONF)
CONFIGS.write_all()
@hooks.hook('neutron-plugin-relation-joined')
def neutron_plugin_relation_joined(rid=None, remote_restart=False):
@ -245,7 +245,7 @@ def neutron_plugin_relation_joined(rid=None, remote_restart=False):
@restart_on_change(restart_map())
@hooks.hook('neutron-plugin-relation-changed')
def neutron_plugin_relation_changed():
CONFIGS.write(NEUTRON_CONF)
CONFIGS.write_all()
def main():
try:

2
hooks/neutron_api_utils.py

@ -68,7 +68,7 @@ BASE_RESOURCE_MAP = OrderedDict([
'contexts': [context.SubordinateConfigContext(
interface='neutron-plugin',
service='neutron',
config_file=NEUTRON_CONF)],
config_file=NEUTRON_DEFAULT)],
}),
])
def api_port(service):

8
templates/icehouse/neutron-server

@ -3,4 +3,10 @@
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
NEUTRON_PLUGIN_CONFIG="{{ plugin_conf_file }}"
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = "{{ value }}"
{% endfor -%}
{% else -%}
NEUTRON_PLUGIN_CONFIG=""
{% endif -%}

Loading…
Cancel
Save