'Retrieve pool (Data ONTAP flexvol) stats.
Pool statistics are assembled from static driver capabilities, the
Storage Service Catalog of flexvol attributes, and real-time capacity
and controller utilization metrics.  The pool name is the NFS share
path.'

def _get_pool_stats(self, filter_function=None, goodness_function=None):

    pools = []
    ssc = self.ssc_library.get_ssc()
    if (not ssc):
        return pools
    self.perf_library.update_performance_cache(ssc)
    aggregates = self.ssc_library.get_ssc_aggregates()
    aggr_capacities = self.zapi_client.get_aggregate_capacities(aggregates)
    for (ssc_vol_name, ssc_vol_info) in ssc.items():
        pool = dict()
        pool.update(ssc_vol_info)
        pool['QoS_support'] = True
        pool['consistencygroup_support'] = True
        pool['consistent_group_snapshot_enabled'] = True
        pool['multiattach'] = False
        nfs_share = ssc_vol_info['pool_name']
        capacity = self._get_share_capacity_info(nfs_share)
        pool.update(capacity)
        dedupe_used = self.zapi_client.get_flexvol_dedupe_used_percent(ssc_vol_name)
        pool['netapp_dedupe_used_percent'] = na_utils.round_down(dedupe_used)
        aggregate_name = ssc_vol_info.get('netapp_aggregate')
        aggr_capacity = aggr_capacities.get(aggregate_name, {})
        pool['netapp_aggregate_used_percent'] = aggr_capacity.get('percent-used', 0)
        utilization = self.perf_library.get_node_utilization_for_pool(ssc_vol_name)
        pool['utilization'] = na_utils.round_down(utilization)
        pool['filter_function'] = filter_function
        pool['goodness_function'] = goodness_function
        pool.update(self.get_replication_backend_stats(self.configuration))
        pools.append(pool)
    return pools
