def get_valid_backend_qos_spec_from_volume_type(volume, volume_type):
 spec_key_values = get_backend_qos_spec_from_volume_type(volume_type)
 if (spec_key_values is None):
  return None
 validate_qos_spec(spec_key_values)
 return map_qos_spec(spec_key_values, volume)

def get_valid_backend_qos_spec_from_volume_type ( volume , volume_type ) : spec_key_values = get_backend_qos_spec_from_volume_type ( volume_type ) if ( spec_key_values is None ) : return None validate_qos_spec ( spec_key_values ) return map_qos_spec ( spec_key_values , volume )
given a volume type .