def _append_volume_stats(self, vol_stats):
    pools = vol_stats.get('pools', None)
    if (pools and isinstance(pools, list)):
        for pool in pools:
            pool_name = pool['pool_name']
            try:
                pool_stats = self.stats['pools'][pool_name]
            except KeyError:
                pool_stats = dict(allocated_capacity_gb=0)
            pool.update(pool_stats)
def _append_volume_stats(self, vol_stats):
    pools = vol_stats.get('pools', None)
    if (pools and isinstance(pools, list)):
        for pool in pools:
            pool_name = pool['pool_name']
            try:
                pool_stats = self.stats['pools'][pool_name]
            except KeyError:
                pool_stats = dict(allocated_capacity_gb=0)
            pool.update(pool_stats)