Skip to content

feat: wiring in RackHarwareType with rack-firmware management, as a string#893

Merged
chet merged 1 commit intoNVIDIA:mainfrom
chet:rack-firmware-hardware-type-integration
Apr 13, 2026
Merged

feat: wiring in RackHarwareType with rack-firmware management, as a string#893
chet merged 1 commit intoNVIDIA:mainfrom
chet:rack-firmware-hardware-type-integration

Conversation

@chet
Copy link
Copy Markdown
Contributor

@chet chet commented Apr 10, 2026

Description

This wires in the new RackHardwareType and RackHardwareClass in with the rack-firmware management flows, and turns it into newtype over String in the process, giving us some more flexiblility as to what we set for values. It was decided we didn't want to be too restrictive with an enumerated list for now.

With the plumbing in place, the flow is now:

admin-cli rack-firmware create <rack-hardware-type> ...

...to associate a given rack firmware bundle with an expected rack type. And then, when you:

admin-cli rack-firmare apply <rack-id> ....

...the backend will now check to make sure the:

  • The RackFirmwareType of the given RackId (based on its configured RackCapabilitiesSet) matches the configured RackFirmwareType for the firmware.
  • The RackHardwareClass of the given RackId (based on its configured RackCapabilitesSet) matches the configured firmware_type (<dev|prod>) for the firmware.

I also introduced a RackHardwareType::Any in here, as if to say "I don't care what the hardware is, just apply the firmware", e.g.

admin-cli rack-firmware create any ....

...which will associate that firmware with RackFirmwareType::Any, so when you go to rack-firmware apply, it will apply to ::Any hardware.

Improved the rack-firmware list API call as well with a filtering.

Tests included!

Signed-off-by: Chet Nichols III chetn@nvidia.com

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@chet chet requested a review from a team as a code owner April 10, 2026 16:47
@github-actions
Copy link
Copy Markdown

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-04-10 16:49:10 UTC | Commit: 4b7f32b

@chet chet force-pushed the rack-firmware-hardware-type-integration branch 2 times, most recently from f750daf to 2d29898 Compare April 13, 2026 16:12
@chet chet changed the title feat: wiring in RackHarwareType with rack-firmware management feat: wiring in RackHarwareType with rack-firmware management, as a string Apr 13, 2026
@vinodchitraliNVIDIA
Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Contributor

@anunna0 anunna0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just left a couple of comments.

.into());
}

// Validate firmware_type matches rack's hardware class.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the firmware_type CLI parameter and just decide which firmware type to apply based on the hardware type? Is there a reason to retain the firmware_type?


// Validate firmware hardware type and firmware_type against rack capabilities.
if let Some(rack_type_name) = rack.config.rack_type.as_deref()
&& let Some(capabilities) = api.runtime_config.rack_types.get(rack_type_name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we skipping the validation step if there is no rack type configured? We should probably at least log something... maybe fail altogether.

@chet chet force-pushed the rack-firmware-hardware-type-integration branch from 2d29898 to e9eaabb Compare April 13, 2026 21:41
…tring

This wires in the new `RackHardwareType` and `RackHardwareClass` in with the `rack-firmware` management flows, and turns it into newtype over `String` in the process, giving us some more flexiblility as to what we set for values. It was decided we didn't want to be too restrictive with an enumerated list for now.

With the plumbing in place, the flow is now:

```
admin-cli rack-firmware create <rack-hardware-type> ...
```

...to associate a given rack firmware bundle with an expected rack type. And then, when you:

```
admin-cli rack-firmare apply <rack-id> ....
```

...the backend will now check to make sure the:
- The `RackFirmwareType` of the given `RackId` (based on its configured `RackCapabilitiesSet`) matches the configured `RackFirmwareType` for the firmware.
- The `RackHardwareClass` of the given `RackId` (based on its configured `RackCapabilitesSet`) matches the configured `firmware_type` (`<dev|prod>`) for the firmware.

I also introduced a `RackHardwareType::Any` in here, as if to say "I don't care what the hardware is, just apply the firmware", e.g.

```
admin-cli rack-firmware create any ....
```

...which will associate that firmware with `RackFirmwareType::Any`, so when you go to `rack-firmware apply`, it will apply to `::Any` hardware.

Improved the `rack-firmware list` API call as well with a filtering.

Tests included!

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet chet force-pushed the rack-firmware-hardware-type-integration branch from e9eaabb to 7a2ef2e Compare April 13, 2026 22:40
@chet chet merged commit 0dcd0b8 into NVIDIA:main Apr 13, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants