Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
{
"indices.resolve_cluster":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html",
"description":"Resolves the specified index expressions to return information about each cluster, including the local cluster, if included."
"indices.resolve_cluster": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html",
"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."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
"stability": "stable",
"visibility": "public",
"headers": {
"accept": ["application/json"]
},
"url":{
"paths":[
"url": {
"paths": [
{
"path":"/_resolve/cluster/{name}",
"methods":[
"GET"
],
"parts":{
"name":{
"type":"list",
"description":"A comma-separated list of cluster:index names or wildcard expressions"
"path": "/_resolve/cluster",
"methods": ["GET"]
},
{
"path": "/_resolve/cluster/{name}",
"methods": ["GET"],
"parts": {
"name": {
"type": "list",
"description": "A comma-separated list of cluster:index names or wildcard expressions"
}
}
}
]
},
"params":{
"ignore_unavailable":{
"type":"boolean",
"description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
"params": {
"ignore_unavailable": {
"type": "boolean",
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression."
},
"ignore_throttled": {
"type": "boolean",
"description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression."
},
"ignore_throttled":{
"type":"boolean",
"description":"Whether specified concrete, expanded or aliased indices should be ignored when throttled"
"allow_no_indices": {
"type": "boolean",
"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."
},
"allow_no_indices":{
"type":"boolean",
"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)"
"expand_wildcards": {
"type": "enum",
"options": ["open", "closed", "hidden", "none", "all"],
"default": "open",
"description": "Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression."
},
"expand_wildcards":{
"type":"enum",
"options":[
"open",
"closed",
"hidden",
"none",
"all"
],
"default":"open",
"description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
"timeout": {
"type": "time",
"description": "The maximum time to wait for remote clusters to respond"
}
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ setup:
- do:
indices.resolve_cluster:
name: '*'
expand_wildcards: [closed]
expand_wildcards: closed

- match: {(local).connected: true}
- match: {(local).skip_unavailable: false}
Expand All @@ -65,7 +65,7 @@ setup:
- do:
indices.resolve_cluster:
name: 'index2*'
expand_wildcards: [open,closed]
expand_wildcards: open,closed

- match: {(local).connected: true}
- match: {(local).skip_unavailable: false}
Expand All @@ -75,7 +75,7 @@ setup:
- do:
indices.resolve_cluster:
name: 'index2*'
expand_wildcards: [closed]
expand_wildcards: closed

- match: {(local).connected: true}
- match: {(local).skip_unavailable: false}
Expand Down Expand Up @@ -115,7 +115,7 @@ setup:
- do:
indices.resolve_cluster:
name: 'my_alias2,doesnotexist*'
expand_wildcards: [all]
expand_wildcards: all

- match: {(local).connected: true}
- match: {(local).skip_unavailable: false}
Expand All @@ -141,10 +141,10 @@ setup:
- do:
indices.resolve_cluster:
name: '*'
expand_wildcards: [all]
ignore_unavailable: [true]
ignore_throttled: [true]
allow_no_indices: [true]
expand_wildcards: all
ignore_unavailable: true
ignore_throttled: true
allow_no_indices: true
allowed_warnings:
- "[ignore_throttled] parameter is deprecated because frozen indices have been deprecated. Consider cold or frozen tiers in place of frozen indices."

Expand All @@ -157,10 +157,10 @@ setup:
- do:
indices.resolve_cluster:
name: '*'
expand_wildcards: [open]
ignore_unavailable: [false]
ignore_throttled: [false]
allow_no_indices: [false]
expand_wildcards: open
ignore_unavailable: false
ignore_throttled: false
allow_no_indices: false
allowed_warnings:
- "[ignore_throttled] parameter is deprecated because frozen indices have been deprecated. Consider cold or frozen tiers in place of frozen indices."

Expand All @@ -170,3 +170,14 @@ setup:
- is_false: (local).error # should not be present
- exists: (local).version.number

---
"Resolve cluster with no index expression":
- requires:
cluster_features: ["gte_v8.18.0"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use capabilities instead of direct version numbers? I'm still a bit confused in which case what is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good follow-on ticket. I've not added any capabilities for the stuff we've been doing so far, but also not sure the yaml tests support capability based checks. This is the standard way to do it for yaml tests (see higher up in the yaml doc for the 8.13 restrictions).

reason: "resolve cluster with no index expression introduced in 8.18"

- do:
indices.resolve_cluster:
timeout: 400s

- is_false: (local).error # should not be present - body should be empty since no remotes configured