Renames endpoints for setting and deleting ILM policies# (#31552)

This commit is contained in:
Colin Goodheart-Smithe 2018-06-25 17:18:50 +01:00 committed by GitHub
parent 6be94dbecd
commit b848ff27a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 11 deletions

View File

@ -13,7 +13,6 @@ import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.rest.action.RestToXContentListener;
import org.elasticsearch.xpack.core.indexlifecycle.action.RemovePolicyForIndexAction;
import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle;
import java.io.IOException;
@ -21,8 +20,8 @@ public class RestRemovePolicyForIndexAction extends BaseRestHandler {
public RestRemovePolicyForIndexAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(RestRequest.Method.PUT, "_" + IndexLifecycle.NAME + "/remove_policy", this);
controller.registerHandler(RestRequest.Method.PUT, "{index}/_" + IndexLifecycle.NAME + "/remove_policy", this);
controller.registerHandler(RestRequest.Method.DELETE, "_lifecycle", this);
controller.registerHandler(RestRequest.Method.DELETE, "{index}/_lifecycle", this);
}
@Override

View File

@ -13,7 +13,6 @@ import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.rest.action.RestToXContentListener;
import org.elasticsearch.xpack.core.indexlifecycle.action.SetPolicyForIndexAction;
import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle;
import java.io.IOException;
@ -21,8 +20,8 @@ public class RestSetPolicyForIndexAction extends BaseRestHandler {
public RestSetPolicyForIndexAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(RestRequest.Method.PUT, "_" + IndexLifecycle.NAME + "/set_policy/{new_policy}", this);
controller.registerHandler(RestRequest.Method.PUT, "{index}/_" + IndexLifecycle.NAME + "/set_policy/{new_policy}", this);
controller.registerHandler(RestRequest.Method.PUT, "_lifecycle/{new_policy}", this);
controller.registerHandler(RestRequest.Method.PUT, "{index}/_lifecycle/{new_policy}", this);
}
@Override

View File

@ -1,10 +1,10 @@
{
"xpack.index_lifecycle.remove_policy": {
"documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html",
"methods": [ "PUT" ],
"methods": [ "DELETE" ],
"url": {
"path": "/{index}/_index_lifecycle/remove_policy",
"paths": ["/{index}/_index_lifecycle/remove_policy", "/_index_lifecycle/remove_policy"],
"path": "/{index}/_lifecycle",
"paths": ["/{index}/_lifecycle", "/_lifecycle"],
"parts": {
"index": {
"type" : "string",

View File

@ -3,8 +3,8 @@
"documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html",
"methods": [ "PUT" ],
"url": {
"path": "/{index}/_index_lifecycle/set_policy/{new_policy}",
"paths": ["/{index}/_index_lifecycle/set_policy/{new_policy}", "/_index_lifecycle/set_policy/{new_policy}"],
"path": "/{index}/_lifecycle/{new_policy}",
"paths": ["/{index}/_lifecycle/{new_policy}", "/_lifecycle/{new_policy}"],
"parts": {
"index": {
"type" : "string",