def test_get_nodeinfo_list_with_cols(self):
    uuids = {}
    extras = {}
    for i in range(1, 6):
        uuid = uuidutils.generate_uuid()
        extra = {'foo': i}
        node = utils.create_test_node(extra=extra, uuid=uuid)
        uuids[node.id] = uuid
        extras[node.id] = extra
    res = self.dbapi.get_nodeinfo_list(columns=['id', 'extra', 'uuid'])
    self.assertEqual(extras, dict(((r[0], r[1]) for r in res)))
    self.assertEqual(uuids, dict(((r[0], r[2]) for r in res)))
def test_get_nodeinfo_list_with_cols(self):
    uuids = {}
    extras = {}
    for i in range(1, 6):
        uuid = uuidutils.generate_uuid()
        extra = {'foo': i}
        node = utils.create_test_node(extra=extra, uuid=uuid)
        uuids[node.id] = uuid
        extras[node.id] = extra
    res = self.dbapi.get_nodeinfo_list(columns=['id', 'extra', 'uuid'])
    self.assertEqual(extras, dict(((r[0], r[1]) for r in res)))
    self.assertEqual(uuids, dict(((r[0], r[2]) for r in res)))