diff --git a/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java index 5ade17b4a15..f3ddb6c1d9a 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java @@ -27,8 +27,10 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; +import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest; +import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequest; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.bytes.BytesArray; @@ -59,7 +61,7 @@ import static org.elasticsearch.common.settings.ImmutableSettings.Builder.EMPTY_ * @see org.elasticsearch.client.Requests#createIndexRequest(String) * @see CreateIndexResponse */ -public class CreateIndexRequest extends AcknowledgedRequest { +public class CreateIndexRequest extends AcknowledgedRequest implements IndicesRequest { private String cause = ""; @@ -108,6 +110,16 @@ public class CreateIndexRequest extends AcknowledgedRequest return validationException; } + @Override + public String[] indices() { + return new String[]{index}; + } + + @Override + public IndicesOptions indicesOptions() { + return IndicesOptions.strictSingleIndexNoExpandForbidClosed(); + } + /** * The index name to create. */ diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java index 6fcbe42dac2..e826b76f971 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.client.IndicesAdminClient; public class DeleteIndexTemplateAction extends IndicesAction { public static final DeleteIndexTemplateAction INSTANCE = new DeleteIndexTemplateAction(); - public static final String NAME = "cluster:admin/template/delete"; + public static final String NAME = "indices:admin/template/delete"; private DeleteIndexTemplateAction() { super(NAME); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesAction.java index 71f5af46f2f..de3ded1a64e 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.client.IndicesAdminClient; public class GetIndexTemplatesAction extends IndicesAction { public static final GetIndexTemplatesAction INSTANCE = new GetIndexTemplatesAction(); - public static final String NAME = "cluster:admin/template/get"; + public static final String NAME = "indices:admin/template/get"; protected GetIndexTemplatesAction() { super(NAME); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateAction.java index fa01d6720c6..00f98bc46b6 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.client.IndicesAdminClient; public class PutIndexTemplateAction extends IndicesAction { public static final PutIndexTemplateAction INSTANCE = new PutIndexTemplateAction(); - public static final String NAME = "cluster:admin/template/put"; + public static final String NAME = "indices:admin/template/put"; private PutIndexTemplateAction() { super(NAME); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java index 2989f501191..c27e094fcbd 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java @@ -23,7 +23,9 @@ import org.elasticsearch.ElasticsearchIllegalArgumentException; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; +import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.indices.alias.Alias; +import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeOperationRequest; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.bytes.BytesArray; @@ -50,7 +52,7 @@ import static org.elasticsearch.common.settings.ImmutableSettings.writeSettingsT /** * A request to create an index template. */ -public class PutIndexTemplateRequest extends MasterNodeOperationRequest { +public class PutIndexTemplateRequest extends MasterNodeOperationRequest implements IndicesRequest { private String name; @@ -404,6 +406,16 @@ public class PutIndexTemplateRequest extends MasterNodeOperationRequest