'Fill in free capacity info for pool.'

def _fill_in_available_capacity(self, node, pool):

    available = node.find('available')
    if (available is None):
        pool['free_capacity_gb'] = 0
        return pool
    pool['free_capacity_gb'] = int(available.get('total'))
    byred = available.find('byredundancy')
    if (byred is None):
        return pool
    raid = byred.find('raid-0')
    if (raid is not None):
        pool['free_capacity_gb_raid_0'] = int(raid.text)
    raid = byred.find('raid-1')
    if (raid is not None):
        pool['free_capacity_gb_raid_1'] = int(raid.text)
    raid = byred.find('raid-5')
    if (raid is not None):
        pool['free_capacity_gb_raid_5'] = int(raid.text)
    raid = byred.find('raid-6')
    if (raid is not None):
        pool['free_capacity_gb_raid_6'] = int(raid.text)
    return pool
