'Get free capacity and total capacity of the pool.'

def _get_capacity(self, pool_name, result):

    pool_info = self.get_pool_info(pool_name, result)
    pool_capacity = {'total_capacity': 0.0, 'free_capacity': 0.0}
    if pool_info:
        total = (float(pool_info['TOTALCAPACITY']) / constants.CAPACITY_UNIT)
        free = (float(pool_info['CAPACITY']) / constants.CAPACITY_UNIT)
        pool_capacity['total_capacity'] = total
        pool_capacity['free_capacity'] = free
    return pool_capacity
