Package com.morpheusdata.core.providers
Interface ProvisionProvider.ComputeUpdateFacet
- All Superinterfaces:
PluginProvider.UpdateFacet<ComputeServer>
- Enclosing interface:
- ProvisionProvider
public static interface ProvisionProvider.ComputeUpdateFacet
extends PluginProvider.UpdateFacet<ComputeServer>
-
Method Summary
Modifier and TypeMethodDescriptionexecuteUpdate(UpdateDefinition update, ComputeServer... computeServer) Execute the update on the target devices.postUpdate(UpdateDefinition update, ComputeServer... computeServer) Post-update operations: cleanup, verification, or other finalization steps.refreshUpdate(UpdateOperation updateOperation, ComputeServer... computeServer) Poll the status of a long-running update operation.rollbackUpdate(UpdateDefinition update, ComputeServer... computeServer) Roll back the update on the target devices.validateUpdate(UpdateDefinition update, ComputeServer... computeServer) Update lifecycle order:validateUpdateâexecuteUpdateâpostUpdate.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider.UpdateFacet
executeUpdate, postUpdate, refreshUpdate, rollbackUpdate, validateUpdate
-
Method Details
-
validateUpdate
ServiceResponse<UpdateOperation> validateUpdate(UpdateDefinition update, ComputeServer... computeServer) Update lifecycle order:validateUpdateâexecuteUpdateâpostUpdate. IfexecuteUpdateorpostUpdatefail, callrollbackUpdate. UserefreshUpdateonly for polling the status of a long-running async operation â it is not a rollback mechanism.Parameter ordering note:
Perform a validation of the update against the target devices. This is useful for checking prerequisites, compatibility, or other checks to ensure the update can be applied successfully.ComputeUpdateFacettakes(UpdateDefinition, ComputeServer...)â the definition comes first, then the server(s).StorageUpdateFacetandNetworkUpdateFacetuse the opposite convention(Server, UpdateDefinition). Keep this in mind when implementing across resource types.- Parameters:
update- the update definition containing the details of the update to be appliedcomputeServer- the target device(s) to be updated- Returns:
- a ServiceResponse with any errors if validation failed or a success response if validation passed
-
executeUpdate
ServiceResponse<UpdateOperation> executeUpdate(UpdateDefinition update, ComputeServer... computeServer) Execute the update on the target devices. This is where the actual update logic should be implemented. Called aftervalidateUpdatesucceeds. On failure, the appliance will callrollbackUpdate.- Parameters:
update- the update definition containing the details of the update to be appliedcomputeServer- the target device(s) to be updated- Returns:
- a ServiceResponse indicating the success or failure of the update operation
-
refreshUpdate
ServiceResponse<UpdateOperation> refreshUpdate(UpdateOperation updateOperation, ComputeServer... computeServer) Poll the status of a long-running update operation. This is 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.- Parameters:
updateOperation- the in-progress operation whose status should be refreshedcomputeServer- the target device(s) being updated- Returns:
- a ServiceResponse with the updated operation state
-
postUpdate
ServiceResponse<UpdateOperation> postUpdate(UpdateDefinition update, ComputeServer... computeServer) Post-update operations: cleanup, verification, or other finalization steps. Called afterexecuteUpdatecompletes successfully. On failure, the appliance will callrollbackUpdate.- Parameters:
update- the update definitioncomputeServer- the target device(s) that were updated- Returns:
- a ServiceResponse indicating the success or failure of post-update steps
-
rollbackUpdate
ServiceResponse<UpdateOperation> rollbackUpdate(UpdateDefinition update, ComputeServer... computeServer) Roll back the update on the target devices. Called by the appliance whenexecuteUpdateorpostUpdatereturns a failure response. Implement idempotent cleanup here.- Parameters:
update- the update definition for the operation being rolled backcomputeServer- the target device(s) to roll back- Returns:
- a ServiceResponse indicating the success or failure of the rollback operation
-