diff --git a/x-pack/plugin/ccr/qa/multi-cluster-with-security/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexSecurityIT.java b/x-pack/plugin/ccr/qa/multi-cluster-with-security/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexSecurityIT.java index ec4306b9e5f59..7d658550d92b9 100644 --- a/x-pack/plugin/ccr/qa/multi-cluster-with-security/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexSecurityIT.java +++ b/x-pack/plugin/ccr/qa/multi-cluster-with-security/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexSecurityIT.java @@ -76,7 +76,7 @@ public void testFollowIndex() throws Exception { createAndFollowIndex("leader_cluster:" + allowedIndex, allowedIndex); assertBusy(() -> verifyDocuments(client(), allowedIndex, numDocs)); assertThat(countCcrNodeTasks(), equalTo(1)); - assertOK(client().performRequest(new Request("POST", "/" + allowedIndex + "/_xpack/ccr/_unfollow"))); + assertOK(client().performRequest(new Request("POST", "/" + allowedIndex + "/_ccr/unfollow"))); // Make sure that there are no other ccr relates operations running: assertBusy(() -> { Map clusterState = toMap(adminClient().performRequest(new Request("GET", "/_cluster/state"))); @@ -87,7 +87,7 @@ public void testFollowIndex() throws Exception { followIndex("leader_cluster:" + allowedIndex, allowedIndex); assertThat(countCcrNodeTasks(), equalTo(1)); - assertOK(client().performRequest(new Request("POST", "/" + allowedIndex + "/_xpack/ccr/_unfollow"))); + assertOK(client().performRequest(new Request("POST", "/" + allowedIndex + "/_ccr/unfollow"))); // Make sure that there are no other ccr relates operations running: assertBusy(() -> { Map clusterState = toMap(adminClient().performRequest(new Request("GET", "/_cluster/state"))); @@ -144,13 +144,13 @@ private static void refresh(String index) throws IOException { } private static void followIndex(String leaderIndex, String followIndex) throws IOException { - final Request request = new Request("POST", "/" + followIndex + "/_xpack/ccr/_follow"); + final Request request = new Request("POST", "/" + followIndex + "/_ccr/follow"); request.setJsonEntity("{\"leader_index\": \"" + leaderIndex + "\", \"idle_shard_retry_delay\": \"10ms\"}"); assertOK(client().performRequest(request)); } private static void createAndFollowIndex(String leaderIndex, String followIndex) throws IOException { - final Request request = new Request("POST", "/" + followIndex + "/_xpack/ccr/_create_and_follow"); + final Request request = new Request("POST", "/" + followIndex + "/_ccr/create_and_follow"); request.setJsonEntity("{\"leader_index\": \"" + leaderIndex + "\", \"idle_shard_retry_delay\": \"10ms\"}"); assertOK(client().performRequest(request)); } diff --git a/x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexIT.java b/x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexIT.java index cd3d92f2fb31c..c14e13e7bb050 100644 --- a/x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexIT.java +++ b/x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr/FollowIndexIT.java @@ -94,19 +94,19 @@ private static void refresh(String index) throws IOException { } private static void followIndex(String leaderIndex, String followIndex) throws IOException { - final Request request = new Request("POST", "/" + followIndex + "/_xpack/ccr/_follow"); + final Request request = new Request("POST", "/" + followIndex + "/_ccr/follow"); request.setJsonEntity("{\"leader_index\": \"" + leaderIndex + "\", \"idle_shard_retry_delay\": \"10ms\"}"); assertOK(client().performRequest(request)); } private static void createAndFollowIndex(String leaderIndex, String followIndex) throws IOException { - final Request request = new Request("POST", "/" + followIndex + "/_xpack/ccr/_create_and_follow"); + final Request request = new Request("POST", "/" + followIndex + "/_ccr/create_and_follow"); request.setJsonEntity("{\"leader_index\": \"" + leaderIndex + "\", \"idle_shard_retry_delay\": \"10ms\"}"); assertOK(client().performRequest(request)); } private static void unfollowIndex(String followIndex) throws IOException { - assertOK(client().performRequest(new Request("POST", "/" + followIndex + "/_xpack/ccr/_unfollow"))); + assertOK(client().performRequest(new Request("POST", "/" + followIndex + "/_ccr/unfollow"))); } private static void verifyDocuments(String index, int expectedNumDocs) throws IOException { diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestCreateAndFollowIndexAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestCreateAndFollowIndexAction.java index 7683311f812e0..4d9079b36c943 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestCreateAndFollowIndexAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestCreateAndFollowIndexAction.java @@ -21,12 +21,12 @@ public class RestCreateAndFollowIndexAction extends BaseRestHandler { public RestCreateAndFollowIndexAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, "/{index}/_xpack/ccr/_create_and_follow", this); + controller.registerHandler(RestRequest.Method.POST, "/{index}/_ccr/create_and_follow", this); } @Override public String getName() { - return "xpack_ccr_create_and_follow_index_action"; + return "ccr_create_and_follow_index_action"; } @Override diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestFollowIndexAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestFollowIndexAction.java index 845b06987db3f..88f5b74f4b141 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestFollowIndexAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestFollowIndexAction.java @@ -22,12 +22,12 @@ public class RestFollowIndexAction extends BaseRestHandler { public RestFollowIndexAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, "/{index}/_xpack/ccr/_follow", this); + controller.registerHandler(RestRequest.Method.POST, "/{index}/_ccr/follow", this); } @Override public String getName() { - return "xpack_ccr_follow_index_action"; + return "ccr_follow_index_action"; } @Override diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestUnfollowIndexAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestUnfollowIndexAction.java index 4682399dbdd87..2df6c77379b24 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestUnfollowIndexAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/rest/RestUnfollowIndexAction.java @@ -21,12 +21,12 @@ public class RestUnfollowIndexAction extends BaseRestHandler { public RestUnfollowIndexAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, "/{index}/_xpack/ccr/_unfollow", this); + controller.registerHandler(RestRequest.Method.POST, "/{index}/_ccr/unfollow", this); } @Override public String getName() { - return "xpack_ccr_unfollow_index_action"; + return "ccr_unfollow_index_action"; } @Override diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.create_and_follow_index.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json similarity index 74% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.create_and_follow_index.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json index 56e87dd0d8c8a..46ff872a1a44c 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.create_and_follow_index.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json @@ -1,10 +1,10 @@ { - "xpack.ccr.create_and_follow_index": { + "ccr.create_and_follow_index": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current", "methods": [ "POST" ], "url": { - "path": "/{index}/_xpack/ccr/_create_and_follow", - "paths": [ "/{index}/_xpack/ccr/_create_and_follow" ], + "path": "/{index}/_ccr/create_and_follow", + "paths": [ "/{index}/_ccr/create_and_follow" ], "parts": { "index": { "type": "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.follow_index.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.follow_index.json similarity index 78% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.follow_index.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.follow_index.json index 1d03eb0839b15..749aae48d912f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.follow_index.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.follow_index.json @@ -1,10 +1,10 @@ { - "xpack.ccr.follow_index": { + "ccr.follow_index": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current", "methods": [ "POST" ], "url": { - "path": "/{index}/_xpack/ccr/_follow", - "paths": [ "/{index}/_xpack/ccr/_follow" ], + "path": "/{index}/_ccr/follow", + "paths": [ "/{index}/_ccr/follow" ], "parts": { "index": { "type": "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.unfollow_index.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json similarity index 72% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.unfollow_index.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json index 394e81b249abe..5e9a111496aa6 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.ccr.unfollow_index.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json @@ -1,10 +1,10 @@ { - "xpack.ccr.unfollow_index": { + "ccr.unfollow_index": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current", "methods": [ "POST" ], "url": { - "path": "/{index}/_xpack/ccr/_unfollow", - "paths": [ "/{index}/_xpack/ccr/_unfollow" ], + "path": "/{index}/_ccr/unfollow", + "paths": [ "/{index}/_ccr/unfollow" ], "parts": { "index": { "type": "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml index f39c0edca5ced..6c95f307c256e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml @@ -16,7 +16,7 @@ - is_true: acknowledged - do: - xpack.ccr.create_and_follow_index: + ccr.create_and_follow_index: index: bar body: leader_index: foo @@ -25,18 +25,18 @@ - is_true: index_following_started - do: - xpack.ccr.unfollow_index: + ccr.unfollow_index: index: bar - is_true: acknowledged - do: - xpack.ccr.follow_index: + ccr.follow_index: index: bar body: leader_index: foo - is_true: acknowledged - do: - xpack.ccr.unfollow_index: + ccr.unfollow_index: index: bar - is_true: acknowledged