comparison idavoll/pgsql_storage.py @ 173:246911bcb699

Make node type part of node configuration.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 09 Apr 2008 11:43:16 +0000
parents bc269696ef42
children fc687620599b
comparison
equal deleted inserted replaced
172:9bfb00edd0cc 173:246911bcb699
44 def get_node_ids(self): 44 def get_node_ids(self):
45 d = self._dbpool.runQuery("""SELECT node from nodes""") 45 d = self._dbpool.runQuery("""SELECT node from nodes""")
46 d.addCallback(lambda results: [r[0] for r in results]) 46 d.addCallback(lambda results: [r[0] for r in results])
47 return d 47 return d
48 48
49 def create_node(self, node_id, owner, type='leaf'): 49 def create_node(self, node_id, owner, config=None):
50 return self._dbpool.runInteraction(self._create_node, node_id, owner) 50 return self._dbpool.runInteraction(self._create_node, node_id, owner)
51 51
52 def _create_node(self, cursor, node_id, owner): 52 def _create_node(self, cursor, node_id, owner):
53 node_id = node_id 53 node_id = node_id
54 owner = owner.userhost() 54 owner = owner.userhost()