added docstring and comment

This commit is contained in:
Edward Hope-Morley
2014-12-15 12:17:36 +00:00
parent 0be5c836b6
commit 745256ab86

View File

@@ -129,7 +129,12 @@ def keystone_joined(relid=None):
@hooks.hook('identity-service-notifications-relation-changed')
def identity_service_notifications_changed():
"""Receive notifications from keystone."""
notifications = relation_get()
# Some ceilometer services will create a client and request
# the service catalog from keystone on startup. So if
# endpoints change we need to restart these services.
key = '%s-endpoint-changed' % (CEILOMETER_SERVICE)
if key in notifications:
service_restart('ceilometer-alarm-evaluator')