'Retrieve stats info for NexentaStor appliance.'

def _update_volume_stats(self):

    LOG.debug('Updating    volume    stats')
    url = ('storage/pools/%(pool)s/volumeGroups/%(group)s?fields=bytesAvailable,bytesUsed' % {'pool': self.storage_pool, 'group': self.volume_group})
    stats = self.nef.get(url)
    total_amount = utils.str2gib_size(stats['bytesAvailable'])
    free_amount = utils.str2gib_size((stats['bytesAvailable'] - stats['bytesUsed']))
    location_info = ('%(driver)s:%(host)s:%(pool)s/%(group)s' % {'driver': self.__class__.__name__, 'host': self.nef_host, 'pool': self.storage_pool, 'group': self.volume_group})
    self._stats = {'vendor_name': 'Nexenta', 'dedup': self.dataset_deduplication, 'compression': self.dataset_compression, 'description': self.dataset_description, 'driver_version': self.VERSION, 'storage_protocol': 'iSCSI', 'total_capacity_gb': total_amount, 'free_capacity_gb': free_amount, 'reserved_percentage': self.configuration.reserved_percentage, 'QoS_support': False, 'volume_backend_name': self.backend_name, 'location_info': location_info, 'iscsi_target_portal_port': self.iscsi_target_portal_port, 'nef_url': self.nef.url}
