You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some(value) => Some(value.as_str().context("ip must be a string")?.to_string()),
226
+
Some(value) => {
227
+
ifletSome(array) = value.as_array(){
228
+
// Handle array of IPs for dual stack
229
+
Some(array.iter().map(|v| -> Result<String, anyhow::Error>{Ok(v.as_str().context("ip array element must be a string")?.to_string())}).collect::<Result<Vec<_>,_>>()?)
230
+
}elseifletSome(single_ip) = value.as_str(){
231
+
// Handle single IP for backward compatibility
232
+
Some(vec![single_ip.to_string()])
233
+
}else{
234
+
anyhow::bail!("ip must be a string or array of strings");
235
+
}
236
+
},
227
237
None => None,
228
238
};
229
239
let pull_secret = match value.remove("pull_secret"){
@@ -261,7 +271,17 @@ impl RecertConfig {
261
271
None => None,
262
272
};
263
273
let machine_network_cidr = match value.remove("machine_network_cidr"){
264
-
Some(value) => Some(value.as_str().context("machine_network_cidr must be a string")?.to_string()),
274
+
Some(value) => {
275
+
ifletSome(array) = value.as_array(){
276
+
// Handle array of CIDRs for dual stack
277
+
Some(array.iter().map(|v| -> Result<String, anyhow::Error>{Ok(v.as_str().context("machine_network_cidr array element must be a string")?.to_string())}).collect::<Result<Vec<_>,_>>()?)
278
+
}elseifletSome(single_cidr) = value.as_str(){
279
+
// Handle single CIDR for backward compatibility
280
+
Some(vec![single_cidr.to_string()])
281
+
}else{
282
+
anyhow::bail!("machine_network_cidr must be a string or array of strings");
283
+
}
284
+
},
265
285
None => None,
266
286
};
267
287
let chrony_config = match value.remove("chrony_config"){
0 commit comments