'Return size of an existing VMAX volume to manage_existing.
:param self: reference to class
:param volume: the volume object including the volume_type_id
:param external_ref: reference to the existing volume
:returns: size of the volume in GB'

def manage_existing_get_size(self, volume, external_ref):

    LOG.debug('Volume    in    manage_existing_get_size:    %(volume)s.', {'volume': volume})
    (array, device_id) = self.utils.get_array_and_device_id(volume, external_ref)
    volume_details = self.rest.get_volume(array, device_id)
    if (not volume_details):
        msg = (_('Unable    to    retrieve    volume    details    from    array    for    device    %(device_id)s') % {'device_id': device_id})
        raise exception.ManageExistingInvalidReference(existing_ref=external_ref, reason=msg)
    size = float(self.rest.get_size_of_device_on_array(array, device_id))
    if (not size.is_integer()):
        exception_message = (_('Cannot    manage    existing    VMAX    volume    %(device_id)s    -    it    has    a    size    of    %(vol_size)s    but    only    whole    GB    sizes    are    supported.    Please    extend    the    volume    to    the    nearest    GB    value    before    importing.') % {'device_id': device_id, 'vol_size': size})
        LOG.exception(exception_message)
        raise exception.ManageExistingInvalidReference(existing_ref=external_ref, reason=exception_message)
    LOG.debug('Size    of    volume    %(device_id)s    is    %(vol_size)s    GB.', {'device_id': device_id, 'vol_size': int(size)})
    return int(size)
