'Returns the volume name of an existing reference.
Checks if an existing volume reference has a source-name or
source-id element. If source-name or source-id is not present an
error will be thrown.'

def _get_existing_volume_ref_name(self, existing_ref, is_snapshot=False):

    vol_name = None
    if ('source-name' in existing_ref):
        vol_name = existing_ref['source-name']
    elif ('source-id' in existing_ref):
        if is_snapshot:
            vol_name = self._get_3par_ums_name(existing_ref['source-id'])
        else:
            vol_name = self._get_3par_unm_name(existing_ref['source-id'])
    else:
        reason = _('Reference    must    contain    source-name    or    source-id.')
        raise exception.ManageExistingInvalidReference(existing_ref=existing_ref, reason=reason)
    return vol_name
