Skip to content

Commit 60c63fc

Browse files
committed
Updated spec and added additional test for resolve/cluster
1 parent e9aec28 commit 60c63fc

File tree

2 files changed

+51
-39
lines changed

2 files changed

+51
-39
lines changed
Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
{
2-
"indices.resolve_cluster":{
3-
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html",
5-
"description":"Resolves the specified index expressions to return information about each cluster, including the local cluster, if included."
2+
"indices.resolve_cluster": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html",
5+
"description": "Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster."
66
},
7-
"stability":"stable",
8-
"visibility":"public",
9-
"headers":{
10-
"accept": [ "application/json"]
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
1111
},
12-
"url":{
13-
"paths":[
12+
"url": {
13+
"paths": [
1414
{
15-
"path":"/_resolve/cluster/{name}",
16-
"methods":[
17-
"GET"
18-
],
19-
"parts":{
20-
"name":{
21-
"type":"list",
22-
"description":"A comma-separated list of cluster:index names or wildcard expressions"
15+
"path": "/_resolve/cluster",
16+
"methods": ["GET"]
17+
},
18+
{
19+
"path": "/_resolve/cluster/{name}",
20+
"methods": ["GET"],
21+
"parts": {
22+
"name": {
23+
"type": "list",
24+
"description": "A comma-separated list of cluster:index names or wildcard expressions"
2325
}
2426
}
2527
}
2628
]
2729
},
28-
"params":{
29-
"ignore_unavailable":{
30-
"type":"boolean",
31-
"description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
30+
"params": {
31+
"ignore_unavailable": {
32+
"type": "boolean",
33+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression."
34+
},
35+
"ignore_throttled": {
36+
"type": "boolean",
37+
"description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression."
3238
},
33-
"ignore_throttled":{
34-
"type":"boolean",
35-
"description":"Whether specified concrete, expanded or aliased indices should be ignored when throttled"
39+
"allow_no_indices": {
40+
"type": "boolean",
41+
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression."
3642
},
37-
"allow_no_indices":{
38-
"type":"boolean",
39-
"description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
43+
"expand_wildcards": {
44+
"type": "enum",
45+
"options": ["open", "closed", "hidden", "none", "all"],
46+
"default": "open",
47+
"description": "Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression."
4048
},
41-
"expand_wildcards":{
42-
"type":"enum",
43-
"options":[
44-
"open",
45-
"closed",
46-
"hidden",
47-
"none",
48-
"all"
49-
],
50-
"default":"open",
51-
"description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
49+
"timeout": {
50+
"type": "time",
51+
"description": "The maximum time to wait for remote clusters to respond"
5252
}
5353
}
5454
}
5555
}
56+

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.resolve_cluster/10_basic_resolve_cluster.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,14 @@ setup:
170170
- is_false: (local).error # should not be present
171171
- exists: (local).version.number
172172

173+
---
174+
"Resolve cluster with no index expression":
175+
- requires:
176+
cluster_features: ["gte_v8.18.0"]
177+
reason: "resolve cluster with no index expression introduced in 8.18"
178+
179+
- do:
180+
indices.resolve_cluster:
181+
timeout: 400s
182+
183+
- is_false: (local).error # should not be present - body should be empty since no remotes configured

0 commit comments

Comments
 (0)