diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java index 3f89d9c061dfe..23d51f7b3f139 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java @@ -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", "/_ilm/" + policy); request.setEntity(entity); client().performRequest(request); diff --git a/x-pack/build.gradle b/x-pack/build.gradle index ee555fbd88764..0672474fdf317 100644 --- a/x-pack/build.gradle +++ b/x-pack/build.gradle @@ -44,7 +44,7 @@ subprojects { ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-core:${version}": xpackModule('core')] ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-deprecation:${version}": xpackModule('deprecation')] ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-graph:${version}": xpackModule('graph')] - ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-index-lifecycle:${version}": xpackModule('index-lifecycle')] + ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ilm:${version}": xpackModule('ilm')] ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-logstash:${version}": xpackModule('logstash')] ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ml:${version}": xpackModule('ml')] ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-monitoring:${version}": xpackModule('monitoring')] diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java index 0c15364e22803..bfcd4285eb1e5 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.core; import org.elasticsearch.common.network.NetworkModule; @@ -74,7 +75,7 @@ private XPackSettings() { /** * Setting for enabling or disabling the index lifecycle extension. Defaults to true. */ - public static final Setting INDEX_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.index_lifecycle.enabled", true, + public static final Setting INDEX_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.ilm.enabled", true, Setting.Property.NodeScope); /** Setting for enabling or disabling TLS. Defaults to false. */ diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java index 7ae258eb4433b..ba962d635ee6e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; @@ -19,7 +20,7 @@ public class DeleteLifecycleAction extends Action { public static final DeleteLifecycleAction INSTANCE = new DeleteLifecycleAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/delete"; + public static final String NAME = "cluster:admin/ilm/delete"; protected DeleteLifecycleAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/ExplainLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/ExplainLifecycleAction.java index bd8359896533d..de1e6f26cd783 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/ExplainLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/ExplainLifecycleAction.java @@ -23,7 +23,7 @@ public class ExplainLifecycleAction extends Action { public static final ExplainLifecycleAction INSTANCE = new ExplainLifecycleAction(); - public static final String NAME = "indices:admin/xpack/index_lifecycle/explain"; + public static final String NAME = "indices:admin/ilm/explain"; protected ExplainLifecycleAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java index a5d381ec552b6..de3002994581e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; @@ -23,7 +24,7 @@ public class GetLifecycleAction extends Action { public static final GetLifecycleAction INSTANCE = new GetLifecycleAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/get"; + public static final String NAME = "cluster:admin/ilm/get"; protected GetLifecycleAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetStatusAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetStatusAction.java index 30213604f37a2..40765f0aa6650 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetStatusAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetStatusAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; @@ -21,7 +22,7 @@ public class GetStatusAction extends Action { public static final GetStatusAction INSTANCE = new GetStatusAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/operation_mode/get"; + public static final String NAME = "cluster:admin/ilm/operation_mode/get"; protected GetStatusAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java index ca6cfdbeeb162..e92502d4ef526 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java @@ -25,7 +25,7 @@ public class MoveToStepAction extends Action { public static final MoveToStepAction INSTANCE = new MoveToStepAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/_move/post"; + public static final String NAME = "cluster:admin/ilm/_move/post"; protected MoveToStepAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java index 69852101a4cd2..42df0964057f1 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java @@ -24,7 +24,7 @@ public class PutLifecycleAction extends Action { public static final PutLifecycleAction INSTANCE = new PutLifecycleAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/put"; + public static final String NAME = "cluster:admin/ilm/put"; protected PutLifecycleAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutOperationModeAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutOperationModeAction.java index 0a684dc607f33..3098fb02391a5 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutOperationModeAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutOperationModeAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; @@ -19,7 +20,7 @@ public class PutOperationModeAction extends Action { public static final PutOperationModeAction INSTANCE = new PutOperationModeAction(); - public static final String NAME = "cluster:admin/xpack/index_lifecycle/operation_mode/set"; + public static final String NAME = "cluster:admin/ilm/operation_mode/set"; protected PutOperationModeAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RemovePolicyForIndexAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RemovePolicyForIndexAction.java index ed03c731e0c8a..8a3a47109e862 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RemovePolicyForIndexAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RemovePolicyForIndexAction.java @@ -26,7 +26,7 @@ public class RemovePolicyForIndexAction extends Action { public static final RemovePolicyForIndexAction INSTANCE = new RemovePolicyForIndexAction(); - public static final String NAME = "indices:admin/xpack/index_lifecycle/remove_policy"; + public static final String NAME = "indices:admin/ilm/remove_policy"; protected RemovePolicyForIndexAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java index bbcb34a064598..6af7f2de6f0b7 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java @@ -2,8 +2,8 @@ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. - * */ + package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; @@ -23,7 +23,7 @@ public class RetryAction extends Action { public static final RetryAction INSTANCE = new RetryAction(); - public static final String NAME = "indices:admin/xpack/index_lifecycle/retry"; + public static final String NAME = "indices:admin/ilm/retry"; protected RetryAction() { super(NAME); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/SetIndexLifecyclePolicyAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/SetIndexLifecyclePolicyAction.java index e0d979c69a96e..7b286c5ff8428 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/SetIndexLifecyclePolicyAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/SetIndexLifecyclePolicyAction.java @@ -12,7 +12,7 @@ public class SetIndexLifecyclePolicyAction extends Action { public static final SetIndexLifecyclePolicyAction INSTANCE = new SetIndexLifecyclePolicyAction(); - public static final String NAME = "indices:admin/xpack/index_lifecycle/set_index_policy"; + public static final String NAME = "indices:admin/ilm/set_index_policy"; protected SetIndexLifecyclePolicyAction() { super(NAME); diff --git a/x-pack/plugin/index-lifecycle/build.gradle b/x-pack/plugin/ilm/build.gradle similarity index 83% rename from x-pack/plugin/index-lifecycle/build.gradle rename to x-pack/plugin/ilm/build.gradle index 635ab6d8829a6..409c52eca689b 100644 --- a/x-pack/plugin/index-lifecycle/build.gradle +++ b/x-pack/plugin/ilm/build.gradle @@ -3,14 +3,14 @@ evaluationDependsOn(xpackModule('core')) apply plugin: 'elasticsearch.esplugin' esplugin { - name 'x-pack-index-lifecycle' - description 'Elasticsearch Expanded Pack Plugin - Index Lifecycle' + name 'x-pack-ilm' + description 'Elasticsearch Expanded Pack Plugin - Index Lifecycle Management' classname 'org.elasticsearch.xpack.indexlifecycle.IndexLifecycle' extendedPlugins = ['x-pack-core'] hasNativeController false requiresKeystore true } -archivesBaseName = 'x-pack-index-lifecycle' +archivesBaseName = 'x-pack-ilm' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'shadow') @@ -19,12 +19,12 @@ dependencies { integTestCluster { numNodes = 2 - clusterName = 'index-lifecycle' + clusterName = 'ilm' setting 'xpack.security.enabled', 'false' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.ml.enabled', 'false' - setting 'xpack.index_lifecycle.enabled', 'true' + setting 'xpack.ilm.enabled', 'true' setting 'indices.lifecycle.poll_interval', '500ms' module project(xpackModule('core')) } diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java index cf0f94759fa9b..57276faf9eafa 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTask.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.apache.logging.log4j.Logger; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java index 3583d79641a13..48acf5c701ee0 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycle.java @@ -78,7 +78,6 @@ public class IndexLifecycle extends Plugin implements ActionPlugin { public static final String NAME = "index_lifecycle"; - public static final String BASE_PATH = "/_xpack/index_lifecycle/"; private final SetOnce indexLifecycleInitialisationService = new SetOnce<>(); private Settings settings; private boolean enabled; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleFeatureSet.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleFeatureSet.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleFeatureSet.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleFeatureSet.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java index 3a1489b974b6f..a34810ba8899a 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunner.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.indexlifecycle; import com.carrotsearch.hppc.cursors.ObjectCursor; - import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.support.TransportAction; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleService.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleService.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleService.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleService.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTask.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTask.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTask.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTask.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTask.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTask.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTask.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTask.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTask.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java index da57e9fa40474..16a6a4b94f842 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTask.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.elasticsearch.ElasticsearchException; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java index c8dd1969bf34d..436f8637a0228 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/TimeValueSchedule.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.elasticsearch.common.unit.TimeValue; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java similarity index 87% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java index 953197c8ee077..3c001e6951e93 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestDeleteLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -12,7 +13,6 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.DeleteLifecycleAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; import java.io.IOException; @@ -20,13 +20,12 @@ public class RestDeleteLifecycleAction extends BaseRestHandler { public RestDeleteLifecycleAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.DELETE, - IndexLifecycle.BASE_PATH + "{name}", this); + controller.registerHandler(RestRequest.Method.DELETE, "/_ilm/{name}", this); } @Override public String getName() { - return "xpack_lifecycle_delete_action"; + return "ilm_delete_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java similarity index 83% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java index 82316773ccbbb..830570906e22f 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestExplainLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.support.IndicesOptions; @@ -14,7 +15,6 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.ExplainLifecycleAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; import java.io.IOException; @@ -22,13 +22,12 @@ public class RestExplainLifecycleAction extends BaseRestHandler { public RestExplainLifecycleAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.GET, "_" + IndexLifecycle.NAME + "/explain", this); - controller.registerHandler(RestRequest.Method.GET, "{index}/_" + IndexLifecycle.NAME + "/explain", this); + controller.registerHandler(RestRequest.Method.GET, "/{index}/_ilm/explain", this); } @Override public String getName() { - return "xpack_lifecycle_explain_action"; + return "ilm_explain_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java similarity index 84% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java index 826b62dbdbd18..9d0ae98b47e4a 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -13,7 +14,6 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.GetLifecycleAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; import java.io.IOException; @@ -21,13 +21,13 @@ public class RestGetLifecycleAction extends BaseRestHandler { public RestGetLifecycleAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.GET, IndexLifecycle.BASE_PATH, this); - controller.registerHandler(RestRequest.Method.GET, IndexLifecycle.BASE_PATH + "{name}", this); + controller.registerHandler(RestRequest.Method.GET, "/_ilm", this); + controller.registerHandler(RestRequest.Method.GET, "/_ilm/{name}", this); } @Override public String getName() { - return "xpack_lifecycle_get_action"; + return "ilm_get_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java similarity index 85% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java index d80ac0e64d7e4..be2d16ee0be76 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestGetStatusAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -12,19 +13,17 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.GetStatusAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; public class RestGetStatusAction extends BaseRestHandler { public RestGetStatusAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.GET, - IndexLifecycle.BASE_PATH + "_status", this); + controller.registerHandler(RestRequest.Method.GET, "/_ilm/status", this); } @Override public String getName() { - return "xpack_lifecycle_get_operation_mode_action"; + return "ilm_get_operation_mode_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java similarity index 87% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java index 32246ec3a44eb..41228041679e7 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestMoveToStepAction.java @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -14,7 +15,6 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.MoveToStepAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; import java.io.IOException; @@ -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,"/_ilm/move/{name}", this); } @Override public String getName() { - return "xpack_lifecycle_move_to_step_action"; + return "ilm_move_to_step_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java similarity index 88% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java index c47d7afdf0b30..6766ce65cad76 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestPutLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -13,7 +14,6 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.PutLifecycleAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; import java.io.IOException; @@ -21,13 +21,12 @@ public class RestPutLifecycleAction extends BaseRestHandler { public RestPutLifecycleAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.PUT, - IndexLifecycle.BASE_PATH + "{name}", this); + controller.registerHandler(RestRequest.Method.PUT, "/_ilm/{name}", this); } @Override public String getName() { - return "xpack_lifecycle_put_action"; + return "ilm_put_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java similarity index 87% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java index a5f3c5ce3b6a8..1a14995168aef 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRemovePolicyForIndexAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -20,13 +21,12 @@ public class RestRemovePolicyForIndexAction extends BaseRestHandler { public RestRemovePolicyForIndexAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.DELETE, "_lifecycle", this); - controller.registerHandler(RestRequest.Method.DELETE, "{index}/_lifecycle", this); + controller.registerHandler(RestRequest.Method.DELETE, "/{index}/_ilm", this); } @Override public String getName() { - return "xpack_remove_policy_for_index_action"; + return "ilm_remove_policy_for_index_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java similarity index 83% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java index 4cfd2f1cb7afb..9e12c3cc34ed7 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestRetryAction.java @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.support.IndicesOptions; @@ -15,19 +16,17 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.RetryAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; public class RestRetryAction extends BaseRestHandler { public RestRetryAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, "_" + IndexLifecycle.NAME + "/retry", this); - controller.registerHandler(RestRequest.Method.POST, "{index}/_" + IndexLifecycle.NAME + "/retry", this); + controller.registerHandler(RestRequest.Method.POST, "/{index}/_ilm/retry", this); } @Override public String getName() { - return "xpack_lifecycle_retry_action"; + return "ilm_retry_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java similarity index 89% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java index 0f12357bdec14..8538934d1fc21 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestSetIndexLifecyclePolicyAction.java @@ -3,18 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.action.SetIndexLifecyclePolicyAction; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; import java.io.IOException; @@ -22,13 +23,12 @@ public class RestSetIndexLifecyclePolicyAction extends BaseRestHandler { public RestSetIndexLifecyclePolicyAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.PUT, "_lifecycle/{new_policy}", this); - controller.registerHandler(RestRequest.Method.PUT, "{index}/_lifecycle/{new_policy}", this); + controller.registerHandler(RestRequest.Method.PUT, "/{index}/_ilm/{new_policy}", this); } @Override public String getName() { - return "xpack_set_index_policy_action"; + return "ilm_set_index_policy_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java similarity index 86% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java index dc271a2747c05..c097c14a57501 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStartAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -13,19 +14,17 @@ import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.action.PutOperationModeAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; public class RestStartAction extends BaseRestHandler { public RestStartAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, - IndexLifecycle.BASE_PATH + "_start", this); + controller.registerHandler(RestRequest.Method.POST, "/_ilm/start", this); } @Override public String getName() { - return "xpack_lifecycle_start_action"; + return "ilm_start_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java similarity index 86% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java index a19b8d98faccd..472a8cc8bb4c0 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/RestStopAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.client.node.NodeClient; @@ -13,19 +14,17 @@ import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.action.PutOperationModeAction; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycle; public class RestStopAction extends BaseRestHandler { public RestStopAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.POST, - IndexLifecycle.BASE_PATH + "_stop", this); + controller.registerHandler(RestRequest.Method.POST, "/_ilm/stop", this); } @Override public String getName() { - return "xpack_lifecycle_stop_action"; + return "ilm_stop_action"; } @Override diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java index 7b3b5a89aa3bc..a8b718bbb7be7 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportDeleteLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.ResourceNotFoundException; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportExplainLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportExplainLifecycleAction.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportExplainLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportExplainLifecycleAction.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java index 8e62c3be8a10b..27cc82d0c0e82 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.ResourceNotFoundException; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java index db8171ccbba01..5d7b2b159c08e 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportGetStatusAction.java @@ -2,8 +2,8 @@ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. - * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.ActionListener; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java index 98f9ff583525d..1c9a05dbfc73e 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportMoveToStepAction.java @@ -2,8 +2,8 @@ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. - * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.ActionListener; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java index 930777f1f4fc8..e6797137e6559 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutLifecycleAction.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.ResourceAlreadyExistsException; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java index 1a1d3977303a3..257527076a2c0 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportPutOperationModeAction.java @@ -2,8 +2,8 @@ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. - * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.ActionListener; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRemovePolicyForIndexAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRemovePolicyForIndexAction.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRemovePolicyForIndexAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRemovePolicyForIndexAction.java diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java index ede40b703bb3d..4bbefafee0866 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportRetryAction.java @@ -2,8 +2,8 @@ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. - * */ + package org.elasticsearch.xpack.indexlifecycle.action; import org.elasticsearch.action.ActionListener; diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java rename to x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java index fd1d1d225932b..6ea9e0103fdf2 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/action/TransportSetIndexLifecyclePolicyAction.java @@ -19,13 +19,13 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index; +import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; +import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.xpack.core.indexlifecycle.IndexLifecycleMetadata; import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicy; import org.elasticsearch.xpack.core.indexlifecycle.action.SetIndexLifecyclePolicyAction; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse; import org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunner; import java.util.ArrayList; diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java index e72b6029450a0..3c050c618cb18 100644 --- a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/ExecuteStepsUpdateTaskTests.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.elasticsearch.ElasticsearchException; @@ -24,17 +25,17 @@ import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicy; import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicyMetadata; import org.elasticsearch.xpack.core.indexlifecycle.LifecycleSettings; -import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.MockAction; import org.elasticsearch.xpack.core.indexlifecycle.MockStep; +import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.Phase; import org.elasticsearch.xpack.core.indexlifecycle.RandomStepInfo; import org.elasticsearch.xpack.core.indexlifecycle.Step; import org.elasticsearch.xpack.core.indexlifecycle.Step.StepKey; import org.elasticsearch.xpack.core.indexlifecycle.TerminalPolicyStep; import org.elasticsearch.xpack.core.indexlifecycle.TestLifecycleType; -import org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunnerTests.MockClusterStateWaitStep; import org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunnerTests.MockClusterStateActionStep; +import org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunnerTests.MockClusterStateWaitStep; import org.junit.Before; import org.mockito.Mockito; diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleInitialisationIT.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadataTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadataTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadataTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleMetadataTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunnerTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunnerTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunnerTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleRunnerTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleServiceTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleServiceTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleServiceTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/IndexLifecycleServiceTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicyClientTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicyClientTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicyClientTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicyClientTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/LockableLifecycleType.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/LockableLifecycleType.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/LockableLifecycleType.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/LockableLifecycleType.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTaskTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTaskTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTaskTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToErrorStepUpdateTaskTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTaskTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTaskTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTaskTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/MoveToNextStepUpdateTaskTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTaskTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTaskTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTaskTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/OperationModeUpdateTaskTests.java diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java similarity index 100% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java index b8ac644eb7380..627ea574382db 100644 --- a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistryTests.java @@ -21,8 +21,8 @@ import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicy; import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicyMetadata; import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicyTests; -import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.MockStep; +import org.elasticsearch.xpack.core.indexlifecycle.OperationMode; import org.elasticsearch.xpack.core.indexlifecycle.Step; import org.mockito.Mockito; diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java index 255ce4f31f304..df2c0fa0e69da 100644 --- a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/SetStepInfoUpdateTaskTests.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.elasticsearch.ElasticsearchException; diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java similarity index 98% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java index a4ad7a820da21..d24e604857c1e 100644 --- a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeSeriesLifecycleActionsIT.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.apache.http.entity.ContentType; @@ -52,7 +53,7 @@ public void refreshIndex() { } public static void updatePolicy(String indexName, String policy) throws IOException { - Request request = new Request("PUT", "/" + indexName + "/_lifecycle/" + policy); + Request request = new Request("PUT", "/" + indexName + "/_ilm/" + policy); client().performRequest(request); } @@ -166,7 +167,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", "_ilm/" + policy); request.setEntity(entity); client().performRequest(request); } diff --git a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java similarity index 99% rename from x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java rename to x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java index 4d259b93b299c..f34a2aa458d16 100644 --- a/x-pack/plugin/index-lifecycle/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle/TimeValueScheduleTests.java @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + package org.elasticsearch.xpack.indexlifecycle; import org.elasticsearch.common.unit.TimeValue; diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.delete_lifecycle.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.delete_lifecycle.json similarity index 69% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.delete_lifecycle.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.delete_lifecycle.json index 371a8ebba2a82..948a64ee036a3 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.delete_lifecycle.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.delete_lifecycle.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.delete_lifecycle": { + "ilm.delete_lifecycle": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "DELETE" ], "url": { - "path": "/_xpack/index_lifecycle/{lifecycle}", - "paths": ["/_xpack/index_lifecycle/{lifecycle}"], + "path": "/_ilm/{lifecycle}", + "paths": ["/_ilm/{lifecycle}"], "parts": { "lifecycle": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.explain_lifecycle.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.explain_lifecycle.json similarity index 73% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.explain_lifecycle.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.explain_lifecycle.json index e1c1b29610a7c..de1b0deb5b9e0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.explain_lifecycle.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.explain_lifecycle.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.explain_lifecycle": { + "ilm.explain_lifecycle": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "GET" ], "url": { - "path": "/{index}/_index_lifecycle/explain", - "paths": ["/{index}/_index_lifecycle/explain", "/_index_lifecycle/explain"], + "path": "/{index}/_ilm/explain", + "paths": ["/{index}/_ilm/explain"], "parts": { "index": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_lifecycle.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_lifecycle.json similarity index 69% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_lifecycle.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_lifecycle.json index a3fc2c0715251..71ab557d6966d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_lifecycle.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_lifecycle.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.get_lifecycle": { + "ilm.get_lifecycle": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "GET" ], "url": { - "path": "/_xpack/index_lifecycle/{lifecycle}", - "paths": ["/_xpack/index_lifecycle/{lifecycle}"], + "path": "/_ilm/{lifecycle}", + "paths": ["/_ilm/{lifecycle}", "/_ilm"], "parts": { "lifecycle": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_status.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_status.json similarity index 59% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_status.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_status.json index 46a0cc5eac221..1bf2c1adf0263 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.get_status.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.get_status.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.get_status": { + "ilm.get_status": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "GET" ], "url": { - "path": "/_xpack/index_lifecycle/_status", - "paths": ["/_xpack/index_lifecycle/_status"], + "path": "/_ilm/status", + "paths": ["/_ilm/status"], "parts": {}, "params": {} }, diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.move_to_step.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.move_to_step.json similarity index 73% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.move_to_step.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.move_to_step.json index 64dba513f1a62..ca3f1e76fb256 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.move_to_step.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.move_to_step.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.move_to_step": { + "ilm.move_to_step": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "POST" ], "url": { - "path": "/_xpack/index_lifecycle/_move/{index}", - "paths": ["/_xpack/index_lifecycle/_move/{index}"], + "path": "/_ilm/move/{index}", + "paths": ["/_ilm/move/{index}"], "parts": { "index": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.put_lifecycle.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.put_lifecycle.json similarity index 73% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.put_lifecycle.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.put_lifecycle.json index 499d68a21ab07..cd764a1bcd09a 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.put_lifecycle.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.put_lifecycle.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.put_lifecycle": { + "ilm.put_lifecycle": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "PUT" ], "url": { - "path": "/_xpack/index_lifecycle/{lifecycle}", - "paths": ["/_xpack/index_lifecycle/{lifecycle}"], + "path": "/_ilm/{lifecycle}", + "paths": ["/_ilm/{lifecycle}"], "parts": { "lifecycle": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.remove_policy.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.remove_policy.json similarity index 72% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.remove_policy.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.remove_policy.json index 8f3c4456591be..72834eb380d34 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.remove_policy.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.remove_policy.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.remove_policy": { + "ilm.remove_policy": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "DELETE" ], "url": { - "path": "/{index}/_lifecycle", - "paths": ["/{index}/_lifecycle", "/_lifecycle"], + "path": "/{index}/_ilm", + "paths": ["/{index}/_ilm", "/_ilm"], "parts": { "index": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.retry.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.retry.json similarity index 70% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.retry.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.retry.json index 5f934b75aa88a..af3e7fd43eb56 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.retry.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.retry.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.retry": { + "ilm.retry": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "POST" ], "url": { - "path": "/{index}/_index_lifecycle/retry", - "paths": ["/{index}/_index_lifecycle/retry", "/_index_lifecycle/retry"], + "path": "/{index}/_ilm/retry", + "paths": ["/{index}/_ilm/retry"], "parts": { "index": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.set_policy.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.set_policy.json similarity index 73% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.set_policy.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.set_policy.json index c52ee83ee4f94..e255a99051290 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.set_policy.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.set_policy.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.set_policy": { + "ilm.set_policy": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "PUT" ], "url": { - "path": "/{index}/_lifecycle/{new_policy}", - "paths": ["/{index}/_lifecycle/{new_policy}", "/_lifecycle/{new_policy}"], + "path": "/{index}/_ilm/{new_policy}", + "paths": ["/{index}/_ilm/{new_policy}"], "parts": { "index": { "type" : "string", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.stop.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.start.json similarity index 61% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.stop.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.start.json index 125d2b954d27e..0f2c6e347c452 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.stop.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.start.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.stop": { + "ilm.start": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "POST" ], "url": { - "path": "/_xpack/index_lifecycle/_stop", - "paths": ["/_xpack/index_lifecycle/_stop"], + "path": "/_ilm/start", + "paths": ["/_ilm/start"], "parts": {}, "params": {} }, diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.start.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.stop.json similarity index 61% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.start.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.stop.json index 631a1a7e3ec1a..f4d6526765971 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.index_lifecycle.start.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/ilm.stop.json @@ -1,10 +1,10 @@ { - "xpack.index_lifecycle.start": { + "ilm.stop": { "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html", "methods": [ "POST" ], "url": { - "path": "/_xpack/index_lifecycle/_start", - "paths": ["/_xpack/index_lifecycle/_start"], + "path": "/_ilm/stop", + "paths": ["/_ilm/stop"], "parts": {}, "params": {} }, diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml similarity index 87% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/10_basic.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml index 8527501713fbb..8d7d4955c1c10 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml @@ -8,17 +8,17 @@ setup: "Test Basic Policy CRUD": - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_timeseries_lifecycle" body: | { @@ -45,7 +45,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.type: "timeseries" } - match: { my_timeseries_lifecycle.phases.warm.after: "10s" } @@ -53,19 +53,19 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" --- "Test Policy Update": - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_timeseries_lifecycle" body: | { @@ -92,7 +92,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.type: "timeseries" } - match: { my_timeseries_lifecycle.phases.warm.after: "10s" } @@ -115,7 +115,7 @@ setup: - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_timeseries_lifecycle" body: | { @@ -142,7 +142,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.type: "timeseries" } - match: { my_timeseries_lifecycle.phases.warm.after: "300s" } @@ -159,19 +159,19 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" --- "Test Undeletable Policy In Use": - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_timeseries_lifecycle" body: | { @@ -198,7 +198,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.type: "timeseries" } - match: { my_timeseries_lifecycle.phases.warm.after: "10s" } @@ -213,21 +213,21 @@ setup: - do: catch: bad_request - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - match: { error.root_cause.0.type: "illegal_argument_exception" } - match: { error.root_cause.0.reason: "Cannot delete policy [my_timeseries_lifecycle]. It is being used by at least one index [my_timeseries_index]" } - do: - xpack.index_lifecycle.remove_policy: + ilm.remove_policy: index: my_timeseries_index - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/20_move_to_step.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/20_move_to_step.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml index 579df475067d7..b05bd3a96b985 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/20_move_to_step.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml @@ -5,7 +5,7 @@ setup: wait_for_status: yellow - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" body: | { @@ -30,7 +30,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: @@ -59,12 +59,12 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" --- @@ -72,7 +72,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.move_to_step: + ilm.move_to_step: index: "my_index" body: current_step: @@ -98,7 +98,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.move_to_step: + ilm.move_to_step: index: "my_index" body: current_step: @@ -126,7 +126,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.move_to_step: + ilm.move_to_step: index: "my_index" body: current_step: @@ -154,7 +154,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.move_to_step: + ilm.move_to_step: index: "my_index_no_policy" body: current_step: @@ -173,7 +173,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.move_to_step: + ilm.move_to_step: index: "does_not_exist" body: current_step: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/30_retry.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml similarity index 89% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/30_retry.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml index b5bef88489664..93e43e18b947b 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/30_retry.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml @@ -6,7 +6,7 @@ setup: - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_lifecycle" body: | { @@ -31,7 +31,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_lifecycle" --- @@ -44,12 +44,12 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_lifecycle" --- @@ -64,7 +64,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.retry: + ilm.retry: index: "my_index" - match: { error.root_cause.0.type: "illegal_argument_exception" } - match: { error.root_cause.0.reason: "cannot retry an action for an index [my_index] that has not encountered an error when running a Lifecycle Policy" } @@ -88,7 +88,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.retry: + ilm.retry: index: "my_index" - match: { error.root_cause.0.type: "illegal_argument_exception" } - match: { error.root_cause.0.reason: "cannot retry an action for an index [my_index] that has not encountered an error when running a Lifecycle Policy" } @@ -101,7 +101,7 @@ teardown: - do: catch: bad_request - xpack.index_lifecycle.retry: + ilm.retry: index: "does_not_exist" - match: { error.root_cause.0.type: "illegal_argument_exception" } - match: { error.root_cause.0.reason: "index [does_not_exist] does not exist" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/40_explain_lifecycle.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml similarity index 93% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/40_explain_lifecycle.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml index 06272166d31c9..564cabaec1c3d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/40_explain_lifecycle.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml @@ -5,7 +5,7 @@ setup: wait_for_status: yellow - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" body: | { @@ -30,7 +30,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: @@ -91,12 +91,12 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" --- @@ -104,7 +104,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.explain_lifecycle: + ilm.explain_lifecycle: index: "my_index" - is_true: my_index.managed @@ -125,7 +125,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.explain_lifecycle: + ilm.explain_lifecycle: index: "my_*" - is_true: my_index.managed @@ -155,7 +155,8 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.explain_lifecycle: {} + ilm.explain_lifecycle: + index: "*" - is_true: my_index.managed - match: { my_index.index: "my_index" } @@ -198,7 +199,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.explain_lifecycle: + ilm.explain_lifecycle: index: "unmanaged_index" - match: { unmanaged_index.index: "unmanaged_index" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/50_set_policy_for_index.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml similarity index 90% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/50_set_policy_for_index.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml index 74b83d44395b6..d5c1bc1f88fce 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/50_set_policy_for_index.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml @@ -5,7 +5,7 @@ setup: wait_for_status: yellow - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" body: | { @@ -30,12 +30,12 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" body: | { @@ -60,7 +60,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" - do: @@ -121,22 +121,22 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" --- @@ -150,7 +150,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.set_policy: + ilm.set_policy: index: "another_index" new_policy: my_alternative_timeseries_lifecycle @@ -175,7 +175,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.set_policy: + ilm.set_policy: index: "my_*" new_policy: my_alternative_timeseries_lifecycle @@ -200,7 +200,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.set_policy: + ilm.set_policy: index: "unmanaged_index" new_policy: my_alternative_timeseries_lifecycle @@ -218,6 +218,6 @@ teardown: - do: catch: missing - xpack.index_lifecycle.set_policy: + ilm.set_policy: index: "doesnt_exist" new_policy: my_alternative_timeseries_lifecycle diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_operation_mode.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml similarity index 75% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_operation_mode.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml index ba963e17d2b89..9c4a9ce074585 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_operation_mode.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml @@ -7,12 +7,12 @@ setup: --- "Test Changing Operation Modes": - do: - xpack.index_lifecycle.get_status: {} + ilm.get_status: {} - match: { operation_mode: "RUNNING" } - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_timeseries_lifecycle" body: | { @@ -38,31 +38,31 @@ setup: } - do: - xpack.index_lifecycle.get_status: {} + ilm.get_status: {} - match: { operation_mode: "RUNNING" } - do: acknowledge: true - xpack.index_lifecycle.stop: {} + ilm.stop: {} - do: - xpack.index_lifecycle.get_status: {} + ilm.get_status: {} - match: { operation_mode: "STOPPING" } - do: acknowledge: true - xpack.index_lifecycle.start: {} + ilm.start: {} - do: - xpack.index_lifecycle.get_status: {} + ilm.get_status: {} - match: { operation_mode: "RUNNING" } - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_remove_policy_for_index.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml similarity index 89% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_remove_policy_for_index.yml rename to x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml index 0a683ec6cba80..f61b028996409 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/index_lifecycle/60_remove_policy_for_index.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml @@ -5,7 +5,7 @@ setup: wait_for_status: yellow - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" body: | { @@ -30,12 +30,12 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: acknowlege: true - xpack.index_lifecycle.put_lifecycle: + ilm.put_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" body: | { @@ -60,7 +60,7 @@ setup: - do: acknowledge: true - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" - do: @@ -121,22 +121,22 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_moveable_timeseries_lifecycle" - do: acknowledge: true - xpack.index_lifecycle.delete_lifecycle: + ilm.delete_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" - do: catch: missing - xpack.index_lifecycle.get_lifecycle: + ilm.get_lifecycle: lifecycle: "my_alternative_timeseries_lifecycle" --- @@ -150,7 +150,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.remove_policy: + ilm.remove_policy: index: "another_index" - is_false: has_failures @@ -174,7 +174,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.remove_policy: + ilm.remove_policy: index: "my_*" - is_false: has_failures @@ -198,7 +198,7 @@ teardown: - do: acknowledge: true - xpack.index_lifecycle.remove_policy: + ilm.remove_policy: index: "unmanaged_index" - is_false: has_failures @@ -215,5 +215,5 @@ teardown: - do: catch: missing - xpack.index_lifecycle.remove_policy: + ilm.remove_policy: index: "doesnt_exist" diff --git a/x-pack/qa/audit-tests/build.gradle b/x-pack/qa/audit-tests/build.gradle index 099e354d6c96d..126e3834bab4a 100644 --- a/x-pack/qa/audit-tests/build.gradle +++ b/x-pack/qa/audit-tests/build.gradle @@ -17,7 +17,7 @@ project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) integTestCluster { distribution 'zip' - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.ml.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.security.enabled', 'true' diff --git a/x-pack/qa/core-rest-tests-with-security/build.gradle b/x-pack/qa/core-rest-tests-with-security/build.gradle index 4a389414905bd..e2c2f585a8246 100644 --- a/x-pack/qa/core-rest-tests-with-security/build.gradle +++ b/x-pack/qa/core-rest-tests-with-security/build.gradle @@ -23,7 +23,7 @@ integTestRunner { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'true' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' diff --git a/x-pack/qa/ml-basic-multi-node/build.gradle b/x-pack/qa/ml-basic-multi-node/build.gradle index d6c9a89568b93..290166f6bfd3c 100644 --- a/x-pack/qa/ml-basic-multi-node/build.gradle +++ b/x-pack/qa/ml-basic-multi-node/build.gradle @@ -7,7 +7,7 @@ dependencies { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.watcher.enabled', 'false' diff --git a/x-pack/qa/ml-disabled/build.gradle b/x-pack/qa/ml-disabled/build.gradle index 4f8f498dcf1e4..521185870f5f1 100644 --- a/x-pack/qa/ml-disabled/build.gradle +++ b/x-pack/qa/ml-disabled/build.gradle @@ -7,7 +7,7 @@ dependencies { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'false' setting 'xpack.ml.enabled', 'false' numNodes = 1 diff --git a/x-pack/qa/ml-single-node-tests/build.gradle b/x-pack/qa/ml-single-node-tests/build.gradle index 6b47fdfc149dc..e36d0e2f689b3 100644 --- a/x-pack/qa/ml-single-node-tests/build.gradle +++ b/x-pack/qa/ml-single-node-tests/build.gradle @@ -7,7 +7,7 @@ dependencies { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' } diff --git a/x-pack/qa/multi-cluster-search-security/build.gradle b/x-pack/qa/multi-cluster-search-security/build.gradle index 7a244998e1a37..2f4f5bae8b4e5 100644 --- a/x-pack/qa/multi-cluster-search-security/build.gradle +++ b/x-pack/qa/multi-cluster-search-security/build.gradle @@ -15,7 +15,7 @@ remoteClusterTestCluster { numNodes = 2 clusterName = 'remote-cluster' setting 'search.remote.connect', false - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'true' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' diff --git a/x-pack/qa/multi-node/build.gradle b/x-pack/qa/multi-node/build.gradle index b870cd7447421..8c4dd9d31a889 100644 --- a/x-pack/qa/multi-node/build.gradle +++ b/x-pack/qa/multi-node/build.gradle @@ -8,7 +8,7 @@ dependencies { integTestCluster { numNodes = 2 clusterName = 'multi-node' - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'true' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' diff --git a/x-pack/qa/reindex-tests-with-security/build.gradle b/x-pack/qa/reindex-tests-with-security/build.gradle index 2da1da07562a7..3b7f53d7a2d9f 100644 --- a/x-pack/qa/reindex-tests-with-security/build.gradle +++ b/x-pack/qa/reindex-tests-with-security/build.gradle @@ -11,7 +11,7 @@ dependencies { integTestCluster { // Whitelist reindexing from the local node so we can test it. setting 'reindex.remote.whitelist', '127.0.0.1:*' - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'true' setting 'xpack.ml.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/qa/security-client-tests/build.gradle b/x-pack/qa/security-client-tests/build.gradle index f46180ae2ebb0..fc3b9c036aac1 100644 --- a/x-pack/qa/security-client-tests/build.gradle +++ b/x-pack/qa/security-client-tests/build.gradle @@ -19,7 +19,7 @@ integTestRunner { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'true' setting 'xpack.ml.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/qa/security-example-spi-extension/build.gradle b/x-pack/qa/security-example-spi-extension/build.gradle index b15b794859dd3..f2ce7d007a8ed 100644 --- a/x-pack/qa/security-example-spi-extension/build.gradle +++ b/x-pack/qa/security-example-spi-extension/build.gradle @@ -27,7 +27,7 @@ integTestCluster { setting 'xpack.security.authc.realms.native.type', 'native' setting 'xpack.security.authc.realms.native.order', '2' setting 'xpack.security.enabled', 'true' - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.ml.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/qa/smoke-test-index-lifecycle-with-security/build.gradle b/x-pack/qa/smoke-test-index-lifecycle-with-security/build.gradle index 7b931e5bedd1e..fc790b82a42c7 100644 --- a/x-pack/qa/smoke-test-index-lifecycle-with-security/build.gradle +++ b/x-pack/qa/smoke-test-index-lifecycle-with-security/build.gradle @@ -22,7 +22,7 @@ integTestRunner { integTestCluster { dependsOn copyILMRestTests - setting 'xpack.index_lifecycle.enabled', 'true' + setting 'xpack.ilm.enabled', 'true' setting 'xpack.security.enabled', 'true' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' diff --git a/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle b/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle index 5fb4c90b3902f..4921aeee29070 100644 --- a/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle +++ b/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle @@ -8,7 +8,7 @@ dependencies { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.monitoring.enabled', 'true' setting 'xpack.watcher.enabled', 'true' setting 'xpack.security.enabled', 'false' diff --git a/x-pack/qa/smoke-test-plugins-ssl/build.gradle b/x-pack/qa/smoke-test-plugins-ssl/build.gradle index f5a882efad47a..86cd0ee101d0b 100644 --- a/x-pack/qa/smoke-test-plugins-ssl/build.gradle +++ b/x-pack/qa/smoke-test-plugins-ssl/build.gradle @@ -72,6 +72,7 @@ integTestCluster { setting 'xpack.security.http.ssl.certificate', 'testnode.crt' keystoreSetting 'xpack.security.http.ssl.secure_key_passphrase', 'testnode' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.ml.enabled', 'false' // copy keystores, keys and certificates into config/ extraConfigFile nodeKeystore.name, nodeKeystore diff --git a/x-pack/qa/smoke-test-watcher-with-security/build.gradle b/x-pack/qa/smoke-test-watcher-with-security/build.gradle index 3705275aea82c..1a65f2989cc02 100644 --- a/x-pack/qa/smoke-test-watcher-with-security/build.gradle +++ b/x-pack/qa/smoke-test-watcher-with-security/build.gradle @@ -14,7 +14,7 @@ task copyWatcherRestTests(type: Copy) { integTestCluster { dependsOn copyWatcherRestTests - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.ml.enabled', 'false' setting 'xpack.security.enabled', 'true' diff --git a/x-pack/qa/smoke-test-watcher/build.gradle b/x-pack/qa/smoke-test-watcher/build.gradle index 4c581cb9b6ce8..dfffda8bbfa8d 100644 --- a/x-pack/qa/smoke-test-watcher/build.gradle +++ b/x-pack/qa/smoke-test-watcher/build.gradle @@ -14,7 +14,7 @@ dependencies { } integTestCluster { - setting 'xpack.index_lifecycle.enabled', 'false' + setting 'xpack.ilm.enabled', 'false' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'xpack.ml.enabled', 'false'