Overview

This "How To" guide will describe how to add a new operation to the Cluster Management Service. Cluster Management Operations are operations that are for Cluster management only. These functions can be long running and thus will be submitted for asynchronous completion. Once submitted, the user is required to explicitly check on the progress of the operation.

Procedure

In order to successfully add an operation to the Cluster Management Service, you need to add the following 4 components:

  1. OperationController - This is the entry point to the operation. This controller defines the REST endpoints that are exposed for the user to invoke. These endpoints need to be secured with relevant authorization tags. How these work can be referenced here. All OperationControllers need to extend the AbstractManagementController.
  2. ClusterManagementOperation - This data object is the operation request message the is submitted from the OperationController.
  3. OperationResult- This data object is the operation response message that is to be returned.
  4. OperationPerformer - This class is responsible for the processing of the operation. This class takes an OperationRequest and returns an OperationResponse after completion.

Step 1 - Create ClusterManagementOperation:


DemoOperationRequest
 

Step 2 - Create OperationResult:


DemoOperationResult
 


Step 3 - Create OperationController: 


DemoOperationController
 

Step 4 - Create OperationPerformer:


DemoOperationPerformer
 


  • No labels