Write configs and conditional restarts when joining neutron-plugin-api relation

This commit is contained in:
Liam Young 2014-06-20 14:43:53 +01:00
parent da61f646a3
commit c3ca6a8d08

View File

@ -22,7 +22,6 @@ from neutron_ovs_utils import (
determine_packages, determine_packages,
register_configs, register_configs,
restart_map, restart_map,
NEUTRON_CONF,
) )
hooks = Hooks() hooks = Hooks()
@ -37,6 +36,7 @@ def install():
@hooks.hook('upgrade-charm') @hooks.hook('upgrade-charm')
@hooks.hook('neutron-plugin-relation-changed') @hooks.hook('neutron-plugin-relation-changed')
@hooks.hook('neutron-plugin-api-relation-changed')
@hooks.hook('config-changed') @hooks.hook('config-changed')
@restart_on_change(restart_map()) @restart_on_change(restart_map())
def config_changed(): def config_changed():
@ -57,7 +57,7 @@ def amqp_changed():
if 'amqp' not in CONFIGS.complete_contexts(): if 'amqp' not in CONFIGS.complete_contexts():
log('amqp relation incomplete. Peer not ready?') log('amqp relation incomplete. Peer not ready?')
return return
CONFIGS.write(NEUTRON_CONF) CONFIGS.write_all()
def main(): def main():