'Fill in used capacity info for pool.'

def _fill_in_used_capacity(self, node, pool):

    used = node.find('used')
    if (used is None):
        pool['allocated_capacity_gb'] = 0
        return pool
    pool['allocated_capacity_gb'] = int(used.get('total'))
    byred = used.find('byredundancy')
    if (byred is None):
        return pool
    raid = byred.find('raid-0')
    if (raid is not None):
        pool['allocated_capacity_gb_raid_0'] = int(raid.text)
    raid = byred.find('raid-1')
    if (raid is not None):
        pool['allocated_capacity_gb_raid_1'] = int(raid.text)
    raid = byred.find('raid-5')
    if (raid is not None):
        pool['allocated_capacity_gb_raid_5'] = int(raid.text)
    raid = byred.find('raid-6')
    if (raid is not None):
        pool['allocated_capacity_gb_raid_6'] = int(raid.text)
    return pool
