Skip to main content

ComputerSystem

Struct ComputerSystem 

Source
pub struct ComputerSystem<B: Bmc> { /* private fields */ }
Expand description

Represents a computer system in the BMC.

Provides access to system information and sub-resources such as processors.

Implementations§

Source§

impl<B: Bmc> ComputerSystem<B>

Source

pub fn raw(&self) -> Arc<ComputerSystemSchema>

Get the raw schema data for this computer system.

Returns an Arc to the underlying schema, allowing cheap cloning and sharing of the data.

Source

pub fn hardware_id(&self) -> HardwareIdRef<'_, ComputerSystemTag>

Get hardware identifier of the network adpater.

Source

pub fn sku(&self) -> Option<TaggedType<&str, ComputerSystemSkuTag>>

The manufacturer SKU for this system.

Source

pub fn power_state(&self) -> Option<PowerState>

Power state of this system.

Source

pub fn boot_order(&self) -> Option<Vec<BootOptionReference<&str>>>

An array of BootOptionReference strings that represent the persistent boot order for with this computer system.

Source

pub async fn set_boot_order( &self, boot_order: Vec<BootOptionReference<String>>, ) -> Result<Option<Self>, Error<B>>

Update the persistent boot order for this computer system.

§Errors

Returns an error if updating the system fails.

Source

pub async fn bios(&self) -> Result<Option<Bios<B>>, Error<B>>

Bios associated with this system.

Fetches the BIOS settings. Returns Ok(None) when the BIOS link is absent.

§Errors

Returns an error if fetching BIOS data fails.

Source

pub async fn processors(&self) -> Result<Option<Vec<Processor<B>>>, Error<B>>

Get processors associated with this system.

Fetches the processor collection and returns a list of Processor handles. Returns Ok(None) when the processors link is absent.

§Errors

Returns an error if fetching processor data fails.

Source

pub async fn secure_boot(&self) -> Result<Option<SecureBoot<B>>, Error<B>>

Get secure boot resource associated with this system.

Returns Ok(None) when the secure boot link is absent.

§Errors

Returns an error if fetching secure boot data fails.

Source

pub async fn storage_controllers( &self, ) -> Result<Option<Vec<Storage<B>>>, Error<B>>

Get storage controllers associated with this system.

Fetches the storage collection and returns a list of Storage handles. Returns Ok(None) when the storage link is absent.

§Errors

Returns an error if fetching storage data fails.

Source

pub async fn memory_modules(&self) -> Result<Option<Vec<Memory<B>>>, Error<B>>

Get memory modules associated with this system.

Fetches the memory collection and returns a list of Memory handles. Returns Ok(None) when the memory link is absent.

§Errors

Returns an error if fetching memory data fails.

Source

pub async fn log_services(&self) -> Result<Option<Vec<LogService<B>>>, Error<B>>

Get log services for this computer system.

Returns Ok(None) when the log services link is absent.

§Errors

Returns an error if fetching log service data fails.

Source

pub async fn ethernet_interfaces( &self, ) -> Result<Option<EthernetInterfaceCollection<B>>, Error<B>>

Get ethernet interfaces for this computer system.

Returns Ok(None) when the ethernet interfaces link is absent.

§Errors

Returns an error if fetching ethernet interface data fails.

Source

pub async fn boot_options( &self, ) -> Result<Option<BootOptionCollection<B>>, Error<B>>

Get collection of the UEFI boot options associated with this computer system.

Returns Ok(None) when boot options are not exposed.

§Errors

Returns an error if fetching boot options data fails.

Source

pub async fn oem_nvidia_bluefield( &self, ) -> Result<Option<NvidiaComputerSystem<B>>, Error<B>>

NVIDIA Bluefield OEM extension

Returns Ok(None) when the system does not include NVIDIA OEM extension data.

§Errors

Returns an error if NVIDIA OEM data parsing/fetching fails.

Source

pub fn oem_lenovo(&self) -> Result<Option<LenovoComputerSystem<B>>, Error<B>>

Lenovo OEM extension

Returns Ok(None) when the system does not include Lenovo OEM extension data.

§Errors

Returns an error if Lenovo OEM data parsing fails.

Trait Implementations§

Source§

impl<B: Bmc> Resource for ComputerSystem<B>

Source§

fn resource_ref(&self) -> &ResourceSchema

Required function. Must be implemented for Redfish resources.
Source§

fn id(&self) -> ResourceIdRef<'_>

Identifier of the resource.
Source§

fn name(&self) -> ResourceNameRef<'_>

Name of the resource.
Source§

fn description(&self) -> Option<ResourceDescriptionRef<'_>>

Description of the resource.
Source§

fn oem_id(&self) -> Option<OemIdentifier<&str>>

OEM identifier if present in the resource.
Source§

fn odata_id(&self) -> &ODataId

OData identifier of the resource.

Auto Trait Implementations§

§

impl<B> Freeze for ComputerSystem<B>

§

impl<B> RefUnwindSafe for ComputerSystem<B>
where B: RefUnwindSafe,

§

impl<B> Send for ComputerSystem<B>

§

impl<B> Sync for ComputerSystem<B>

§

impl<B> Unpin for ComputerSystem<B>

§

impl<B> UnsafeUnpin for ComputerSystem<B>

§

impl<B> UnwindSafe for ComputerSystem<B>
where B: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more