Exemple #1
0
 def _check_volume_type(self, volume, share, file_name, extra_specs):
     """Matches a volume type for share file."""
     qos_policy_group = extra_specs.pop('netapp:qos_policy_group', None) \
         if extra_specs else None
     if qos_policy_group:
         raise exception.ManageExistingVolumeTypeMismatch(
             reason=(_("Setting file 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 and 'qos_spec_id' in volume_type:
         raise exception.ManageExistingVolumeTypeMismatch(
             reason=_("QoS specs are not supported"
                      " on this storage family and ONTAP version."))
Exemple #2
0
 def _check_volume_type(self, volume, share, file_name, extra_specs):
     """Matches a volume type for share file."""
     qos_policy_group = extra_specs.pop('netapp:qos_policy_group', None) \
         if extra_specs else None
     if qos_policy_group:
         raise exception.ManageExistingVolumeTypeMismatch(
             reason=(_("Setting file 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 and 'qos_spec_id' in volume_type:
         raise exception.ManageExistingVolumeTypeMismatch(
             reason=_("QoS specs are not supported"
                      " on this storage family and ONTAP version."))
Exemple #3
0
 def _check_volume_type_for_lun(self, volume, lun, existing_ref,
                                extra_specs):
     """Check if LUN satisfies volume type."""
     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."))
Exemple #4
0
 def _check_volume_type_for_lun(self, volume, lun, existing_ref,
                                extra_specs):
     """Check if LUN satisfies volume type."""
     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."))