Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ILM, ILM endpoints and drop _xpack #32564

Merged
Show file tree
Hide file tree
Changes from 2 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
Expand Up @@ -83,7 +83,7 @@ public void testSetIndexLifecyclePolicy() throws Exception {
" }\n" +
"}";
HttpEntity entity = new NStringEntity(jsonString, ContentType.APPLICATION_JSON);
Request request = new Request("PUT", "/_xpack/index_lifecycle/" + policy);
Request request = new Request("PUT", "/_index_lifecycle/" + policy);
request.setEntity(entity);
client().performRequest(request);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

public class IndexLifecycle extends Plugin implements ActionPlugin {
public static final String NAME = "index_lifecycle";
public static final String BASE_PATH = "/_xpack/index_lifecycle/";
public static final String BASE_PATH = "/_index_lifecycle/";
private final SetOnce<IndexLifecycleService> indexLifecycleInitialisationService = new SetOnce<>();
private Settings settings;
private boolean enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public RestDeleteLifecycleAction(Settings settings, RestController controller) {

@Override
public String getName() {
return "xpack_lifecycle_delete_action";
return "index_lifecycle_delete_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public RestExplainLifecycleAction(Settings settings, RestController controller)

@Override
public String getName() {
return "xpack_lifecycle_explain_action";
return "index_lifecycle_explain_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RestGetLifecycleAction(Settings settings, RestController controller) {

@Override
public String getName() {
return "xpack_lifecycle_get_action";
return "index_lifecycle_get_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public RestGetStatusAction(Settings settings, RestController controller) {

@Override
public String getName() {
return "xpack_lifecycle_get_operation_mode_action";
return "index_lifecycle_get_operation_mode_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public class RestMoveToStepAction extends BaseRestHandler {

public RestMoveToStepAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(RestRequest.Method.POST, IndexLifecycle.BASE_PATH + "_move/{name}", this);
controller.registerHandler(RestRequest.Method.POST, IndexLifecycle.BASE_PATH + "/move/{name}", this);
}

@Override
public String getName() {
return "xpack_lifecycle_move_to_step_action";
return "index_lifecycle_move_to_step_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RestPutLifecycleAction(Settings settings, RestController controller) {

@Override
public String getName() {
return "xpack_lifecycle_put_action";
return "index_lifecycle_put_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RestRetryAction(Settings settings, RestController controller) {

@Override
public String getName() {
return "xpack_lifecycle_retry_action";
return "index_lifecycle_retry_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public class RestStartAction extends BaseRestHandler {
public RestStartAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(RestRequest.Method.POST,
IndexLifecycle.BASE_PATH + "_start", this);
IndexLifecycle.BASE_PATH + "start", this);
}

@Override
public String getName() {
return "xpack_lifecycle_start_action";
return "index_lifecycle_start_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public class RestStopAction extends BaseRestHandler {
public RestStopAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(RestRequest.Method.POST,
IndexLifecycle.BASE_PATH + "_stop", this);
IndexLifecycle.BASE_PATH + "stop", this);
}

@Override
public String getName() {
return "xpack_lifecycle_stop_action";
return "index_lifecycle_stop_action";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void createNewSingletonPolicy(String phaseName, LifecycleAction action)
lifecyclePolicy.toXContent(builder, null);
final StringEntity entity = new StringEntity(
"{ \"policy\":" + Strings.toString(builder) + "}", ContentType.APPLICATION_JSON);
Request request = new Request("PUT", "_xpack/index_lifecycle/" + policy);
Request request = new Request("PUT", "_index_lifecycle/" + policy);
request.setEntity(entity);
client().performRequest(request);
}
Expand Down