-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract Topic Operator's Cruise Control client
The idea here is to create a thin CC client with response handling and simple mapping to POJOs. In the next PR, I will move this CC client to the operator-common module sharing the user_tasks request with the CruiseControlApiImpl. Then I will continue with the other endpoints, migrating one by one. I will keep the CruiseControlApi/CruiseControlApiImpl as it contains some rebalance mapping logic. The long term objective is to move this client to operator-common and share it with rebalance operator. Signed-off-by: Federico Valeri <[email protected]>
- Loading branch information
Showing
14 changed files
with
739 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...on/src/main/java/io/strimzi/operator/common/model/cruisecontrol/CruiseControlHeaders.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
package io.strimzi.operator.common.model.cruisecontrol; | ||
|
||
/** | ||
* Enum with Cruise Control headers | ||
*/ | ||
public enum CruiseControlHeaders { | ||
/** | ||
* User task id | ||
*/ | ||
USER_TASK_ID_HEADER("User-Task-ID"); | ||
|
||
private final String name; | ||
|
||
/** | ||
* Creates the Enum from String | ||
* | ||
* @param name String with the path | ||
*/ | ||
CruiseControlHeaders(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.