'Imports the existing backend storage object as a volume.
.. code-block:: python
manage_existing_ref:{
\'source-id\':<lun id in VNX>
or
.. code-block:: python
manage_existing_ref:{
\'source-name\':<lun name in VNX>
When the volume has a volume_type, the driver inspects that and
compare against the properties of the referenced backend storage
object.  If they are incompatible, raise a
ManageExistingVolumeTypeMismatch exception.'

def manage_existing(self, volume, existing_ref):

    lun = self._get_referenced_lun(existing_ref)
    if volume.volume_type_id:
        type_specs = common.ExtraSpecs.from_volume(volume)
        if (not type_specs.match_with_lun(lun)):
            raise exception.ManageExistingVolumeTypeMismatch(reason=(_("The    volume    to    be    managed    is    a    %(provision)s    LUN    and    the    tiering    setting    is    %(tier)s.    This    doesn't    match    with    the    type    %(type)s.") % {'provision': lun.provision, 'tier': lun.tier, 'type': volume.volume_type_id}))
    lun.rename(volume.name)
    if lun.is_snap_mount_point:
        lun_type = 'smp'
        base_lun_name = lun.primary_lun
    else:
        lun_type = 'lun'
        base_lun_name = volume.name
    pl = self._build_provider_location(lun_id=lun.lun_id, lun_type=lun_type, base_lun_name=base_lun_name)
    return {'provider_location': pl}
