Interface StorageProvider.StorageUpdateFacet
- All Superinterfaces:
PluginProvider.UpdateFacet<StorageServer>
- Enclosing interface:
- StorageProvider
Update lifecycle: validateUpdate â executeUpdate â postUpdate.
If executeUpdate or postUpdate fail, the appliance calls rollbackUpdate.
refreshUpdate is used only to poll the status of a long-running async operation â it is
not part of the rollback path.
Parameter ordering note: StorageUpdateFacet takes (StorageServer, UpdateDefinition)
â the server instance comes first. This is the opposite of ComputeUpdateFacet, which takes
(UpdateDefinition, ComputeServer...). Keep this in mind when implementing across resource types.
UpdateDefinition describes the available update (what to apply),
scoped to a resource type via refType/refId. UpdateOperation
describes the in-progress execution on a specific instance, and is what refreshUpdate
and rollbackUpdate operate against.
-
Method Summary
Modifier and TypeMethodDescriptionexecuteUpdate(StorageServer storageServer, UpdateDefinition update) Execute the update on the target storage server.postUpdate(StorageServer storageServer, UpdateDefinition update) Post-update operations: cleanup, verification, or other finalization steps.refreshUpdate(StorageServer storageServer, UpdateOperation updateOperation) Poll the status of a long-running update operation.rollbackUpdate(StorageServer storageServer, UpdateDefinition update) Roll back the update on the target storage server.validateUpdate(StorageServer storageServer, UpdateDefinition update) Perform a validation of the update against the target storage server.
-
Method Details
-
validateUpdate
ServiceResponse<UpdateOperation> validateUpdate(StorageServer storageServer, UpdateDefinition update) Perform a validation of the update against the target storage server. Check prerequisites, compatibility, or other conditions to ensure the update can be applied successfully.- Specified by:
validateUpdatein interfacePluginProvider.UpdateFacet<StorageServer>- Parameters:
storageServer- the target device to be updatedupdate- the update definition containing the details of the update to be applied- Returns:
- a ServiceResponse with any errors if validation failed or a success response if validation passed
-
executeUpdate
ServiceResponse<UpdateOperation> executeUpdate(StorageServer storageServer, UpdateDefinition update) Execute the update on the target storage server. This is where the actual update logic should be implemented. Called aftervalidateUpdatesucceeds. On failure, the appliance will callrollbackUpdate.- Specified by:
executeUpdatein interfacePluginProvider.UpdateFacet<StorageServer>- Parameters:
storageServer- the target device to be updatedupdate- the update definition containing the details of the update to be applied- Returns:
- a ServiceResponse indicating the success or failure of the update operation
-
refreshUpdate
ServiceResponse<UpdateOperation> refreshUpdate(StorageServer storageServer, UpdateOperation updateOperation) Poll the status of a long-running update operation. Called by the appliance when anUpdateOperationis in a pending/in-progress state and needs a status refresh. This method is not called as part of the rollback path â userollbackUpdatefor failure recovery.- Specified by:
refreshUpdatein interfacePluginProvider.UpdateFacet<StorageServer>- Parameters:
storageServer- the target device being updatedupdateOperation- the in-progress operation whose status should be refreshed- Returns:
- a ServiceResponse with the updated operation state
-
postUpdate
Post-update operations: cleanup, verification, or other finalization steps. Called afterexecuteUpdatecompletes successfully. On failure, the appliance will callrollbackUpdate.- Specified by:
postUpdatein interfacePluginProvider.UpdateFacet<StorageServer>- Parameters:
storageServer- the target device that was updatedupdate- the update definition- Returns:
- a ServiceResponse indicating the success or failure of post-update steps
-
rollbackUpdate
ServiceResponse<UpdateOperation> rollbackUpdate(StorageServer storageServer, UpdateDefinition update) Roll back the update on the target storage server. Called by the appliance whenexecuteUpdateorpostUpdatereturns a failure response. Implement idempotent cleanup here.- Specified by:
rollbackUpdatein interfacePluginProvider.UpdateFacet<StorageServer>- Parameters:
storageServer- the target device to roll backupdate- the update definition for the operation being rolled back- Returns:
- a ServiceResponse indicating the success or failure of the rollback operation
-