(name: &str, provider_type: &str, key_name: &str, key_value: &str)
| 1041 | } |
| 1042 | |
| 1043 | fn make_provider(name: &str, provider_type: &str, key_name: &str, key_value: &str) -> Provider { |
| 1044 | Provider { |
| 1045 | metadata: Some(openshell_core::proto::datamodel::v1::ObjectMeta { |
| 1046 | id: format!("provider-{name}"), |
| 1047 | name: name.to_string(), |
| 1048 | created_at_ms: 1_000_000, |
| 1049 | labels: std::collections::HashMap::new(), |
| 1050 | resource_version: 0, |
| 1051 | }), |
| 1052 | r#type: provider_type.to_string(), |
| 1053 | credentials: std::iter::once((key_name.to_string(), key_value.to_string())).collect(), |
| 1054 | config: std::collections::HashMap::new(), |
| 1055 | credential_expires_at_ms: std::collections::HashMap::new(), |
| 1056 | } |
| 1057 | } |
| 1058 | |
| 1059 | fn make_provider_with_base_url( |
| 1060 | name: &str, |
no outgoing calls
no test coverage detected