'Check if LUN satisfies volume type.'

def _check_volume_type_for_lun(self, volume, lun, existing_ref, extra_specs):

    if extra_specs:
        legacy_policy = extra_specs.get('netapp:qos_policy_group')
        if (legacy_policy is not None):
            raise exception.ManageExistingVolumeTypeMismatch(reason=_('Setting    LUN    QoS    policy    group    is    not    supported    on    this    storage    family    and    ONTAP    version.'))
    volume_type = na_utils.get_volume_type_from_volume(volume)
    if (volume_type is None):
        return
    spec = na_utils.get_backend_qos_spec_from_volume_type(volume_type)
    if (spec is not None):
        raise exception.ManageExistingVolumeTypeMismatch(reason=_('Back-end    QoS    specs    are    not    supported    on    this    storage    family    and    ONTAP    version.'))
