Skip to content

Commit 7050a37

Browse files
authored
Move migrate APIs to rest-api-spec indices namespace (#120580) (#120641)
1 parent 72ab00d commit 7050a37

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/migrate.cancel_reindex.json renamed to rest-api-spec/src/main/resources/rest-api-spec/api/indices.cancel_migrate_reindex.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"migrate.cancel_reindex":{
2+
"indices.cancel_migrate_reindex":{
33
"documentation":{
44
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html",
55
"description":"This API returns the status of a migration reindex attempt for a data stream or index"

rest-api-spec/src/main/resources/rest-api-spec/api/migrate.create_from.json renamed to rest-api-spec/src/main/resources/rest-api-spec/api/indices.create_from.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"migrate.create_from":{
2+
"indices.create_from":{
33
"documentation":{
44
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html",
55
"description":"This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values."

rest-api-spec/src/main/resources/rest-api-spec/api/migrate.get_reindex_status.json renamed to rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_migrate_reindex_status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"migrate.get_reindex_status":{
2+
"indices.get_migrate_reindex_status":{
33
"documentation":{
44
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html",
55
"description":"This API returns the status of a migration reindex attempt for a data stream or index"

rest-api-spec/src/main/resources/rest-api-spec/api/migrate.reindex.json renamed to rest-api-spec/src/main/resources/rest-api-spec/api/indices.migrate_reindex.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"migrate.reindex":{
2+
"indices.migrate_reindex":{
33
"documentation":{
44
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html",
55
"description":"This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task"

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/migrate/10_reindex.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setup:
1515
capabilities: [migration_reindex]
1616
- do:
1717
catch: /illegal_argument_exception/
18-
migrate.reindex:
18+
indices.migrate_reindex:
1919
body: |
2020
{
2121
"mode": "unsupported_mode",
@@ -35,7 +35,7 @@ setup:
3535
capabilities: [migration_reindex]
3636
- do:
3737
catch: /resource_not_found_exception/
38-
migrate.reindex:
38+
indices.migrate_reindex:
3939
body: |
4040
{
4141
"mode": "upgrade",
@@ -46,7 +46,7 @@ setup:
4646
4747
- do:
4848
catch: /resource_not_found_exception/
49-
migrate.reindex:
49+
indices.migrate_reindex:
5050
body: |
5151
{
5252
"mode": "upgrade",
@@ -67,7 +67,7 @@ setup:
6767
capabilities: [migration_reindex]
6868
- do:
6969
catch: /illegal_argument_exception/
70-
migrate.reindex:
70+
indices.migrate_reindex:
7171
body: |
7272
{
7373
"mode": "upgrade",
@@ -105,7 +105,7 @@ setup:
105105
- is_true: acknowledged
106106

107107
- do:
108-
migrate.reindex:
108+
indices.migrate_reindex:
109109
body: |
110110
{
111111
"mode": "upgrade",
@@ -116,11 +116,11 @@ setup:
116116
- match: { acknowledged: true }
117117

118118
- do:
119-
migrate.cancel_reindex:
119+
indices.cancel_migrate_reindex:
120120
index: "my-data-stream"
121121
- match: { acknowledged: true }
122122

123123
- do:
124124
catch: /resource_not_found_exception/
125-
migrate.cancel_reindex:
125+
indices.cancel_migrate_reindex:
126126
index: "my-data-stream"

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/migrate/20_reindex_status.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setup:
1515
capabilities: [migration_reindex]
1616
- do:
1717
catch: /resource_not_found_exception/
18-
migrate.get_reindex_status:
18+
indices.get_migrate_reindex_status:
1919
index: "does_not_exist"
2020

2121
---
@@ -47,7 +47,7 @@ setup:
4747
- is_true: acknowledged
4848

4949
- do:
50-
migrate.reindex:
50+
indices.migrate_reindex:
5151
body: |
5252
{
5353
"mode": "upgrade",
@@ -58,7 +58,7 @@ setup:
5858
- match: { acknowledged: true }
5959

6060
- do:
61-
migrate.get_reindex_status:
61+
indices.get_migrate_reindex_status:
6262
index: "my-data-stream"
6363
- match: { complete: true }
6464
- match: { total_indices_in_data_stream: 1 }
@@ -69,16 +69,16 @@ setup:
6969
- match: { errors: [] }
7070

7171
- do:
72-
migrate.cancel_reindex:
72+
indices.cancel_migrate_reindex:
7373
index: "my-data-stream"
7474
- match: { acknowledged: true }
7575

7676
- do:
7777
catch: /resource_not_found_exception/
78-
migrate.cancel_reindex:
78+
indices.cancel_migrate_reindex:
7979
index: "my-data-stream"
8080

8181
- do:
8282
catch: /resource_not_found_exception/
83-
migrate.get_reindex_status:
83+
indices.get_migrate_reindex_status:
8484
index: "my-data-stream"

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/migrate/30_create_from.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ teardown:
2626
capabilities: [migration_reindex]
2727
- do:
2828
catch: /index_not_found_exception/
29-
migrate.create_from:
29+
indices.create_from:
3030
source: "does_not_exist"
3131
dest: "dest1"
3232

@@ -53,7 +53,7 @@ teardown:
5353
bar:
5454
type: text
5555
- do:
56-
migrate.create_from:
56+
indices.create_from:
5757
source: "source-index-1"
5858
dest: "dest-index-1"
5959
- do:
@@ -91,7 +91,7 @@ teardown:
9191
foo:
9292
type: boolean
9393
- do:
94-
migrate.create_from:
94+
indices.create_from:
9595
source: "source-index-1"
9696
dest: "dest-index-1"
9797
body:
@@ -139,7 +139,7 @@ teardown:
139139
number_of_shards: 1
140140
number_of_replicas: 0
141141
- do:
142-
migrate.create_from:
142+
indices.create_from:
143143
source: "source-index-1"
144144
dest: "dest-index-1"
145145
body:

0 commit comments

Comments
 (0)