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>
impl<B: Bmc> UpdateService<B>
Sourcepub fn raw(&self) -> Arc<UpdateServiceSchema>
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.
Sourcepub async fn firmware_inventories(
&self,
) -> Result<Option<Vec<SoftwareInventory<B>>>, Error<B>>
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
Sourcepub async fn software_inventories(
&self,
) -> Result<Option<Vec<SoftwareInventory<B>>>, Error<B>>
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
Sourcepub 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<(), Error<B>>where
B::Error: ActionError,
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<(), 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 installtransfer_protocol- Optional network protocol to use for retrieving the imagetargets- Optional list of URIs indicating where to apply the updateusername- Optional username for accessing the image URIpassword- Optional password for accessing the image URIforce_update- Whether to bypass update policies (e.g., allow downgrade)stage- Whether to stage the image for later activation instead of immediate installationlocal_image- An indication of whether the service adds the image to the local image storeexclude_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
SimpleUpdateaction - The action execution fails
Sourcepub async fn start_update(&self) -> Result<(), Error<B>>where
B::Error: ActionError,
pub async fn start_update(&self) -> Result<(), 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
StartUpdateaction - The action execution fails
Trait Implementations§
Source§impl<B: Bmc> Resource for UpdateService<B>
impl<B: Bmc> Resource for UpdateService<B>
Source§fn resource_ref(&self) -> &ResourceSchema
fn resource_ref(&self) -> &ResourceSchema
Required function. Must be implemented for Redfish resources.
Source§fn id(&self) -> ResourceIdRef<'_>
fn id(&self) -> ResourceIdRef<'_>
Identifier of the resource.
Source§fn name(&self) -> ResourceNameRef<'_>
fn name(&self) -> ResourceNameRef<'_>
Name of the resource.
Source§fn description(&self) -> Option<ResourceDescriptionRef<'_>>
fn description(&self) -> Option<ResourceDescriptionRef<'_>>
Description 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more