Revision ae6199c5 snf-pithos-backend/pithos/backends/lib/sqlite/node.py

b/snf-pithos-backend/pithos/backends/lib/sqlite/node.py
385 385
        return True
386 386

  
387 387
    def node_accounts(self, accounts=()):
388
        q = ("select path, node from nodes where node != 0 and parent == 0 ")
388
        q = ("select path, node from nodes where node != 0 and parent = 0 ")
389 389
        args = []
390 390
        if accounts:
391 391
            placeholders = ','.join('?' for a in accounts)
......
393 393
            args += accounts
394 394
        return self.execute(q, args).fetchall()
395 395

  
396
    def node_account_quotas(self):
397
        q = ("select n.path, p.value from nodes n, policy p "
398
             "where n.node != 0 and n.parent = 0 "
399
             "and n.node = p.node and p.key = 'quota'"
400
        )
401
        return dict(self.execute(q).fetchall())
402

  
396 403
    def node_account_usage(self, account_node, cluster):
397 404
        select_children = ("select node from nodes where parent = ?")
398 405
        select_descedents = ("select node from nodes "

Also available in: Unified diff