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<ModificationResponse<()>, 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<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 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<ModificationResponse<()>, Error<B>>where
B::Error: ActionError,
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
StartUpdateaction - The action execution fails
Sourcepub async fn update(
&self,
update: &UpdateServiceUpdate,
) -> Result<ModificationResponse<Self>, Error<B>>
pub async fn update( &self, update: &UpdateServiceUpdate, ) -> Result<ModificationResponse<Self>, Error<B>>
Update this service with deprecated generated UpdateServiceUpdate fields.
Use this for standard HttpPushUriOptions, HttpPushUriTargets, and
related busy flags before or after an HttpPushUri upload.
§Errors
Returns an error if the update request fails.
Sourcepub async fn http_push_uri_update_from_reader<U, R>(
&self,
update_stream: UploadStream<U>,
upload_timeout: Duration,
) -> Result<ModificationResponse<R>, Error<B>>
pub async fn http_push_uri_update_from_reader<U, R>( &self, update_stream: UploadStream<U>, upload_timeout: Duration, ) -> Result<ModificationResponse<R>, Error<B>>
Upload a raw binary stream using this service’s deprecated HttpPushUri.
The stream is sent as application/octet-stream without multipart
UpdateParameters.
§Errors
Returns an error if HttpPushUri is absent or the upload fails.
Sourcepub async fn http_push_uri_update<U, R>(
&self,
request: HttpPushUriUpdateRequest<U>,
) -> Result<ModificationResponse<R>, Error<B>>
pub async fn http_push_uri_update<U, R>( &self, request: HttpPushUriUpdateRequest<U>, ) -> Result<ModificationResponse<R>, Error<B>>
Perform a raw binary upload using this service’s deprecated HttpPushUri.
§Errors
Returns an error if HttpPushUri is absent or the upload fails.
Sourcepub async fn multipart_update_from_reader<U, V, R>(
&self,
update_parameters: &V,
update_stream: DataStream<U>,
upload_timeout: Duration,
) -> Result<ModificationResponse<R>, Error<B>>
pub async fn multipart_update_from_reader<U, V, R>( &self, update_parameters: &V, update_stream: DataStream<U>, upload_timeout: Duration, ) -> Result<ModificationResponse<R>, Error<B>>
Upload a named stream using this service’s MultipartHttpPushUri.
Prefer the generated MultipartUpdateParameters type. A generic
payload is accepted for platform fields that are not generated.
§Errors
Returns an error if MultipartHttpPushUri is absent or the upload fails.
Sourcepub async fn multipart_update<U, V, R>(
&self,
request: MultipartUpdateRequest<'_, U, V>,
) -> Result<ModificationResponse<R>, Error<B>>
pub async fn multipart_update<U, V, R>( &self, request: MultipartUpdateRequest<'_, U, V>, ) -> Result<ModificationResponse<R>, Error<B>>
Perform a multipart upload using this service’s MultipartHttpPushUri.
Use this method when the request needs optional OEM multipart parts.
§Errors
Returns an error if MultipartHttpPushUri is absent or the upload fails.