mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 09:54:55 +00:00
Added base TransportAction class for master read operations that execute locally or not depending on the request class (local flag). Added support for local flag where missing, in a backwards compatible manner: - IndicesExistsRequest - GetAliasesRequest (get alias api, aliases exist api) - TypesExistsRequest - GetIndexTemplatesRequest (get template, template exists) - GetSettingsRequest - GetRepositoriesRequest - PendingClusterTasks Added parsing of the local flag where missing in Rest*Action. Updated SPEC adding local flag param where missing and added REST tests that contain use of the local flag where it was just added. Closes #3345
46 lines
822 B
YAML
46 lines
822 B
YAML
setup:
|
|
- do:
|
|
indices.put_template:
|
|
name: test
|
|
body:
|
|
template: test-*
|
|
settings:
|
|
number_of_shards: 1
|
|
number_of_replicas: 0
|
|
|
|
---
|
|
"Get template":
|
|
|
|
- do:
|
|
indices.get_template:
|
|
name: test
|
|
|
|
- match: {test.template: "test-*"}
|
|
- match: {test.settings: {index.number_of_shards: '1', index.number_of_replicas: '0'}}
|
|
---
|
|
"Get all templates":
|
|
|
|
- do:
|
|
indices.put_template:
|
|
name: test2
|
|
body:
|
|
template: test2-*
|
|
settings:
|
|
number_of_shards: 1
|
|
|
|
- do:
|
|
indices.get_template: {}
|
|
|
|
- match: {test.template: "test-*"}
|
|
- match: {test2.template: "test2-*"}
|
|
|
|
---
|
|
"Get template with local flag":
|
|
|
|
- do:
|
|
indices.get_template:
|
|
name: test
|
|
local: true
|
|
|
|
- is_true: test
|