Skip to content

Commit

Permalink
Fixed nodes usage responses.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Nov 25, 2024
1 parent a069657 commit 5e799c7
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
3 changes: 1 addition & 2 deletions spec/schemas/nodes.usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ components:
type: string
enum:
- _all
- aggregations
- rest_actions
ResponseBase:
allOf:
Expand Down Expand Up @@ -41,7 +42,5 @@ components:
additionalProperties:
type: object
required:
- aggregations
- rest_actions
- since
- timestamp
11 changes: 11 additions & 0 deletions tests/default/nodes/stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,14 @@ chapters:
- search
response:
status: 200
- synopsis: Get statistics for search (`node_id`).
path: /_nodes/{node_id}/stats/{metric}/{index_metric}
method: GET
parameters:
node_id: _all
metric:
- indices
index_metric:
- search
response:
status: 200
60 changes: 60 additions & 0 deletions tests/default/nodes/usage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test nodes usage.
chapters:
- synopsis: Get usage for all nodes.
path: /_nodes/usage
method: GET
response:
status: 200
- synopsis: Get usage for all nodes for all metrics.
path: /_nodes/usage/{metric}
method: GET
parameters:
metric:
- _all
response:
status: 200
- synopsis: Get usage for all nodes for the `rest_actions` metric.
path: /_nodes/usage/{metric}
method: GET
parameters:
metric:
- rest_actions
response:
status: 200
- synopsis: Get usage for all nodes for the `aggregations` metric.
path: /_nodes/usage/{metric}
method: GET
parameters:
metric:
- aggregations
response:
status: 200
- synopsis: Get usage for all nodes (`node_id`).
path: /_nodes/{node_id}/usage
method: GET
parameters:
node_id: _all
response:
status: 200
- synopsis: Get usage for all nodes for all metrics (`node_id`).
path: /_nodes/{node_id}/usage/{metric}
method: GET
parameters:
node_id: _all
metric:
- _all
response:
status: 200
- synopsis: Get usage for all nodes and all metrics.
warnings:
multiple-paths-detected: false
path: /_nodes/{node_id}/{metric}
method: GET
parameters:
node_id: _all
metric:
- _all
response:
status: 200

0 comments on commit 5e799c7

Please sign in to comment.