Skip to content

Commit cbcad3a

Browse files
vishnu-rangayyanchet
authored andcommitted
feat: gb200 switch handler derived from gh200 + differentiate P3809 BMC
This adds support for `NvidiaGH200` and `NvidiaGBSwitch`.
1 parent c9a7239 commit cbcad3a

2,292 files changed

Lines changed: 298975 additions & 29 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ mod lenovo;
4646
mod network;
4747
mod nvidia_dpu;
4848

49+
mod nvidia_gbswitch;
4950
mod nvidia_gbx00;
51+
mod nvidia_gh200;
5052
mod nvidia_viking;
5153
mod supermicro;
5254
pub use network::{Endpoint, RedfishClientPool, RedfishClientPoolBuilder, REDFISH_ENDPOINT};

src/model/ethernet_interface.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ pub struct EthernetInterface {
7373
pub uefi_device_path: Option<String>,
7474
}
7575

76+
#[allow(clippy::upper_case_acronyms)]
7677
#[derive(Debug, Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
7778
pub enum IPv4AddressOrigin {
7879
Static,
@@ -87,6 +88,7 @@ impl std::fmt::Display for IPv4AddressOrigin {
8788
}
8889
}
8990

91+
#[allow(clippy::upper_case_acronyms)]
9092
#[derive(Debug, Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
9193
pub enum IPv6AddressOrigin {
9294
Static,

src/model/manager.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub struct Manager {
4646
pub description: Option<String>,
4747
pub ethernet_interfaces: ODataId,
4848
pub firmware_version: String,
49-
pub graphical_console: Commandshell,
49+
pub graphical_console: Option<Commandshell>,
5050
pub id: String,
5151
pub log_services: ODataId,
5252
pub manager_type: String,
@@ -92,6 +92,7 @@ pub struct Availableaction {
9292
pub action: String,
9393
}
9494

95+
#[allow(clippy::enum_variant_names)]
9596
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone, Copy)]
9697
pub enum ManagerResetType {
9798
GracefulRestart,

src/model/oem/lenovo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub struct FrontPanelUSB {
8282
pub fp_mode: FrontPanelUSBMode,
8383
}
8484

85+
#[allow(clippy::upper_case_acronyms)]
8586
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
8687
pub enum PortSwitchingMode {
8788
BMC,
@@ -97,6 +98,7 @@ impl fmt::Display for PortSwitchingMode {
9798
}
9899
}
99100

101+
#[allow(clippy::upper_case_acronyms)]
100102
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
101103
pub enum FrontPanelUSBMode {
102104
Server,
@@ -194,6 +196,7 @@ pub struct BiosAttributes {
194196
pub secure_boot_configuration_secure_boot_setting: EnabledDisabled,
195197
}
196198

199+
#[allow(clippy::upper_case_acronyms, clippy::enum_variant_names)]
197200
#[derive(Debug, Serialize, Deserialize, Clone)]
198201
pub enum BootMode {
199202
UEFIMode,

src/model/oem/nvidia_dpu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub struct Chassis {
8080
pub enum BackgroundCopyStatus {
8181
InProgress,
8282
Completed,
83+
Pending,
8384
}
8485

8586
impl fmt::Display for BackgroundCopyStatus {

src/model/secure_boot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub struct SecureBoot {
4040
pub secure_boot_mode: Option<SecureBootMode>,
4141
}
4242

43+
#[allow(clippy::enum_variant_names)]
4344
#[derive(Debug, Serialize, Default, Deserialize, Copy, Clone, Eq, PartialEq)]
4445
pub enum SecureBootMode {
4546
SetupMode,

src/model/sensor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pub struct Sensors {
5757
pub description: Option<String>,
5858
}
5959

60+
#[allow(clippy::upper_case_acronyms)]
6061
#[derive(Debug, Serialize, Deserialize, Default, Copy, Clone, Eq, PartialEq)]
6162
pub enum PhysicalContext {
6263
#[default]

src/model/service_root.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ pub struct ServiceRoot {
5656
pub telemetry_service: Option<ODataId>,
5757
}
5858

59+
#[allow(clippy::upper_case_acronyms)]
5960
#[derive(Clone, Copy, Debug, PartialEq, Hash, Eq, Serialize, Deserialize)]
6061
pub enum RedfishVendor {
6162
Lenovo,
@@ -64,7 +65,10 @@ pub enum RedfishVendor {
6465
Supermicro,
6566
AMI, // Viking DGX H100
6667
Hpe,
68+
NvidiaGH200, // grace-hopper 200
6769
NvidiaGBx00, // all Grace-Blackwell combinations 200, .. since openbmc fw and redfish schema are the same
70+
NvidiaGBSwitch, // GB NVLink switch
71+
P3809, // dummy for P3809, needs to be set to NvidiaGH200 or NvidiaGBSwitch based on chassis
6872
Unknown,
6973
}
7074

@@ -93,6 +97,7 @@ impl ServiceRoot {
9397
"hpe" => RedfishVendor::Hpe,
9498
"lenovo" => RedfishVendor::Lenovo,
9599
"nvidia" => match self.product.as_deref() {
100+
Some("P3809") => RedfishVendor::P3809, // could be gh200 compute or nvswitch
96101
Some("GB200 NVL") => RedfishVendor::NvidiaGBx00,
97102
_ => RedfishVendor::NvidiaDpu,
98103
},

src/model/system.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ pub struct TrustedModule {
137137
pub status: StatusState,
138138
}
139139

140+
#[allow(clippy::upper_case_acronyms)]
140141
#[derive(Debug, Serialize, Deserialize, Clone)]
141142
#[serde(rename_all = "PascalCase")]
142143
pub enum BootProgressTypes {

src/model/update_service.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub struct UpdateService {
3232
pub multipart_http_push_uri: String,
3333
}
3434

35+
#[allow(clippy::upper_case_acronyms)]
3536
#[derive(Debug, Serialize, Deserialize, Clone)]
3637
pub enum TransferProtocolType {
3738
FTP,
@@ -44,6 +45,7 @@ pub enum TransferProtocolType {
4445
NFS,
4546
}
4647

48+
#[allow(clippy::upper_case_acronyms)]
4749
#[derive(Debug, clap::ValueEnum, Clone, Serialize, Deserialize, Eq, PartialEq)]
4850
pub enum ComponentType {
4951
BMC,

0 commit comments

Comments
 (0)