pub struct Chassis<B: Bmc> { /* private fields */ }Expand description
Represents a chassis in the BMC.
Provides access to chassis information and sub-resources such as power supplies.
Implementations§
Source§impl<B: Bmc> Chassis<B>
impl<B: Bmc> Chassis<B>
Sourcepub fn raw(&self) -> Arc<ChassisSchema>
pub fn raw(&self) -> Arc<ChassisSchema>
Get the raw schema data for this chassis.
Returns an Arc to the underlying schema, allowing cheap cloning
and sharing of the data.
Sourcepub fn hardware_id(&self) -> HardwareIdRef<'_, ChassisTag>
pub fn hardware_id(&self) -> HardwareIdRef<'_, ChassisTag>
Get hardware identifier of the network adpater.
Sourcepub async fn assembly(&self) -> Result<Option<Assembly<B>>, Error<B>>
pub async fn assembly(&self) -> Result<Option<Assembly<B>>, Error<B>>
Get assembly of this chassis
Returns Ok(None) when the assembly link is absent.
§Errors
Returns an error if fetching assembly data fails.
Sourcepub async fn power_supplies(&self) -> Result<Vec<PowerSupply<B>>, Error<B>>
pub async fn power_supplies(&self) -> Result<Vec<PowerSupply<B>>, Error<B>>
Get power supplies from this chassis.
Attempts to fetch power supplies from PowerSubsystem (modern API)
with fallback to Power resource (deprecated API).
§Errors
Returns an error if fetching power supply data fails.
Sourcepub async fn power(&self) -> Result<Option<Power<B>>, Error<B>>
pub async fn power(&self) -> Result<Option<Power<B>>, Error<B>>
Get legacy Power resource (for older BMCs).
Returns the deprecated Chassis/Power resource if available.
For modern BMCs, prefer using direct sensor links via HasSensors
or the modern PowerSubsystem API.
§Errors
Returns an error if fetching power data fails.
Sourcepub async fn thermal(&self) -> Result<Option<Thermal<B>>, Error<B>>
pub async fn thermal(&self) -> Result<Option<Thermal<B>>, Error<B>>
Get legacy Thermal resource (for older BMCs).
Returns the deprecated Chassis/Thermal resource if available.
For modern BMCs, prefer using direct sensor links via HasSensors
or the modern ThermalSubsystem API.
§Errors
Returns an error if fetching thermal data fails.
Sourcepub async fn network_adapters(
&self,
) -> Result<Option<Vec<NetworkAdapter<B>>>, Error<B>>
pub async fn network_adapters( &self, ) -> Result<Option<Vec<NetworkAdapter<B>>>, Error<B>>
Get network adapter resources
Returns the Chassis/NetworkAdapter resources if available, and Ok(None) when
the network adapters link is absent.
§Errors
Returns an error if fetching network adapters data fails.
Sourcepub async fn log_services(&self) -> Result<Option<Vec<LogService<B>>>, Error<B>>
pub async fn log_services(&self) -> Result<Option<Vec<LogService<B>>>, Error<B>>
Get log services for this chassis.
Returns Ok(None) when the log services link is absent.
§Errors
Returns an error if fetching log service data fails.
Sourcepub async fn environment_sensors(&self) -> Result<Vec<SensorRef<B>>, Error<B>>
pub async fn environment_sensors(&self) -> Result<Vec<SensorRef<B>>, Error<B>>
Get the environment sensors for this chassis.
Returns a vector of Sensor<B> obtained from environment metrics, if available.
§Errors
Returns an error if get of environment metrics failed.
Sourcepub async fn sensors(&self) -> Result<Option<Vec<SensorRef<B>>>, Error<B>>
pub async fn sensors(&self) -> Result<Option<Vec<SensorRef<B>>>, Error<B>>
Get the sensors collection for this chassis.
Returns all available sensors associated with the chassis, and Ok(None)
when the sensors link is absent.
§Errors
Returns an error if fetching sensors data fails.
Sourcepub async fn pcie_devices(
&self,
) -> Result<Option<PcieDeviceCollection<B>>, Error<B>>
pub async fn pcie_devices( &self, ) -> Result<Option<PcieDeviceCollection<B>>, Error<B>>
Get PCIe devices for this computer system.
Returns Ok(None) when the PCIeDevices link is absent.
§Errors
Returns an error if fetching PCIe devices data fails.
Sourcepub fn oem_nvidia_baseboard_cbc(
&self,
) -> Result<Option<NvidiaCbcChassis<B>>, Error<B>>
pub fn oem_nvidia_baseboard_cbc( &self, ) -> Result<Option<NvidiaCbcChassis<B>>, Error<B>>
NVIDIA Bluefield OEM extension
Returns Ok(None) when the chassis does not include NVIDIA OEM extension data.
§Errors
Returns an error if NVIDIA OEM data parsing fails.