787
791
'use_syslog': config('use-syslog')
796
class ZeroMQContext(OSContextGenerator):
797
interfaces = ['zeromq-configuration']
801
if is_relation_made('zeromq-configuration', 'host'):
802
for rid in relation_ids('zeromq-configuration'):
803
for unit in related_units(rid):
804
ctxt['zmq_nonce'] = relation_get('nonce', unit, rid)
805
ctxt['zmq_host'] = relation_get('host', unit, rid)
808
class NotificationDriverContext(OSContextGenerator):
810
def __init__(self, zmq_relation='zeromq-configuration', amqp_relation='amqp'):
812
:param zmq_relation : Name of Zeromq relation to check
814
self.zmq_relation = zmq_relation
815
self.amqp_relation = amqp_relation
819
'notifications': "False",
821
if is_relation_made(self.zmq_relation):
822
matchmaker_data = get_matchmaker_map()
823
if 'notifications-info' in matchmaker_data:
824
ctxt['notifications'] = "True"
825
elif is_relation_made(self.amqp_relation):
826
ctxt['notifications'] = "True"