'Updates data for pools and volume stats based on provided data.'

def _update_pools_and_stats(self, data):

    if self.pools:
        for pool in self.pools:
            new_pool = {}
            new_pool.update(dict(pool_name=pool, total_capacity_gb=0, free_capacity_gb=0, provisioned_capacity_gb=None, reserved_percentage=100, QoS_support=False, filter_function=self.get_filter_function(), goodness_function=self.get_goodness_function()))
            data['pools'].append(new_pool)
    else:
        single_pool = {}
        single_pool.update(dict(pool_name=data['volume_backend_name'], total_capacity_gb=0, free_capacity_gb=0, provisioned_capacity_gb=None, reserved_percentage=100, QoS_support=False, filter_function=self.get_filter_function(), goodness_function=self.get_goodness_function()))
        data['pools'].append(single_pool)
    self._stats = data
