| 998 | } |
| 999 | |
| 1000 | pub fn parse_profile_catalog_yamls( |
| 1001 | inputs: &[&str], |
| 1002 | ) -> Result<Vec<ProviderTypeProfile>, ProfileError> { |
| 1003 | let mut profiles = inputs |
| 1004 | .iter() |
| 1005 | .map(|input| parse_profile_yaml(input)) |
| 1006 | .collect::<Result<Vec<_>, _>>()?; |
| 1007 | validate_profiles(&profiles)?; |
| 1008 | profiles.sort_by(|left, right| left.id.cmp(&right.id)); |
| 1009 | Ok(profiles) |
| 1010 | } |
| 1011 | |
| 1012 | fn validate_profiles(profiles: &[ProviderTypeProfile]) -> Result<(), ProfileError> { |
| 1013 | let diagnostics = validate_profile_set( |