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

This commit is contained in:
Liam Young 2014-06-10 10:32:31 +00:00
parent c99c4029a9
commit 8db8e27956
3 changed files with 10 additions and 4 deletions

View File

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

View File

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

View File

@ -3,4 +3,10 @@
# [ WARNING ] # [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten. # 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 -%}