Skip to content

Commit 01eec58

Browse files
Sinckclaude
andcommitted
fix: update MissingVendor usages for struct-variant after merge
Latest main added new `MissingVendor` references (the error_code and operator_mitigation match arms, plus rpc/api-model tests) that still treated it as a unit variant. Update them for the `MissingVendor { observed }` struct variant introduced earlier on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 97f9c4d commit 01eec58

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/api-model/src/site_explorer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ impl OperatorError for EndpointExplorationError {
13171317
ErrorCode::nico(SiteExplorer, 120)
13181318
}
13191319
EndpointExplorationError::MissingRedfish { .. } => ErrorCode::nico(SiteExplorer, 121),
1320-
EndpointExplorationError::MissingVendor => ErrorCode::nico(SiteExplorer, 122),
1320+
EndpointExplorationError::MissingVendor { .. } => ErrorCode::nico(SiteExplorer, 122),
13211321
EndpointExplorationError::RedfishError { .. } => ErrorCode::nico(SiteExplorer, 130),
13221322
EndpointExplorationError::VikingFWInventoryForbiddenError { .. } => {
13231323
ErrorCode::nico(SiteExplorer, 131)
@@ -1349,7 +1349,7 @@ impl OperatorError for EndpointExplorationError {
13491349
"Verify endpoint network reachability and that the BMC Redfish service is listening.",
13501350
),
13511351
EndpointExplorationError::UnsupportedVendor { .. }
1352-
| EndpointExplorationError::MissingVendor => Some(
1352+
| EndpointExplorationError::MissingVendor { .. } => Some(
13531353
"Confirm the endpoint's BMC vendor and model are listed in the NICo Hardware \
13541354
Compatibility List \
13551355
(https://docs.nvidia.com/infra-controller/documentation/reference/hardware-compatibility-list); \
@@ -2468,7 +2468,7 @@ mod tests {
24682468
EndpointExplorationError::UnsupportedVendor {
24692469
vendor: "unknown".to_string(),
24702470
} => true,
2471-
EndpointExplorationError::MissingVendor => true,
2471+
EndpointExplorationError::MissingVendor { observed: None } => true,
24722472
}
24732473
);
24742474
}

crates/rpc/src/model/site_explorer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ mod tests {
426426

427427
#[test]
428428
fn endpoint_report_propagates_operator_error_schema_to_rpc() {
429-
let error = EndpointExplorationError::MissingVendor;
429+
let error = EndpointExplorationError::MissingVendor { observed: None };
430430
let expected_schema = error.operator_error_schema();
431431

432432
let report =

0 commit comments

Comments
 (0)