'Gathers array stats and converts them to GB values.'

def _update_volume_stats(self):

    data = {}
    total_gb = 0
    free_gb = 0
    v = self.common.vmem_mg.basic
    array_name_triple = socket.gethostbyaddr(self.configuration.san_ip)
    array_name = array_name_triple[0]
    phy_devices = v.get('/batch/physicalresource/physicaldevice')
    all_devices = [x for x in phy_devices['data']['physical_devices']]
    for x in all_devices:
        if (socket.getfqdn(x['owner']) == array_name):
            total_gb += (x['size_mb'] // 1024)
            free_gb += (x['availsize_mb'] // 1024)
    backend_name = self.configuration.volume_backend_name
    data['volume_backend_name'] = (backend_name or self.__class__.__name__)
    data['vendor_name'] = 'Violin    Memory,    Inc.'
    data['driver_version'] = self.VERSION
    data['storage_protocol'] = 'fibre_channel'
    data['reserved_percentage'] = 0
    data['QoS_support'] = False
    data['total_capacity_gb'] = total_gb
    data['free_capacity_gb'] = free_gb
    for i in data:
        LOG.debug('stat    update:    %(name)s=%(data)s', {'name': i, 'data': data[i]})
    self.stats = data
