Interface NetworkProvider.NetworkUpdateFacet

All Superinterfaces:
PluginProvider.UpdateFacet<NetworkServer>
Enclosing interface:
NetworkProvider

public static interface NetworkProvider.NetworkUpdateFacet extends PluginProvider.UpdateFacet<NetworkServer>
Enables remote update operations on Network Servers such as network switches or appliances.

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: NetworkUpdateFacet takes (NetworkServer, 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 Details

    • validateUpdate

      ServiceResponse<UpdateOperation> validateUpdate(NetworkServer networkServer, UpdateDefinition update)
      Perform a validation of the update against the target network server. Check prerequisites, compatibility, or other conditions to ensure the update can be applied successfully.
      Specified by:
      validateUpdate in interface PluginProvider.UpdateFacet<NetworkServer>
      Parameters:
      networkServer - the target device to be updated
      update - 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(NetworkServer networkServer, UpdateDefinition update)
      Execute the update on the target network server. Called after validateUpdate succeeds. On failure, the appliance will call rollbackUpdate.
      Specified by:
      executeUpdate in interface PluginProvider.UpdateFacet<NetworkServer>
      Parameters:
      networkServer - the target device to be updated
      update - 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(NetworkServer networkServer, UpdateOperation updateOperation)
      Poll the status of a long-running update operation. 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.
      Specified by:
      refreshUpdate in interface PluginProvider.UpdateFacet<NetworkServer>
      Parameters:
      networkServer - the target device being updated
      updateOperation - the in-progress operation whose status should be refreshed
      Returns:
      a ServiceResponse with the updated operation state
    • postUpdate

      ServiceResponse<UpdateOperation> postUpdate(NetworkServer networkServer, UpdateDefinition update)
      Post-update operations: cleanup, verification, or other finalization steps. Called after executeUpdate completes successfully. On failure, the appliance will call rollbackUpdate.
      Specified by:
      postUpdate in interface PluginProvider.UpdateFacet<NetworkServer>
      Parameters:
      networkServer - the target device that was updated
      update - the update definition
      Returns:
      a ServiceResponse indicating the success or failure of post-update steps
    • rollbackUpdate

      ServiceResponse<UpdateOperation> rollbackUpdate(NetworkServer networkServer, UpdateDefinition update)
      Roll back the update on the target network server. Called by the appliance when executeUpdate or postUpdate returns a failure response. Implement idempotent cleanup here.
      Specified by:
      rollbackUpdate in interface PluginProvider.UpdateFacet<NetworkServer>
      Parameters:
      networkServer - the target device to roll back
      update - the update definition for the operation being rolled back
      Returns:
      a ServiceResponse indicating the success or failure of the rollback operation