def check_for_invalid_qos_spec_combination(info, volume_type):
 if (info['legacy'] and info['spec']):
  msg = (_('Conflicting QoS specifications in volume type %s: when QoS spec is associated to volume type, legacy "netapp:qos_policy_group" is not allowed in the volume type extra specs.') % volume_type['id'])
  raise exception.Invalid(msg)

def check_for_invalid_qos_spec_combination ( info , volume_type ) : if ( info [ 'legacy' ] and info [ 'spec' ] ) : msg = ( _ ( 'Conflicting QoS specifications in volume type %s: when QoS spec is associated to volume type, legacy "netapp:qos_policy_group" is not allowed in the volume type extra specs.' ) % volume_type [ 'id' ] ) raise exception . Invalid ( msg )
invalidate qos spec if both legacy and non-legacy info is present .