-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new REST API endpoint 'GET _cat/cluster_manager' as the replace…
…ment of 'GET _cat/master' (#2404) * Add a new path `/_cat/cluster_manager` for the REST request handler `RestMasterAction` * Deprecate the existing path `/_cat/master` * Change the name of the `RestMasterAction` handler from `cat_master_action` to `cat_cluster_manager_action` * Change the response of `GET _cat` to only show the new path `/_cat/cluster_manager` * Rename the JSON rest-api-spec file `cat.master.json` to `cat.cluster_manager.json` and update the paths. * Add YAML REST test. By default, it will run test for both endpoints `GET _cat/cluster_manager` and `GET _cat/master` Signed-off-by: Tianli Feng <ftianli@amazon.com>
- Loading branch information
Tianli Feng
authored
Mar 18, 2022
1 parent
1193ec1
commit 3da9eb6
Showing
3 changed files
with
66 additions
and
9 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
46 changes: 46 additions & 0 deletions
46
rest-api-spec/src/main/resources/rest-api-spec/test/cat.cluster_manager/10_basic.yml
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,46 @@ | ||
setup: | ||
- skip: | ||
features: allowed_warnings | ||
|
||
--- | ||
"Help": | ||
- skip: | ||
version: " - 1.4.99" | ||
reason: "path _cat/cluster_manager is introduced in 2.0.0" | ||
|
||
- do: | ||
cat.cluster_manager: | ||
help: true | ||
allowed_warnings: | ||
- '[GET /_cat/master] is deprecated! Use [GET /_cat/cluster_manager] instead.' | ||
|
||
- match: | ||
$body: | | ||
/^ id .+ \n | ||
host .+ \n | ||
ip .+ \n | ||
node .+ \n | ||
$/ | ||
--- | ||
"Test cat cluster_manager output": | ||
- skip: | ||
version: " - 1.4.99" | ||
reason: "path _cat/cluster_manager is introduced in 2.0.0" | ||
|
||
- do: | ||
cat.cluster_manager: {} | ||
allowed_warnings: | ||
- '[GET /_cat/master] is deprecated! Use [GET /_cat/cluster_manager] instead.' | ||
|
||
- match: | ||
$body: | | ||
/^ | ||
( \S+ \s+ # node id | ||
[-\w.]+ \s+ # host name | ||
(\d{1,3}\.){3}\d{1,3} \s+ # ip address | ||
[-\w.]+ # node name | ||
\n | ||
) | ||
$/ |
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