added amqp relation departed

This commit is contained in:
yolanda.robla@canonical.com 2014-01-30 13:01:52 +01:00
parent a93c7d00b3
commit 968f7708e5
2 changed files with 10 additions and 0 deletions

View File

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

View File

@ -71,6 +71,15 @@ def any_changed():
ceilometer_joined()
@hooks.hook("amqp-relation-departed")
@restart_on_change(restart_map())
def amqp_departed():
if 'amqp' not in CONFIGS.complete_contexts():
log('amqp relation incomplete. Peer not ready?')
return
CONFIGS.write_all()
@hooks.hook('config-changed')
@restart_on_change(restart_map())
def config_changed():