'Retrieve stats info from volume group.'

def _update_volume_stats(self):

    dict_of_devices_sizes = self._devices_sizes()
    used_devices = self._get_used_devices()
    total_size = 0
    free_size = 0
    for (device, size) in dict_of_devices_sizes.items():
        if (device not in used_devices):
            free_size += size
        total_size += size
    LOG.debug('Updating    volume    stats.')
    data = {'volume_backend_name': self.backend_name, 'vendor_name': 'Open    Source', 'driver_version': self.VERSION, 'storage_protocol': 'unknown', 'pools': []}
    single_pool = {'pool_name': data['volume_backend_name'], 'total_capacity_gb': (total_size / units.Ki), 'free_capacity_gb': (free_size / units.Ki), 'reserved_percentage': self.configuration.reserved_percentage, 'QoS_support': False}
    data['pools'].append(single_pool)
    self._stats = data
