Interface ProvisionProvider.ComputeUpdateFacet

All Superinterfaces:
PluginProvider.UpdateFacet<ComputeServer>
Enclosing interface:
ProvisionProvider

public static interface ProvisionProvider.ComputeUpdateFacet extends PluginProvider.UpdateFacet<ComputeServer>
  • Method Details

    • validateUpdate

      ServiceResponse<UpdateOperation> validateUpdate(UpdateDefinition update, ComputeServer... computeServer)
      Update lifecycle order: validateUpdate → executeUpdate → postUpdate. If executeUpdate or postUpdate fail, call rollbackUpdate. Use refreshUpdate only for polling the status of a long-running async operation — it is not a rollback mechanism.

      Parameter ordering note: ComputeUpdateFacet takes (UpdateDefinition, ComputeServer...) — the definition comes first, then the server(s). StorageUpdateFacet and NetworkUpdateFacet use the opposite convention (Server, UpdateDefinition). Keep this in mind when implementing across resource types.

      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.
      Parameters:
      update - the update definition containing the details of the update to be applied
      computeServer - 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 after validateUpdate succeeds. On failure, the appliance will call rollbackUpdate.
      Parameters:
      update - the update definition containing the details of the update to be applied
      computeServer - 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 an UpdateOperation is in a pending/in-progress state and needs a status refresh. This method is not called as part of the rollback path — use rollbackUpdate for failure recovery.
      Parameters:
      updateOperation - the in-progress operation whose status should be refreshed
      computeServer - 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 after executeUpdate completes successfully. On failure, the appliance will call rollbackUpdate.
      Parameters:
      update - the update definition
      computeServer - 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 when executeUpdate or postUpdate returns a failure response. Implement idempotent cleanup here.
      Parameters:
      update - the update definition for the operation being rolled back
      computeServer - the target device(s) to roll back
      Returns:
      a ServiceResponse indicating the success or failure of the rollback operation