comparison idavoll/memory_backend.py @ 94:bbebadd71d35

Remove hardcoded nodes.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 17 Nov 2004 21:08:29 +0000
parents 0e642e5b4fb2
children e7349d94d0c3
comparison
equal deleted inserted replaced
93:ea3b2410c01c 94:bbebadd71d35
21 self.items = {} 21 self.items = {}
22 22
23 class Storage: 23 class Storage:
24 def __init__(self): 24 def __init__(self):
25 self.nodes = {} 25 self.nodes = {}
26
27 node = Node("ralphm/mood/ralphm@ik.nu")
28 node.subscriptions["ralphm@doe.ik.nu"] = Subscription("subscribed")
29 node.subscriptions["notify@ik.nu/mood_monitor"] = Subscription("subscribed")
30 node.affiliations["ralphm@ik.nu"] = "owner"
31 node.affiliations["ralphm@doe.ik.nu"] = "publisher"
32 node.configuration.persist_items = True
33 node.configuration.deliver_payloads = True
34 self.nodes[node.id] = node
35 26
36 def get_node_configuration(self, node_id): 27 def get_node_configuration(self, node_id):
37 try: 28 try:
38 node = self.nodes[node_id] 29 node = self.nodes[node_id]
39 except KeyError: 30 except KeyError: