'Get volume stats from zfssa'

def _update_volume_stats(self):

    self._ensure_shares_mounted()
    data = {}
    lcfg = self.configuration
    backend_name = self.configuration.safe_get('volume_backend_name')
    data['volume_backend_name'] = (backend_name or self.__class__.__name__)
    data['vendor_name'] = 'Oracle'
    data['driver_version'] = self.VERSION
    data['storage_protocol'] = self.protocol
    asn = self.zfssa.get_asn()
    data['location_info'] = ('%s:%s' % (asn, lcfg.zfssa_nfs_share))
    (free, used) = self._get_share_capacity_info()
    capacity = (float(free) + float(used))
    ratio_used = (used / capacity)
    data['QoS_support'] = False
    data['reserved_percentage'] = 0
    used_percentage_limit = (100 - self.configuration.reserved_percentage)
    used_ratio_limit = (used_percentage_limit / 100.0)
    if ((ratio_used > used_ratio_limit) or (ratio_used >= self.configuration.max_over_subscription_ratio)):
        data['reserved_percentage'] = 100
    data['total_capacity_gb'] = (float(capacity) / units.Gi)
    data['free_capacity_gb'] = (float(free) / units.Gi)
    share_details = self.zfssa.get_share(lcfg.zfssa_nfs_pool, lcfg.zfssa_nfs_project, lcfg.zfssa_nfs_share)
    pool_details = self.zfssa.get_pool_details(lcfg.zfssa_nfs_pool)
    data['zfssa_compression'] = share_details['compression']
    data['zfssa_encryption'] = share_details['encryption']
    data['zfssa_logbias'] = share_details['logbias']
    data['zfssa_poolprofile'] = pool_details['profile']
    data['zfssa_sparse'] = six.text_type(lcfg.nfs_sparsed_volumes)
    self._stats = data
