Skip to main content

UpdateService

Struct UpdateService 

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

Update service.

Provides functions to access firmware and software inventory, and perform update actions.

Implementations§

Source§

impl<B: Bmc> UpdateService<B>

Source

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

Get the raw schema data for this update service.

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

Source

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

List all firmware inventory items.

§Errors

Returns an error if:

  • The update service does not have a firmware inventory collection
  • Fetching firmware inventory data fails
Source

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

List all software inventory items.

§Errors

Returns an error if:

  • The update service does not have a software inventory collection
  • Fetching software inventory data fails
Source

pub async fn simple_update( &self, image_uri: String, transfer_protocol: Option<TransferProtocolType>, targets: Option<Vec<String>>, username: Option<String>, password: Option<String>, force_update: Option<bool>, stage: Option<bool>, local_image: Option<bool>, exclude_targets: Option<Vec<String>>, ) -> Result<ModificationResponse<()>, Error<B>>
where B::Error: ActionError,

Perform a simple update with the specified image URI.

This action updates software components by downloading and installing a software image from the specified URI.

§Arguments
  • image_uri - The URI of the software image to install
  • transfer_protocol - Optional network protocol to use for retrieving the image
  • targets - Optional list of URIs indicating where to apply the update
  • username - Optional username for accessing the image URI
  • password - Optional password for accessing the image URI
  • force_update - Whether to bypass update policies (e.g., allow downgrade)
  • stage - Whether to stage the image for later activation instead of immediate installation
  • local_image - An indication of whether the service adds the image to the local image store
  • exclude_targets - An array of URIs that indicate where not to apply the update image
§Errors

Returns an error if:

  • The update service does not support the SimpleUpdate action
  • The action execution fails
Source

pub async fn start_update(&self) -> Result<ModificationResponse<()>, Error<B>>
where B::Error: ActionError,

Start updates that have been previously invoked with an OperationApplyTime of OnStartUpdateRequest.

§Errors

Returns an error if:

  • The update service does not support the StartUpdate action
  • The action execution fails

Trait Implementations§

Source§

impl<B: Bmc> Resource for UpdateService<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 UpdateService<B>

§

impl<B> !RefUnwindSafe for UpdateService<B>

§

impl<B> Send for UpdateService<B>

§

impl<B> Sync for UpdateService<B>

§

impl<B> Unpin for UpdateService<B>

§

impl<B> UnsafeUnpin for UpdateService<B>

§

impl<B> !UnwindSafe for UpdateService<B>

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