diff --git a/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java index 787fcf0512a60..59dc3cd000ab8 100644 --- a/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java @@ -35,7 +35,7 @@ import org.elasticsearch.plugin.noop.NoopPlugin; import org.elasticsearch.plugin.noop.action.bulk.NoopBulkAction; import org.elasticsearch.plugin.noop.action.search.NoopSearchAction; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.opensearch.transport.client.PreBuiltTransportClient; diff --git a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/NoopPlugin.java b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/NoopPlugin.java index baaea514d26ad..4f0152f7c43cc 100644 --- a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/NoopPlugin.java +++ b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/NoopPlugin.java @@ -34,8 +34,8 @@ import org.elasticsearch.plugin.noop.action.search.TransportNoopSearchAction; import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import java.util.Arrays; import java.util.List; diff --git a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java index 3afb2bcfc2b9b..fe53a7b8d3c57 100644 --- a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java +++ b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java @@ -29,21 +29,21 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.action.RestBuilderListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.action.RestBuilderListener; import java.io.IOException; import java.util.List; import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.POST; -import static org.elasticsearch.rest.RestRequest.Method.PUT; -import static org.elasticsearch.rest.RestStatus.OK; +import static org.opensearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.PUT; +import static org.opensearch.rest.RestStatus.OK; public class RestNoopBulkAction extends BaseRestHandler { diff --git a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/search/RestNoopSearchAction.java b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/search/RestNoopSearchAction.java index 72762d143166d..767e64d0cdb14 100644 --- a/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/search/RestNoopSearchAction.java +++ b/client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/search/RestNoopSearchAction.java @@ -20,16 +20,16 @@ import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestStatusToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestStatusToXContentListener; import java.util.List; import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestNoopSearchAction extends BaseRestHandler { diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/ClusterClient.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/ClusterClient.java index 1d6f416f76a9c..ec3213b8c45c0 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/ClusterClient.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/ClusterClient.java @@ -34,7 +34,7 @@ import org.elasticsearch.client.indices.GetComponentTemplatesRequest; import org.elasticsearch.client.indices.GetComponentTemplatesResponse; import org.elasticsearch.client.indices.PutComponentTemplateRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/GetAliasesResponse.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/GetAliasesResponse.java index 629aef53a7db1..07aafcde99e4a 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/GetAliasesResponse.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/GetAliasesResponse.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java index f83471b77c307..615b068ced2d9 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java @@ -76,7 +76,7 @@ import org.elasticsearch.client.indices.SimulateIndexTemplateResponse; import org.elasticsearch.client.indices.rollover.RolloverRequest; import org.elasticsearch.client.indices.rollover.RolloverResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java index 779594fae1c3d..2473612a69db2 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java @@ -66,7 +66,7 @@ import java.io.IOException; import java.util.Locale; -import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; +import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; final class IndicesRequestConverters { diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/NodesResponseHeader.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/NodesResponseHeader.java index 369f69273487b..ed6bd921de6ce 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/NodesResponseHeader.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/NodesResponseHeader.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.action.RestActions; +import org.opensearch.rest.action.RestActions; import java.io.IOException; import java.util.Collections; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java index 7b722b5503ed2..0f809db0a3879 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java @@ -79,7 +79,7 @@ import org.elasticsearch.index.reindex.ReindexRequest; import org.elasticsearch.index.reindex.UpdateByQueryRequest; import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.action.search.RestSearchAction; import org.opensearch.script.mustache.MultiSearchTemplateRequest; import org.opensearch.script.mustache.SearchTemplateRequest; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java index fdd70d3a3fad2..214ca1f5a51fe 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java @@ -80,8 +80,8 @@ import org.elasticsearch.index.reindex.ReindexRequest; import org.elasticsearch.index.reindex.UpdateByQueryRequest; import org.elasticsearch.plugins.spi.NamedXContentProvider; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestStatus; import org.opensearch.script.mustache.MultiSearchTemplateRequest; import org.opensearch.script.mustache.MultiSearchTemplateResponse; import org.opensearch.script.mustache.SearchTemplateRequest; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/core/CountResponse.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/core/CountResponse.java index 37b6e70d49d52..7d52ac20b989e 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/core/CountResponse.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/core/CountResponse.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.search.ShardSearchFailure; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorIT.java index d88fc4812bee2..81193b8e932f3 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorIT.java @@ -37,7 +37,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.rest.action.document.RestBulkAction; +import org.opensearch.rest.action.document.RestBulkAction; import org.elasticsearch.search.SearchHit; import org.hamcrest.Matcher; import org.hamcrest.Matchers; @@ -484,11 +484,11 @@ private static BytesArray bytesBulkRequest(String localIndex, String localType, private MultiGetRequest indexDocs(BulkProcessor processor, int numDocs) throws Exception { return indexDocs(processor, numDocs, "test", null, null, null, null); } - + private static void assertResponseItems(List bulkItemResponses, int numDocs) { assertResponseItems(bulkItemResponses, numDocs, MapperService.SINGLE_MAPPING_NAME); } - + private static void assertResponseItems(List bulkItemResponses, int numDocs, String expectedType) { assertThat(bulkItemResponses.size(), is(numDocs)); int i = 1; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorRetryIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorRetryIT.java index 8d0e60a703a9e..7af3db21cb209 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorRetryIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkProcessorRetryIT.java @@ -28,7 +28,7 @@ import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.transport.RemoteTransportException; import java.util.Collections; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkRequestWithGlobalParametersIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkRequestWithGlobalParametersIT.java index 4c8e05aa28ea5..0e651e2efe121 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkRequestWithGlobalParametersIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/BulkRequestWithGlobalParametersIT.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.action.document.RestBulkAction; +import org.opensearch.rest.action.document.RestBulkAction; import org.elasticsearch.search.SearchHit; import java.io.IOException; @@ -177,7 +177,7 @@ public void testGlobalRouting() throws IOException { .source(XContentType.JSON, "field", "bulk1")); request.routing("1"); bulk(request); - + Iterable emptyHits = searchAll(new SearchRequest("index").routing("xxx")); assertThat(emptyHits, is(emptyIterable())); @@ -199,7 +199,7 @@ public void testMixLocalAndGlobalRouting() throws IOException { Iterable hits = searchAll(new SearchRequest("index").routing("globalRouting", "localRouting")); assertThat(hits, containsInAnyOrder(hasId("1"), hasId("2"))); } - + public void testGlobalIndexNoTypes() throws IOException { BulkRequest request = new BulkRequest("global_index"); request.add(new IndexRequest().id("1") @@ -211,20 +211,20 @@ public void testGlobalIndexNoTypes() throws IOException { Iterable hits = searchAll("global_index"); assertThat(hits, everyItem(hasIndex("global_index"))); - } + } private BulkResponse bulkWithTypes(BulkRequest request) throws IOException { - BulkResponse bulkResponse = execute(request, highLevelClient()::bulk, highLevelClient()::bulkAsync, + BulkResponse bulkResponse = execute(request, highLevelClient()::bulk, highLevelClient()::bulkAsync, expectWarnings(RestBulkAction.TYPES_DEPRECATION_MESSAGE)); assertFalse(bulkResponse.hasFailures()); return bulkResponse; } - + private BulkResponse bulk(BulkRequest request) throws IOException { BulkResponse bulkResponse = execute(request, highLevelClient()::bulk, highLevelClient()::bulkAsync, RequestOptions.DEFAULT); assertFalse(bulkResponse.hasFailures()); return bulkResponse; - } + } @SuppressWarnings("unchecked") private static Function fieldFromSource(String fieldName) { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/ClusterClientIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/ClusterClientIT.java index 7e8675ef62412..b0e70163478d5 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/ClusterClientIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/ClusterClientIT.java @@ -52,7 +52,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.transport.RemoteClusterService; import org.elasticsearch.transport.SniffConnectionStrategy; @@ -133,7 +133,7 @@ public void testClusterUpdateSettingNonExistent() { highLevelClient().cluster()::putSettings, highLevelClient().cluster()::putSettingsAsync)); assertThat(exception.status(), equalTo(RestStatus.BAD_REQUEST)); assertThat(exception.getMessage(), equalTo( - "Elasticsearch exception [type=illegal_argument_exception, reason=transient setting [" + setting + "], not recognized]")); + "OpenSearch exception [type=illegal_argument_exception, reason=transient setting [" + setting + "], not recognized]")); } public void testClusterGetSettings() throws IOException { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java index 7c57aabefba6a..c6605eb3e9f4d 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java @@ -55,13 +55,13 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.VersionType; import org.elasticsearch.index.get.GetResult; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.document.RestBulkAction; -import org.elasticsearch.rest.action.document.RestDeleteAction; -import org.elasticsearch.rest.action.document.RestGetAction; -import org.elasticsearch.rest.action.document.RestIndexAction; -import org.elasticsearch.rest.action.document.RestMultiGetAction; -import org.elasticsearch.rest.action.document.RestUpdateAction; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.document.RestBulkAction; +import org.opensearch.rest.action.document.RestDeleteAction; +import org.opensearch.rest.action.document.RestGetAction; +import org.opensearch.rest.action.document.RestIndexAction; +import org.opensearch.rest.action.document.RestMultiGetAction; +import org.opensearch.rest.action.document.RestUpdateAction; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; @@ -122,7 +122,7 @@ public void testDelete() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(deleteRequest, highLevelClient()::delete, highLevelClient()::deleteAsync)); assertEquals(RestStatus.CONFLICT, exception.status()); - assertEquals("Elasticsearch exception [type=version_conflict_engine_exception, reason=[" + docId + "]: " + + assertEquals("OpenSearch exception [type=version_conflict_engine_exception, reason=[" + docId + "]: " + "version conflict, required seqNo [2], primary term [2]. current document has seqNo [3] and primary term [1]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); @@ -151,7 +151,7 @@ public void testDelete() throws IOException { execute(deleteRequest, highLevelClient()::delete, highLevelClient()::deleteAsync); }); assertEquals(RestStatus.CONFLICT, exception.status()); - assertEquals("Elasticsearch exception [type=version_conflict_engine_exception, reason=[" + + assertEquals("OpenSearch exception [type=version_conflict_engine_exception, reason=[" + docId + "]: version conflict, current version [12] is higher or equal to the one provided [10]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); } @@ -298,7 +298,7 @@ public void testGet() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(getRequest, highLevelClient()::get, highLevelClient()::getAsync)); assertEquals(RestStatus.NOT_FOUND, exception.status()); - assertEquals("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]", exception.getMessage()); + assertEquals("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); } IndexRequest index = new IndexRequest("index").id("id"); @@ -311,7 +311,7 @@ public void testGet() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(getRequest, highLevelClient()::get, highLevelClient()::getAsync)); assertEquals(RestStatus.CONFLICT, exception.status()); - assertEquals("Elasticsearch exception [type=version_conflict_engine_exception, " + "reason=[id]: " + + assertEquals("OpenSearch exception [type=version_conflict_engine_exception, " + "reason=[id]: " + "version conflict, current version [1] is different than the one provided [2]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); } @@ -412,7 +412,7 @@ public void testMultiGet() throws IOException { assertEquals("id1", response.getResponses()[0].getFailure().getId()); assertNull(response.getResponses()[0].getFailure().getType()); assertEquals("index", response.getResponses()[0].getFailure().getIndex()); - assertEquals("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]", + assertEquals("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]", response.getResponses()[0].getFailure().getFailure().getMessage()); assertTrue(response.getResponses()[1].isFailed()); @@ -420,7 +420,7 @@ public void testMultiGet() throws IOException { assertEquals("id2", response.getResponses()[1].getId()); assertNull(response.getResponses()[1].getType()); assertEquals("index", response.getResponses()[1].getIndex()); - assertEquals("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]", + assertEquals("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]", response.getResponses()[1].getFailure().getFailure().getMessage()); } BulkRequest bulk = new BulkRequest(); @@ -491,7 +491,7 @@ public void testGetSource() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(getRequest, highLevelClient()::getSource, highLevelClient()::getSourceAsync)); assertEquals(RestStatus.NOT_FOUND, exception.status()); - assertEquals("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]", exception.getMessage()); + assertEquals("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); } IndexRequest index = new IndexRequest("index").id("id"); @@ -512,7 +512,7 @@ public void testGetSource() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(getRequest, highLevelClient()::getSource, highLevelClient()::getSourceAsync)); assertEquals(RestStatus.NOT_FOUND, exception.status()); - assertEquals("Elasticsearch exception [type=resource_not_found_exception, " + + assertEquals("OpenSearch exception [type=resource_not_found_exception, " + "reason=Document not found [index]/[_doc]/[does_not_exist]]", exception.getMessage()); } { @@ -545,7 +545,7 @@ public void testGetSource() throws IOException { getRequest.fetchSourceContext(new FetchSourceContext(false)); OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(getRequest, highLevelClient()::getSource, highLevelClient()::getSourceAsync)); - assertEquals("Elasticsearch exception [type=action_request_validation_exception, " + + assertEquals("OpenSearch exception [type=action_request_validation_exception, " + "reason=Validation Failed: 1: fetching source can not be disabled;]", exception.getMessage()); } } @@ -602,7 +602,7 @@ public void testIndex() throws IOException { execute(wrongRequest, highLevelClient()::index, highLevelClient()::indexAsync); }); assertEquals(RestStatus.CONFLICT, exception.status()); - assertEquals("Elasticsearch exception [type=version_conflict_engine_exception, reason=[id]: " + + assertEquals("OpenSearch exception [type=version_conflict_engine_exception, reason=[id]: " + "version conflict, required seqNo [1], primary term [5]. current document has seqNo [2] and primary term [1]]", exception.getMessage()); assertEquals("index", exception.getMetadata("es.index").get(0)); @@ -617,7 +617,7 @@ public void testIndex() throws IOException { }); assertEquals(RestStatus.BAD_REQUEST, exception.status()); - assertEquals("Elasticsearch exception [type=illegal_argument_exception, " + + assertEquals("OpenSearch exception [type=illegal_argument_exception, " + "reason=pipeline with id [missing] does not exist]", exception.getMessage()); } { @@ -649,7 +649,7 @@ public void testIndex() throws IOException { }); assertEquals(RestStatus.CONFLICT, exception.status()); - assertEquals("Elasticsearch exception [type=version_conflict_engine_exception, reason=[with_create_op_type]: " + + assertEquals("OpenSearch exception [type=version_conflict_engine_exception, reason=[with_create_op_type]: " + "version conflict, document already exists (current version [1])]", exception.getMessage()); } } @@ -678,7 +678,7 @@ public void testUpdate() throws IOException { OpenSearchStatusException exception = expectThrows(OpenSearchStatusException.class, () -> execute(updateRequest, highLevelClient()::update, highLevelClient()::updateAsync)); assertEquals(RestStatus.NOT_FOUND, exception.status()); - assertEquals("Elasticsearch exception [type=document_missing_exception, reason=[_doc][does_not_exist]: document missing]", + assertEquals("OpenSearch exception [type=document_missing_exception, reason=[_doc][does_not_exist]: document missing]", exception.getMessage()); } { @@ -715,7 +715,7 @@ public void testUpdate() throws IOException { OpenSearchStatusException exception = expectThrows(OpenSearchStatusException.class, () -> execute(updateRequest, highLevelClient()::update, highLevelClient()::updateAsync)); assertEquals(exception.toString(),RestStatus.CONFLICT, exception.status()); - assertThat(exception.getMessage(), containsString("Elasticsearch exception [type=version_conflict_engine_exception")); + assertThat(exception.getMessage(), containsString("OpenSearch exception [type=version_conflict_engine_exception")); } { final UpdateRequest updateRequest = new UpdateRequest("index", "id"); diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/GetAliasesResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/GetAliasesResponseTests.java index 89d52a01270cd..7d5e6d1896371 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/GetAliasesResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/GetAliasesResponseTests.java @@ -22,7 +22,7 @@ import org.elasticsearch.cluster.metadata.AliasMetadata; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.AbstractXContentTestCase; import java.io.IOException; @@ -131,7 +131,7 @@ public void testFromXContentWithElasticsearchException() throws IOException { assertThat(getAliasesResponse.getError(), nullValue()); assertThat(getAliasesResponse.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(getAliasesResponse.getException().getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]")); } } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java index b46cbc16017b7..391e756531494 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java @@ -114,15 +114,15 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.indices.flush.SyncedFlushService; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction; -import org.elasticsearch.rest.action.admin.indices.RestGetFieldMappingAction; -import org.elasticsearch.rest.action.admin.indices.RestGetIndexTemplateAction; -import org.elasticsearch.rest.action.admin.indices.RestGetIndicesAction; -import org.elasticsearch.rest.action.admin.indices.RestGetMappingAction; -import org.elasticsearch.rest.action.admin.indices.RestPutIndexTemplateAction; -import org.elasticsearch.rest.action.admin.indices.RestPutMappingAction; -import org.elasticsearch.rest.action.admin.indices.RestRolloverIndexAction; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.admin.indices.RestCreateIndexAction; +import org.opensearch.rest.action.admin.indices.RestGetFieldMappingAction; +import org.opensearch.rest.action.admin.indices.RestGetIndexTemplateAction; +import org.opensearch.rest.action.admin.indices.RestGetIndicesAction; +import org.opensearch.rest.action.admin.indices.RestGetMappingAction; +import org.opensearch.rest.action.admin.indices.RestPutIndexTemplateAction; +import org.opensearch.rest.action.admin.indices.RestPutMappingAction; +import org.opensearch.rest.action.admin.indices.RestRolloverIndexAction; import java.io.IOException; import java.util.Arrays; @@ -819,7 +819,7 @@ public void testAliasesNonExistentIndex() throws IOException { highLevelClient().indices()::updateAliases, highLevelClient().indices()::updateAliasesAsync)); assertThat(exception.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(exception.getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); assertThat(exception.getMetadata("es.index"), hasItem(nonExistentIndex)); createIndex(index, Settings.EMPTY); @@ -830,7 +830,7 @@ public void testAliasesNonExistentIndex() throws IOException { () -> execute(mixedRequest, highLevelClient().indices()::updateAliases, highLevelClient().indices()::updateAliasesAsync)); assertThat(exception.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(exception.getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); assertThat(exception.getMetadata("es.index"), hasItem(nonExistentIndex)); assertThat(exception.getMetadata("es.index"), not(hasItem(index))); assertThat(aliasExists(index, alias), equalTo(false)); @@ -843,7 +843,7 @@ public void testAliasesNonExistentIndex() throws IOException { highLevelClient().indices()::updateAliasesAsync)); assertThat(exception.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(exception.getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); assertThat(exception.getMetadata("es.index"), hasItem(nonExistentIndex)); assertThat(exception.getMetadata("es.index"), not(hasItem(index))); assertThat(aliasExists(index, alias), equalTo(false)); @@ -1387,7 +1387,7 @@ public void testGetAliasesNonExistentIndexOrAlias() throws IOException { highLevelClient().indices()::getAliasAsync); assertThat(getAliasesResponse.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(getAliasesResponse.getException().getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]")); } { GetAliasesRequest getAliasesRequest = new GetAliasesRequest(alias); @@ -1407,7 +1407,7 @@ public void testGetAliasesNonExistentIndexOrAlias() throws IOException { assertThat(getAliasesResponse.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(getAliasesResponse.getError(), nullValue()); assertThat(getAliasesResponse.getException().getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); } { GetAliasesRequest getAliasesRequest = new GetAliasesRequest().indices(index, "non_existent_index").aliases(alias); @@ -1416,7 +1416,7 @@ public void testGetAliasesNonExistentIndexOrAlias() throws IOException { assertThat(getAliasesResponse.getAliases().size(), equalTo(0)); assertThat(getAliasesResponse.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(getAliasesResponse.getException().getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [non_existent_index]]")); } { GetAliasesRequest getAliasesRequest = new GetAliasesRequest().indices("non_existent_index*"); @@ -1494,7 +1494,7 @@ public void testIndexPutSettings() throws IOException { OpenSearchException exception = expectThrows(OpenSearchException.class, () -> execute(staticSettingRequest, highLevelClient().indices()::putSettings, highLevelClient().indices()::putSettingsAsync)); assertThat(exception.getMessage(), - startsWith("Elasticsearch exception [type=illegal_argument_exception, " + startsWith("OpenSearch exception [type=illegal_argument_exception, " + "reason=Can't update non dynamic settings [[index.shard.check_on_startup]] for open indices [[index/")); indexSettingsAsMap = getIndexSettingsAsMap(index); @@ -1514,13 +1514,13 @@ public void testIndexPutSettings() throws IOException { exception = expectThrows(OpenSearchException.class, () -> execute(unmodifiableSettingRequest, highLevelClient().indices()::putSettings, highLevelClient().indices()::putSettingsAsync)); assertThat(exception.getMessage(), startsWith( - "Elasticsearch exception [type=illegal_argument_exception, " + "OpenSearch exception [type=illegal_argument_exception, " + "reason=Can't update non dynamic settings [[index.number_of_shards]] for open indices [[index/")); closeIndex(index); exception = expectThrows(OpenSearchException.class, () -> execute(unmodifiableSettingRequest, highLevelClient().indices()::putSettings, highLevelClient().indices()::putSettingsAsync)); assertThat(exception.getMessage(), startsWith( - "Elasticsearch exception [type=illegal_argument_exception, " + "OpenSearch exception [type=illegal_argument_exception, " + "reason=final index setting [index.number_of_shards], not updateable")); } @@ -1536,14 +1536,14 @@ public void testIndexPutSettingNonExistent() throws IOException { highLevelClient().indices()::putSettings, highLevelClient().indices()::putSettingsAsync)); assertEquals(RestStatus.NOT_FOUND, exception.status()); assertThat(exception.getMessage(), - equalTo("Elasticsearch exception [type=index_not_found_exception, reason=no such index [index]]")); + equalTo("OpenSearch exception [type=index_not_found_exception, reason=no such index [index]]")); createIndex(index, Settings.EMPTY); exception = expectThrows(OpenSearchException.class, () -> execute(indexUpdateSettingsRequest, highLevelClient().indices()::putSettings, highLevelClient().indices()::putSettingsAsync)); assertThat(exception.status(), equalTo(RestStatus.BAD_REQUEST)); assertThat(exception.getMessage(), equalTo( - "Elasticsearch exception [type=illegal_argument_exception, " + "OpenSearch exception [type=illegal_argument_exception, " + "reason=unknown setting [index.no_idea_what_you_are_talking_about] please check that any required plugins are installed, " + "or check the breaking changes documentation for removed settings]")); } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesRequestConvertersTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesRequestConvertersTests.java index 395b7d97a3dda..73f7375571ab3 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesRequestConvertersTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesRequestConvertersTests.java @@ -84,7 +84,7 @@ import static org.elasticsearch.index.RandomCreateIndexGenerator.randomAlias; import static org.elasticsearch.index.RandomCreateIndexGenerator.randomIndexSettings; import static org.elasticsearch.index.alias.RandomAliasActionsGenerator.randomAliasAction; -import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; +import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.nullValue; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/ReindexIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/ReindexIT.java index c44a699fc67ed..ad4636385929d 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/ReindexIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/ReindexIT.java @@ -34,7 +34,7 @@ import org.elasticsearch.index.reindex.DeleteByQueryAction; import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.index.reindex.ReindexRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.tasks.RawTaskStatus; import org.elasticsearch.tasks.TaskId; @@ -268,7 +268,7 @@ public void onFailure(Exception e) { assertTrue(response.getTasks().isEmpty()); assertFalse(response.getNodeFailures().isEmpty()); assertEquals(1, response.getNodeFailures().size()); - assertEquals("Elasticsearch exception [type=resource_not_found_exception, reason=task [" + taskIdToRethrottle + "] is missing]", + assertEquals("OpenSearch exception [type=resource_not_found_exception, reason=task [" + taskIdToRethrottle + "] is missing]", response.getNodeFailures().get(0).getCause().getMessage()); } } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java index 889c9e1fb63cc..2fda1e27c1134 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java @@ -87,7 +87,7 @@ import org.elasticsearch.index.reindex.ReindexRequest; import org.elasticsearch.index.reindex.RemoteInfo; import org.elasticsearch.index.reindex.UpdateByQueryRequest; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.opensearch.script.mustache.MultiSearchTemplateRequest; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java index 6c03665e52d69..4b2cc62ec9908 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java @@ -64,7 +64,7 @@ import org.opensearch.index.rankeval.PrecisionAtK; import org.opensearch.index.rankeval.RecallAtK; import org.opensearch.join.aggregations.ChildrenAggregationBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.Aggregation; import org.elasticsearch.search.aggregations.InternalAggregations; @@ -252,7 +252,7 @@ public void testParseEntity() throws IOException { { IllegalStateException ise = expectThrows(IllegalStateException.class, () -> restHighLevelClient.parseEntity(new NStringEntity("", (ContentType) null), null)); - assertEquals("Elasticsearch didn't return the [Content-Type] header, unable to parse response body", ise.getMessage()); + assertEquals("OpenSearch didn't return the [Content-Type] header, unable to parse response body", ise.getMessage()); } { NStringEntity entity = new NStringEntity("", ContentType.APPLICATION_SVG_XML); @@ -315,7 +315,7 @@ public void testParseResponseException() throws IOException { Response response = new Response(REQUEST_LINE, new HttpHost("localhost", 9200), httpResponse); ResponseException responseException = new ResponseException(response); OpenSearchException openSearchException = restHighLevelClient.parseResponseException(responseException); - assertEquals("Elasticsearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); + assertEquals("OpenSearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); assertEquals(restStatus, openSearchException.status()); assertSame(responseException, openSearchException.getSuppressed()[0]); } @@ -394,7 +394,7 @@ public void testPerformRequestOnResponseExceptionWithEntity() throws IOException OpenSearchException openSearchException = expectThrows(OpenSearchException.class, () -> restHighLevelClient.performRequest(mainRequest, requestConverter, RequestOptions.DEFAULT, response -> response.getStatusLine().getStatusCode(), Collections.emptySet())); - assertEquals("Elasticsearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); + assertEquals("OpenSearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); assertEquals(restStatus, openSearchException.status()); assertSame(responseException, openSearchException.getSuppressed()[0]); } @@ -476,7 +476,7 @@ public void testPerformRequestOnResponseExceptionWithIgnoresErrorValidBody() thr response -> {throw new IllegalStateException();}, Collections.singleton(404))); assertEquals(RestStatus.NOT_FOUND, openSearchException.status()); assertSame(responseException, openSearchException.getSuppressed()[0]); - assertEquals("Elasticsearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); + assertEquals("OpenSearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); } public void testWrapResponseListenerOnSuccess() { @@ -543,7 +543,7 @@ public void testWrapResponseListenerOnResponseExceptionWithEntity() throws IOExc responseListener.onFailure(responseException); assertThat(trackingActionListener.exception.get(), instanceOf(OpenSearchException.class)); OpenSearchException openSearchException = (OpenSearchException)trackingActionListener.exception.get(); - assertEquals("Elasticsearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); + assertEquals("OpenSearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); assertEquals(restStatus, openSearchException.status()); assertSame(responseException, openSearchException.getSuppressed()[0]); } @@ -631,7 +631,7 @@ public void testWrapResponseListenerOnResponseExceptionWithIgnoresErrorValidBody OpenSearchException openSearchException = (OpenSearchException)trackingActionListener.exception.get(); assertEquals(RestStatus.NOT_FOUND, openSearchException.status()); assertSame(responseException, openSearchException.getSuppressed()[0]); - assertEquals("Elasticsearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); + assertEquals("OpenSearch exception [type=exception, reason=test error message]", openSearchException.getMessage()); } public void testDefaultNamedXContents() { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java index 5eb9e20be46db..644f4398e274c 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java @@ -50,8 +50,8 @@ import org.elasticsearch.index.query.TermsQueryBuilder; import org.opensearch.join.aggregations.Children; import org.opensearch.join.aggregations.ChildrenAggregationBuilder; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.document.RestIndexAction; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.document.RestIndexAction; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.opensearch.script.mustache.MultiSearchTemplateRequest; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/SnapshotIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/SnapshotIT.java index 8b0452c103871..0d5f9958d4e77 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/SnapshotIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/SnapshotIT.java @@ -43,7 +43,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.snapshots.RestoreInfo; import org.elasticsearch.snapshots.SnapshotInfo; @@ -110,7 +110,7 @@ public void testSnapshotGetRepositoriesNonExistent() { assertThat(exception.status(), equalTo(RestStatus.NOT_FOUND)); assertThat(exception.getMessage(), equalTo( - "Elasticsearch exception [type=repository_missing_exception, reason=[" + repository + "] missing]")); + "OpenSearch exception [type=repository_missing_exception, reason=[" + repository + "] missing]")); } public void testSnapshotDeleteRepository() throws IOException { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/StoredScriptsIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/StoredScriptsIT.java index 3c603959abdeb..7a359a8195b9c 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/StoredScriptsIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/StoredScriptsIT.java @@ -25,7 +25,7 @@ import org.opensearch.action.admin.cluster.storedscripts.PutStoredScriptRequest; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.Script; import org.elasticsearch.script.StoredScriptSource; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/TasksIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/TasksIT.java index a22bd6aaa7ad1..7bc2f56065687 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/TasksIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/TasksIT.java @@ -34,7 +34,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.reindex.ReindexRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/UpdateByQueryIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/UpdateByQueryIT.java index db68d83b9664b..79943c58c53c5 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/UpdateByQueryIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/UpdateByQueryIT.java @@ -33,7 +33,7 @@ import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.index.reindex.UpdateByQueryAction; import org.elasticsearch.index.reindex.UpdateByQueryRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.Script; import org.elasticsearch.tasks.RawTaskStatus; import org.elasticsearch.tasks.TaskId; @@ -158,7 +158,7 @@ public void onFailure(Exception e) { assertTrue(response.getTasks().isEmpty()); assertFalse(response.getNodeFailures().isEmpty()); assertEquals(1, response.getNodeFailures().size()); - assertEquals("Elasticsearch exception [type=resource_not_found_exception, reason=task [" + taskIdToRethrottle + "] is missing]", + assertEquals("OpenSearch exception [type=resource_not_found_exception, reason=task [" + taskIdToRethrottle + "] is missing]", response.getNodeFailures().get(0).getCause().getMessage()); } } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountRequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountRequestTests.java index 11821755da622..a92ad072a78e5 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountRequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountRequestTests.java @@ -28,7 +28,7 @@ import org.elasticsearch.index.query.MatchAllQueryBuilder; import org.elasticsearch.index.query.MatchQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.rest.action.RestActions; +import org.opensearch.rest.action.RestActions; import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.builder.SearchSourceBuilder; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountResponseTests.java index 5a622088a8326..236b700508345 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/CountResponseTests.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.action.RestActions; +import org.opensearch.rest.action.RestActions; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.test.ESTestCase; @@ -116,11 +116,11 @@ private void assertEqualInstances(CountResponse expectedInstance, CountResponse assertEquals(originalFailure.shard(), parsedFailure.shard()); assertEquals(originalFailure.shardId(), parsedFailure.shardId()); String originalMsg = originalFailure.getCause().getMessage(); - assertEquals(parsedFailure.getCause().getMessage(), "Elasticsearch exception [type=parsing_exception, reason=" + + assertEquals(parsedFailure.getCause().getMessage(), "OpenSearch exception [type=parsing_exception, reason=" + originalMsg + "]"); String nestedMsg = originalFailure.getCause().getCause().getMessage(); assertEquals(parsedFailure.getCause().getCause().getMessage(), - "Elasticsearch exception [type=illegal_argument_exception, reason=" + nestedMsg + "]"); + "OpenSearch exception [type=illegal_argument_exception, reason=" + nestedMsg + "]"); } } } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java index e1be829ac1422..97f3093fdcc09 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java @@ -81,7 +81,7 @@ import org.elasticsearch.index.reindex.RemoteInfo; import org.elasticsearch.index.reindex.ScrollableHitSource; import org.elasticsearch.index.reindex.UpdateByQueryRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; @@ -117,7 +117,7 @@ public void testIndex() throws Exception { Map jsonMap = new HashMap<>(); jsonMap.put("user", "kimchy"); jsonMap.put("postDate", new Date()); - jsonMap.put("message", "trying out Elasticsearch"); + jsonMap.put("message", "trying out OpenSearch"); IndexRequest indexRequest = new IndexRequest("posts") .id("1").source(jsonMap); // <1> //end::index-request-map @@ -131,7 +131,7 @@ public void testIndex() throws Exception { { builder.field("user", "kimchy"); builder.timeField("postDate", new Date()); - builder.field("message", "trying out Elasticsearch"); + builder.field("message", "trying out OpenSearch"); } builder.endObject(); IndexRequest indexRequest = new IndexRequest("posts") @@ -146,7 +146,7 @@ public void testIndex() throws Exception { .id("1") .source("user", "kimchy", "postDate", new Date(), - "message", "trying out Elasticsearch"); // <1> + "message", "trying out OpenSearch"); // <1> //end::index-request-shortcut IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT); assertEquals(DocWriteResponse.Result.UPDATED, indexResponse.getResult()); @@ -158,7 +158,7 @@ public void testIndex() throws Exception { String jsonString = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + - "\"message\":\"trying out Elasticsearch\"" + + "\"message\":\"trying out OpenSearch\"" + "}"; request.source(jsonString, XContentType.JSON); // <3> //end::index-request-string @@ -1248,7 +1248,7 @@ public void testGet() throws Exception { IndexRequest indexRequest = new IndexRequest("posts").id("1") .source("user", "kimchy", "postDate", new Date(), - "message", "trying out Elasticsearch"); + "message", "trying out OpenSearch"); IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT); assertEquals(DocWriteResponse.Result.CREATED, indexResponse.getResult()); } @@ -1297,7 +1297,7 @@ public void testGet() throws Exception { GetResponse getResponse = client.get(request, RequestOptions.DEFAULT); Map sourceAsMap = getResponse.getSourceAsMap(); assertEquals(2, sourceAsMap.size()); - assertEquals("trying out Elasticsearch", sourceAsMap.get("message")); + assertEquals("trying out OpenSearch", sourceAsMap.get("message")); assertTrue(sourceAsMap.containsKey("postDate")); } { @@ -1322,7 +1322,7 @@ public void testGet() throws Exception { GetResponse getResponse = client.get(request, RequestOptions.DEFAULT); String message = getResponse.getField("message").getValue(); // <2> //end::get-request-stored - assertEquals("trying out Elasticsearch", message); + assertEquals("trying out OpenSearch", message); assertEquals(1, getResponse.getFields().size()); assertNull(getResponse.getSourceInternal()); } @@ -1421,7 +1421,7 @@ public void testGetSource() throws Exception { IndexRequest indexRequest = new IndexRequest("posts").id("1") .source("user", "kimchy", "postDate", new Date(), - "message", "trying out Elasticsearch"); + "message", "trying out OpenSearch"); IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT); assertEquals(DocWriteResponse.Result.CREATED, indexResponse.getResult()); } @@ -1463,7 +1463,7 @@ public void testGetSource() throws Exception { Map expectSource = new HashMap<>(); expectSource.put("user", "kimchy"); - expectSource.put("message", "trying out Elasticsearch"); + expectSource.put("message", "trying out OpenSearch"); assertEquals(expectSource, source); } { @@ -1572,13 +1572,13 @@ public void afterBulk(long executionId, BulkRequest request, // tag::bulk-processor-add IndexRequest one = new IndexRequest("posts").id("1") .source(XContentType.JSON, "title", - "In which order are my Elasticsearch queries executed?"); + "In which order are my OpenSearch queries executed?"); IndexRequest two = new IndexRequest("posts").id("2") .source(XContentType.JSON, "title", - "Current status and upcoming changes in Elasticsearch"); + "Current status and upcoming changes in OpenSearch"); IndexRequest three = new IndexRequest("posts").id("3") .source(XContentType.JSON, "title", - "The Future of Federated Search in Elasticsearch"); + "The Future of Federated Search in OpenSearch"); bulkProcessor.add(one); bulkProcessor.add(two); diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ClusterClientDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ClusterClientDocumentationIT.java index 704e7b61d1954..e7a09550d84ec 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ClusterClientDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ClusterClientDocumentationIT.java @@ -54,7 +54,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.HashMap; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java index 6102f0b2680b2..71f188c8c003a 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java @@ -102,7 +102,7 @@ import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Arrays; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java index 61ba814c1efc1..f05d44985f385 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java @@ -73,7 +73,7 @@ import org.opensearch.index.rankeval.RatedDocument; import org.opensearch.index.rankeval.RatedRequest; import org.opensearch.index.rankeval.RatedSearchHit; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.ScriptType; import org.opensearch.script.mustache.MultiSearchTemplateRequest; import org.opensearch.script.mustache.MultiSearchTemplateResponse; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java index 95951b89e55bd..f3208a9d027cb 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java @@ -53,7 +53,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.snapshots.RestoreInfo; import org.elasticsearch.snapshots.SnapshotId; import org.elasticsearch.snapshots.SnapshotInfo; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/CloseIndexResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/CloseIndexResponseTests.java index e8179e148b17c..d3736a9ba7558 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/CloseIndexResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/CloseIndexResponseTests.java @@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.transport.ActionNotFoundTransportException; import java.io.IOException; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetIndexResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetIndexResponseTests.java index 6013d680eba7c..252e6d19ee69a 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetIndexResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetIndexResponseTests.java @@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.RandomCreateIndexGenerator; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.rest.BaseRestHandler; +import org.opensearch.rest.BaseRestHandler; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetMappingsResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetMappingsResponseTests.java index b6761261fa0e9..e2f272be51f26 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetMappingsResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetMappingsResponseTests.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.xcontent.ToXContent.Params; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.rest.BaseRestHandler; +import org.opensearch.rest.BaseRestHandler; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/rollover/RolloverResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/rollover/RolloverResponseTests.java index e2e2e27994829..e50ef819ca6dc 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/rollover/RolloverResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/rollover/RolloverResponseTests.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.rest.BaseRestHandler; +import org.opensearch.rest.BaseRestHandler; import org.elasticsearch.common.xcontent.ToXContent.Params; import java.io.IOException; diff --git a/modules/ingest-common/src/main/java/org/opensearch/ingest/common/GrokProcessorGetAction.java b/modules/ingest-common/src/main/java/org/opensearch/ingest/common/GrokProcessorGetAction.java index 4d61f13358637..b998b98f06126 100644 --- a/modules/ingest-common/src/main/java/org/opensearch/ingest/common/GrokProcessorGetAction.java +++ b/modules/ingest-common/src/main/java/org/opensearch/ingest/common/GrokProcessorGetAction.java @@ -33,9 +33,9 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.grok.Grok; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; import org.elasticsearch.tasks.Task; import org.elasticsearch.transport.TransportService; @@ -45,7 +45,7 @@ import java.util.TreeMap; import static java.util.Collections.singletonList; -import static org.elasticsearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.GET; public class GrokProcessorGetAction extends ActionType { diff --git a/modules/ingest-common/src/main/java/org/opensearch/ingest/common/IngestCommonPlugin.java b/modules/ingest-common/src/main/java/org/opensearch/ingest/common/IngestCommonPlugin.java index a1ccec923948e..ab8dbd095bad9 100644 --- a/modules/ingest-common/src/main/java/org/opensearch/ingest/common/IngestCommonPlugin.java +++ b/modules/ingest-common/src/main/java/org/opensearch/ingest/common/IngestCommonPlugin.java @@ -37,8 +37,8 @@ import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.IngestPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import java.util.Arrays; import java.util.Collections; diff --git a/modules/ingest-geoip/src/internalClusterTest/java/org/opensearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java b/modules/ingest-geoip/src/internalClusterTest/java/org/opensearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java index 0a4437851a131..17bd994183ce2 100644 --- a/modules/ingest-geoip/src/internalClusterTest/java/org/opensearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/opensearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java @@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.ingest.IngestService; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.NodeRoles; import org.elasticsearch.test.StreamsUtils; diff --git a/modules/kibana/src/main/java/org/elasticsearch/kibana/KibanaPlugin.java b/modules/kibana/src/main/java/org/elasticsearch/kibana/KibanaPlugin.java index e2791d58f3c5a..736653e064dda 100644 --- a/modules/kibana/src/main/java/org/elasticsearch/kibana/KibanaPlugin.java +++ b/modules/kibana/src/main/java/org/elasticsearch/kibana/KibanaPlugin.java @@ -31,26 +31,26 @@ import org.elasticsearch.indices.SystemIndexDescriptor; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.SystemIndexPlugin; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; -import org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction; -import org.elasticsearch.rest.action.admin.indices.RestGetAliasesAction; -import org.elasticsearch.rest.action.admin.indices.RestGetIndicesAction; -import org.elasticsearch.rest.action.admin.indices.RestIndexPutAliasAction; -import org.elasticsearch.rest.action.admin.indices.RestRefreshAction; -import org.elasticsearch.rest.action.admin.indices.RestUpdateSettingsAction; -import org.elasticsearch.rest.action.document.RestBulkAction; -import org.elasticsearch.rest.action.document.RestDeleteAction; -import org.elasticsearch.rest.action.document.RestGetAction; -import org.elasticsearch.rest.action.document.RestIndexAction; -import org.elasticsearch.rest.action.document.RestIndexAction.AutoIdHandler; -import org.elasticsearch.rest.action.document.RestIndexAction.CreateHandler; -import org.elasticsearch.rest.action.document.RestMultiGetAction; -import org.elasticsearch.rest.action.document.RestUpdateAction; -import org.elasticsearch.rest.action.search.RestClearScrollAction; -import org.elasticsearch.rest.action.search.RestSearchAction; -import org.elasticsearch.rest.action.search.RestSearchScrollAction; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; +import org.opensearch.rest.action.admin.indices.RestCreateIndexAction; +import org.opensearch.rest.action.admin.indices.RestGetAliasesAction; +import org.opensearch.rest.action.admin.indices.RestGetIndicesAction; +import org.opensearch.rest.action.admin.indices.RestIndexPutAliasAction; +import org.opensearch.rest.action.admin.indices.RestRefreshAction; +import org.opensearch.rest.action.admin.indices.RestUpdateSettingsAction; +import org.opensearch.rest.action.document.RestBulkAction; +import org.opensearch.rest.action.document.RestDeleteAction; +import org.opensearch.rest.action.document.RestGetAction; +import org.opensearch.rest.action.document.RestIndexAction; +import org.opensearch.rest.action.document.RestIndexAction.AutoIdHandler; +import org.opensearch.rest.action.document.RestIndexAction.CreateHandler; +import org.opensearch.rest.action.document.RestMultiGetAction; +import org.opensearch.rest.action.document.RestUpdateAction; +import org.opensearch.rest.action.search.RestClearScrollAction; +import org.opensearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.action.search.RestSearchScrollAction; import java.util.Arrays; import java.util.Collection; diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/MustachePlugin.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/MustachePlugin.java index 4c5b8d39cb768..2b0298d6576e5 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/MustachePlugin.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/MustachePlugin.java @@ -31,8 +31,8 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.ScriptPlugin; import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptEngine; diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestMultiSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestMultiSearchTemplateAction.java index 4b9c88f0a0371..81a2f8d545bbe 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestMultiSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestMultiSearchTemplateAction.java @@ -22,11 +22,11 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; -import org.elasticsearch.rest.action.search.RestMultiSearchAction; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; +import org.opensearch.rest.action.search.RestMultiSearchAction; +import org.opensearch.rest.action.search.RestSearchAction; import java.io.IOException; import java.util.Collections; @@ -36,8 +36,8 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestMultiSearchTemplateAction extends BaseRestHandler { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestMultiSearchTemplateAction.class); diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java index ee3034e4b3042..a3e5f47692765 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java @@ -21,9 +21,9 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; import org.elasticsearch.script.ScriptType; import java.io.IOException; @@ -31,8 +31,8 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestRenderSearchTemplateAction extends BaseRestHandler { diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestSearchTemplateAction.java index 00db13739d39d..0408a769cc5ed 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestSearchTemplateAction.java @@ -22,10 +22,10 @@ import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestStatusToXContentListener; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestStatusToXContentListener; +import org.opensearch.rest.action.search.RestSearchAction; import java.io.IOException; import java.util.Arrays; @@ -36,8 +36,8 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestSearchTemplateAction extends BaseRestHandler { public static final String TYPED_KEYS_PARAM = "typed_keys"; diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/SearchTemplateResponse.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/SearchTemplateResponse.java index 1795bf4ea702b..1241cbf7c5f63 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/SearchTemplateResponse.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/SearchTemplateResponse.java @@ -30,7 +30,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.io.InputStream; diff --git a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java index e3273d78d29e2..46ac5910dab6e 100644 --- a/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java @@ -32,7 +32,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; diff --git a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/MultiSearchTemplateRequestTests.java b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/MultiSearchTemplateRequestTests.java index 7a3e457de8238..4016af975d12a 100644 --- a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/MultiSearchTemplateRequestTests.java +++ b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/MultiSearchTemplateRequestTests.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.Scroll; import org.elasticsearch.search.builder.SearchSourceBuilder; diff --git a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestMultiSearchTemplateActionTests.java b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestMultiSearchTemplateActionTests.java index a8e5ea188d002..82d68bd92bfcd 100644 --- a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestMultiSearchTemplateActionTests.java +++ b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestMultiSearchTemplateActionTests.java @@ -21,7 +21,7 @@ import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.RestActionTestCase; import org.junit.Before; diff --git a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestSearchTemplateActionTests.java b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestSearchTemplateActionTests.java index b07b83ba32e5e..a2b9fb5078e73 100644 --- a/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestSearchTemplateActionTests.java +++ b/modules/lang-mustache/src/test/java/org/opensearch/script/mustache/RestSearchTemplateActionTests.java @@ -18,8 +18,8 @@ */ package org.opensearch.script.mustache; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.RestActionTestCase; import org.junit.Before; diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java index 380f619fe614e..6cf1fd8553565 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java @@ -46,8 +46,8 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.ScriptPlugin; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import org.elasticsearch.script.IngestScript; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.ScriptContext; @@ -83,17 +83,17 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin, Extens // Moving Function Pipeline Agg List movFn = new ArrayList<>(Whitelist.BASE_WHITELISTS); - movFn.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.elasticsearch.aggs.movfn.txt")); + movFn.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.opensearch.aggs.movfn.txt")); map.put(MovingFunctionScript.CONTEXT, movFn); // Functions used for scoring docs List scoreFn = new ArrayList<>(Whitelist.BASE_WHITELISTS); - scoreFn.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.elasticsearch.score.txt")); + scoreFn.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.opensearch.score.txt")); map.put(ScoreScript.CONTEXT, scoreFn); // Functions available to ingest pipelines List ingest = new ArrayList<>(Whitelist.BASE_WHITELISTS); - ingest.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.elasticsearch.ingest.txt")); + ingest.add(WhitelistLoader.loadFromResourceFiles(Whitelist.class, "org.opensearch.ingest.txt")); map.put(IngestScript.CONTEXT, ingest); whitelists = map; diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessContextAction.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessContextAction.java index 0141f7ecb437b..97e35f5acf2dc 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessContextAction.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessContextAction.java @@ -36,9 +36,9 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.painless.PainlessScriptEngine; import org.elasticsearch.painless.lookup.PainlessLookup; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.tasks.Task; import org.elasticsearch.transport.TransportService; @@ -52,7 +52,7 @@ import java.util.stream.Collectors; import static java.util.Collections.singletonList; -import static org.elasticsearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.GET; /** * Internal REST API for querying context information about Painless whitelists. diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java index 2295506a3bad5..4b9345b4ba7a0 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java @@ -69,9 +69,9 @@ import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; import org.elasticsearch.script.FilterScript; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; @@ -91,8 +91,8 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; import static org.opensearch.action.ValidateActions.addValidationError; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; public class PainlessExecuteAction extends ActionType { diff --git a/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/query/ChildQuerySearchIT.java b/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/query/ChildQuerySearchIT.java index 21dbe24331d5c..e2329c610fa68 100644 --- a/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/query/ChildQuerySearchIT.java +++ b/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/query/ChildQuerySearchIT.java @@ -37,7 +37,7 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.bucket.filter.Filter; diff --git a/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RankEvalPlugin.java b/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RankEvalPlugin.java index 7444ce77e7a1d..e9359e58423d4 100644 --- a/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RankEvalPlugin.java +++ b/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RankEvalPlugin.java @@ -31,8 +31,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry; import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import java.util.ArrayList; import java.util.Arrays; diff --git a/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RestRankEvalAction.java b/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RestRankEvalAction.java index acf90514e2352..69b84f9344d69 100644 --- a/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RestRankEvalAction.java +++ b/modules/rank-eval/src/main/java/org/opensearch/index/rankeval/RestRankEvalAction.java @@ -24,17 +24,17 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.RestToXContentListener; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.RestToXContentListener; import java.io.IOException; import java.util.List; import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; /** * { diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractAsyncBulkByScrollAction.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractAsyncBulkByScrollAction.java index 52a3d171c585d..db789ccd3e899 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractAsyncBulkByScrollAction.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractAsyncBulkByScrollAction.java @@ -83,7 +83,7 @@ import static org.elasticsearch.action.bulk.BackoffPolicy.exponentialBackoff; import static org.elasticsearch.common.unit.TimeValue.timeValueNanos; import static org.elasticsearch.index.reindex.AbstractBulkByScrollRequest.MAX_DOCS_ALL_MATCHES; -import static org.elasticsearch.rest.RestStatus.CONFLICT; +import static org.opensearch.rest.RestStatus.CONFLICT; import static org.elasticsearch.search.sort.SortBuilders.fieldSort; /** diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBaseReindexRestHandler.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBaseReindexRestHandler.java index e21930868438c..df9bf992ba28e 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBaseReindexRestHandler.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBaseReindexRestHandler.java @@ -25,13 +25,10 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest; -import org.elasticsearch.index.reindex.BulkByScrollResponse; -import org.elasticsearch.index.reindex.BulkByScrollTask; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import org.elasticsearch.tasks.LoggingTaskListener; import org.elasticsearch.tasks.Task; diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBulkByQueryRestHandler.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBulkByQueryRestHandler.java index d1c0a80c1be4d..6a4b29d540140 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBulkByQueryRestHandler.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/AbstractBulkByQueryRestHandler.java @@ -27,10 +27,8 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest; -import org.elasticsearch.index.reindex.BulkByScrollResponse; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.search.RestSearchAction; import java.io.IOException; import java.util.Map; diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/BulkIndexByScrollResponseContentListener.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/BulkIndexByScrollResponseContentListener.java index be0d6f41db1ac..36863d56920bc 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/BulkIndexByScrollResponseContentListener.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/BulkIndexByScrollResponseContentListener.java @@ -24,11 +24,11 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.RestBuilderListener; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.RestBuilderListener; import java.util.Map; diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/ReindexPlugin.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/ReindexPlugin.java index 31ad01185b20b..9f24ac2f0b3ec 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/ReindexPlugin.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/ReindexPlugin.java @@ -41,8 +41,8 @@ import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestDeleteByQueryAction.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestDeleteByQueryAction.java index 21a50ba6ea996..56ea501af81e3 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestDeleteByQueryAction.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestDeleteByQueryAction.java @@ -21,9 +21,7 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.index.reindex.DeleteByQueryAction; -import org.elasticsearch.index.reindex.DeleteByQueryRequest; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import java.io.IOException; import java.util.HashMap; @@ -33,7 +31,7 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestDeleteByQueryAction extends AbstractBulkByQueryRestHandler { diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestReindexAction.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestReindexAction.java index 83a01df0db8cc..dd240ee9b049d 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestReindexAction.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestReindexAction.java @@ -23,10 +23,8 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.reindex.ReindexAction; -import org.elasticsearch.index.reindex.ReindexRequest; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestRequestFilter; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestRequestFilter; import java.io.IOException; import java.util.Collections; @@ -35,7 +33,7 @@ import static java.util.Collections.singletonList; import static org.elasticsearch.common.unit.TimeValue.parseTimeValue; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.POST; /** * Expose reindex over rest. diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestRethrottleAction.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestRethrottleAction.java index 0de3a8b9a99a7..5b6866343f48e 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestRethrottleAction.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestRethrottleAction.java @@ -21,8 +21,8 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.BaseRestHandler; +import org.opensearch.rest.RestRequest; import org.elasticsearch.tasks.TaskId; import java.util.List; @@ -30,8 +30,8 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.POST; -import static org.elasticsearch.rest.action.admin.cluster.RestListTasksAction.listTasksResponseListener; +import static org.opensearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.action.admin.cluster.RestListTasksAction.listTasksResponseListener; public class RestRethrottleAction extends BaseRestHandler { private final Supplier nodesInCluster; diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestUpdateByQueryAction.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestUpdateByQueryAction.java index b43f26685f35b..43b6cf0a64f3e 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/RestUpdateByQueryAction.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/RestUpdateByQueryAction.java @@ -21,9 +21,7 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.index.reindex.UpdateByQueryAction; -import org.elasticsearch.index.reindex.UpdateByQueryRequest; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import org.elasticsearch.script.Script; import java.io.IOException; @@ -34,7 +32,7 @@ import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.POST; public class RestUpdateByQueryAction extends AbstractBulkByQueryRestHandler { diff --git a/modules/reindex/src/main/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSource.java b/modules/reindex/src/main/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSource.java index 0e9b6ef662b0a..3420a0c9d4f46 100644 --- a/modules/reindex/src/main/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSource.java +++ b/modules/reindex/src/main/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSource.java @@ -47,7 +47,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.reindex.RejectAwareActionListener; import org.elasticsearch.index.reindex.ScrollableHitSource; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import java.io.IOException; @@ -124,7 +124,7 @@ private void logFailure(Exception e) { if (remoteVersion.before(Version.fromId(2000099)) && re.getResponse().getStatusLine().getStatusCode() == 404) { logger.debug((Supplier) () -> new ParameterizedMessage( - "Failed to clear scroll [{}] from pre-2.0 Elasticsearch. This is normal if the request terminated " + "Failed to clear scroll [{}] from pre-2.0 OpenSearch. This is normal if the request terminated " + "normally as the scroll has already been cleared automatically.", scrollId), e); return; } diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/AsyncBulkByScrollActionTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/AsyncBulkByScrollActionTests.java index a0b0e6ded7e81..9edc6cd19ddae 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/AsyncBulkByScrollActionTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/AsyncBulkByScrollActionTests.java @@ -76,7 +76,7 @@ import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; import org.elasticsearch.index.reindex.WorkerBulkByScrollTaskState; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.internal.InternalSearchResponse; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteWithAuthTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteWithAuthTests.java index 09ac58edecc45..fc46e564b1d72 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteWithAuthTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteWithAuthTests.java @@ -49,8 +49,8 @@ import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestHeaderDefinition; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestHeaderDefinition; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.ScriptService; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.ESSingleNodeTestCase; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestDeleteByQueryActionTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestDeleteByQueryActionTests.java index 5e449230137d1..d891e2c6e9921 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestDeleteByQueryActionTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestDeleteByQueryActionTests.java @@ -20,10 +20,8 @@ package org.opensearch.index.reindex; import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest; -import org.elasticsearch.index.reindex.DeleteByQueryRequest; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.RestActionTestCase; import org.junit.Before; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestReindexActionTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestReindexActionTests.java index 903a837e5e4a2..ccc9e63349dac 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestReindexActionTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestReindexActionTests.java @@ -25,9 +25,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest; -import org.elasticsearch.index.reindex.ReindexRequest; -import org.elasticsearch.rest.RestRequest.Method; +import org.opensearch.rest.RestRequest.Method; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.RestActionTestCase; import org.junit.Before; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestUpdateByQueryActionTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestUpdateByQueryActionTests.java index 9e84730625a8c..2af01c6019944 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/RestUpdateByQueryActionTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/RestUpdateByQueryActionTests.java @@ -20,10 +20,8 @@ package org.opensearch.index.reindex; import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest; -import org.elasticsearch.index.reindex.UpdateByQueryRequest; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.RestActionTestCase; import org.junit.Before; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSourceTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSourceTests.java index df7c8e26f455a..63d296748c5ae 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSourceTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/remote/RemoteScrollableHitSourceTests.java @@ -55,7 +55,7 @@ import org.elasticsearch.index.reindex.RejectAwareActionListener; import org.elasticsearch.index.reindex.ScrollableHitSource; import org.elasticsearch.index.reindex.ScrollableHitSource.Response; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; @@ -221,7 +221,7 @@ public void testParseScrollFullyLoadedFrom1_7() throws Exception { } /** - * Versions of Elasticsearch before 2.1.0 don't support sort:_doc and instead need to use search_type=scan. Scan doesn't return + * Versions of OpenSearch before 2.1.0 don't support sort:_doc and instead need to use search_type=scan. Scan doesn't return * documents the first iteration but reindex doesn't like that. So we jump start strait to the next iteration. */ public void testScanJumpStart() throws Exception { @@ -255,8 +255,8 @@ public void testParseRejection() throws Exception { assertEquals((Integer) 0, r.getFailures().get(0).getShardId()); assertEquals("87A7NvevQxSrEwMbtRCecg", r.getFailures().get(0).getNodeId()); assertThat(r.getFailures().get(0).getReason(), instanceOf(EsRejectedExecutionException.class)); - assertEquals("rejected execution of org.elasticsearch.transport.TransportService$5@52d06af2 on " - + "EsThreadPoolExecutor[search, queue capacity = 1000, org.elasticsearch.common.util.concurrent." + assertEquals("rejected execution of org.opensearch.transport.TransportService$5@52d06af2 on " + + "EsThreadPoolExecutor[search, queue capacity = 1000, org.opensearch.common.util.concurrent." + "EsThreadPoolExecutor@778ea553[Running, pool size = 7, active threads = 7, queued tasks = 1000, " + "completed tasks = 4182]]", r.getFailures().get(0).getReason().getMessage()); assertThat(r.getHits(), hasSize(1)); @@ -462,14 +462,14 @@ public void testNoContentTypeIsError() { public void testInvalidJsonThinksRemoteIsNotES() throws IOException { Exception e = expectThrows(RuntimeException.class, () -> sourceWithMockedRemoteCall("some_text.txt").start()); - assertEquals("Error parsing the response, remote is likely not an Elasticsearch instance", + assertEquals("Error parsing the response, remote is likely not an OpenSearch instance", e.getCause().getCause().getCause().getMessage()); } public void testUnexpectedJsonThinksRemoteIsNotES() throws IOException { // Use the response from a main action instead of a proper start response to generate a parse error Exception e = expectThrows(RuntimeException.class, () -> sourceWithMockedRemoteCall("main/2_3_3.json").start()); - assertEquals("Error parsing the response, remote is likely not an Elasticsearch instance", + assertEquals("Error parsing the response, remote is likely not an OpenSearch instance", e.getCause().getCause().getCause().getMessage()); } diff --git a/modules/repository-url/src/test/java/org/opensearch/repositories/url/URLFixture.java b/modules/repository-url/src/test/java/org/opensearch/repositories/url/URLFixture.java index 1518db51c0ab4..7ced3a44cbcef 100644 --- a/modules/repository-url/src/test/java/org/opensearch/repositories/url/URLFixture.java +++ b/modules/repository-url/src/test/java/org/opensearch/repositories/url/URLFixture.java @@ -20,7 +20,7 @@ import org.elasticsearch.test.fixture.AbstractHttpFixture; import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.nio.file.Files; diff --git a/modules/repository-url/src/yamlRestTest/java/org/opensearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java b/modules/repository-url/src/yamlRestTest/java/org/opensearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java index 819dd136b0696..b7deba0c3a1ab 100644 --- a/modules/repository-url/src/yamlRestTest/java/org/opensearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java +++ b/modules/repository-url/src/yamlRestTest/java/org/opensearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.junit.Before; diff --git a/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4BadRequestIT.java b/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4BadRequestIT.java index 5bc1bc978ef96..cd59289f17e87 100644 --- a/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4BadRequestIT.java +++ b/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4BadRequestIT.java @@ -34,7 +34,7 @@ import java.nio.charset.Charset; import java.util.Map; -import static org.elasticsearch.rest.RestStatus.BAD_REQUEST; +import static org.opensearch.rest.RestStatus.BAD_REQUEST; import static org.elasticsearch.test.hamcrest.RegexMatcher.matches; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4HeadBodyIsEmptyIT.java b/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4HeadBodyIsEmptyIT.java index e7a6a4d701155..5a67a46d96d4f 100644 --- a/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4HeadBodyIsEmptyIT.java +++ b/modules/transport-netty4/src/javaRestTest/java/org/opensearch/rest/Netty4HeadBodyIsEmptyIT.java @@ -32,8 +32,8 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.rest.RestStatus.NOT_FOUND; -import static org.elasticsearch.rest.RestStatus.OK; +import static org.opensearch.rest.RestStatus.NOT_FOUND; +import static org.opensearch.rest.RestStatus.OK; import static org.hamcrest.Matchers.greaterThan; public class Netty4HeadBodyIsEmptyIT extends ESRestTestCase { diff --git a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java index 682c10deb073b..051df3196a230 100644 --- a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java +++ b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java @@ -32,8 +32,8 @@ import io.netty.handler.codec.http.cookie.ServerCookieEncoder; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.http.HttpRequest; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import org.opensearch.transport.netty4.Netty4Utils; import java.util.AbstractMap; diff --git a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpResponse.java b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpResponse.java index 3ed619aa84250..00c9bf87281b4 100644 --- a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpResponse.java +++ b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpResponse.java @@ -25,7 +25,7 @@ import io.netty.handler.codec.http.HttpVersion; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.http.HttpResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.opensearch.transport.netty4.Netty4Utils; public class Netty4HttpResponse extends DefaultFullHttpResponse implements HttpResponse { diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java index d56548cca37f0..66a80b41e3718 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java @@ -32,10 +32,10 @@ import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.http.HttpTransportSettings; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpPipeliningHandlerTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpPipeliningHandlerTests.java index 52affec45b6a9..d6519be9cf496 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpPipeliningHandlerTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpPipeliningHandlerTests.java @@ -34,7 +34,7 @@ import org.elasticsearch.http.HttpPipelinedRequest; import org.elasticsearch.http.HttpPipelinedResponse; import org.elasticsearch.http.HttpResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.junit.After; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java index 148db28441683..2b0fc2c318fe2 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java @@ -40,7 +40,7 @@ import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.http.NullDispatcher; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java index 3cde8d25ad7db..7294b61ee15f7 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java @@ -63,9 +63,9 @@ import org.elasticsearch.http.HttpTransportSettings; import org.elasticsearch.http.NullDispatcher; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.threadpool.TestThreadPool; @@ -85,8 +85,8 @@ import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN; import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED; -import static org.elasticsearch.rest.RestStatus.BAD_REQUEST; -import static org.elasticsearch.rest.RestStatus.OK; +import static org.opensearch.rest.RestStatus.BAD_REQUEST; +import static org.opensearch.rest.RestStatus.OK; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugins/discovery-ec2/qa/amazon-ec2/src/yamlRestTest/java/org/elasticsearch/discovery/ec2/AmazonEC2Fixture.java b/plugins/discovery-ec2/qa/amazon-ec2/src/yamlRestTest/java/org/elasticsearch/discovery/ec2/AmazonEC2Fixture.java index 1345b806226d5..d0b88b3c7464e 100644 --- a/plugins/discovery-ec2/qa/amazon-ec2/src/yamlRestTest/java/org/elasticsearch/discovery/ec2/AmazonEC2Fixture.java +++ b/plugins/discovery-ec2/qa/amazon-ec2/src/yamlRestTest/java/org/elasticsearch/discovery/ec2/AmazonEC2Fixture.java @@ -26,7 +26,7 @@ import org.apache.http.client.utils.URLEncodedUtils; import org.elasticsearch.common.Booleans; import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.fixture.AbstractHttpFixture; import javax.xml.XMLConstants; diff --git a/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2NetworkTests.java b/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2NetworkTests.java index 9e7f2429b08b6..1f671fede0ee4 100644 --- a/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2NetworkTests.java +++ b/plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2NetworkTests.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.mocksocket.MockHttpServer; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.junit.AfterClass; import org.junit.Before; diff --git a/plugins/discovery-gce/qa/gce/src/yamlRestTest/java/org/elasticsearch/cloud/gce/GCEFixture.java b/plugins/discovery-gce/qa/gce/src/yamlRestTest/java/org/elasticsearch/cloud/gce/GCEFixture.java index 08663f7afc89e..64e7ab2880fad 100644 --- a/plugins/discovery-gce/qa/gce/src/yamlRestTest/java/org/elasticsearch/cloud/gce/GCEFixture.java +++ b/plugins/discovery-gce/qa/gce/src/yamlRestTest/java/org/elasticsearch/cloud/gce/GCEFixture.java @@ -23,8 +23,8 @@ import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.path.PathTrie; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.RestUtils; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.RestUtils; import org.elasticsearch.test.fixture.AbstractHttpFixture; import java.io.IOException; diff --git a/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleCatAction.java b/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleCatAction.java index 1a8e2485529f0..746c80292b03a 100644 --- a/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleCatAction.java +++ b/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleCatAction.java @@ -20,17 +20,17 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Table; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.action.cat.AbstractCatAction; -import org.elasticsearch.rest.action.cat.RestTable; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.action.cat.AbstractCatAction; +import org.opensearch.rest.action.cat.RestTable; import java.util.List; import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableList; -import static org.elasticsearch.rest.RestRequest.Method.GET; -import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.rest.RestRequest.Method.POST; /** * Example of adding a cat action with a plugin. diff --git a/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleRestHandlerPlugin.java b/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleRestHandlerPlugin.java index 420a58302f35c..e11e8448832a0 100644 --- a/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleRestHandlerPlugin.java +++ b/plugins/examples/rest-handler/src/main/java/org/elasticsearch/example/resthandler/ExampleRestHandlerPlugin.java @@ -27,8 +27,8 @@ import org.elasticsearch.common.settings.SettingsFilter; import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; import java.util.List; import java.util.function.Supplier; diff --git a/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java b/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java index 944081d75ea75..a2b2fc2e1545b 100644 --- a/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java +++ b/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.blobstore.ESMockAPIBasedRepositoryIntegTestCase; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java index af623217c2287..751406e02afc2 100644 --- a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java +++ b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java @@ -43,8 +43,8 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.CountDown; import org.elasticsearch.mocksocket.MockHttpServer; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.RestUtils; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.RestUtils; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java b/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java index 43fb28753d460..8b023cf56ce32 100644 --- a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java +++ b/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java @@ -46,8 +46,8 @@ import org.elasticsearch.common.util.concurrent.CountDown; import org.elasticsearch.repositories.blobstore.AbstractBlobContainerRetriesTestCase; import org.elasticsearch.repositories.blobstore.ESMockAPIBasedRepositoryIntegTestCase; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.RestUtils; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.RestUtils; import org.junit.BeforeClass; import org.threeten.bp.Duration; diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java index a171c1e6364c8..63b4aa6ab514b 100644 --- a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java +++ b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java @@ -36,10 +36,10 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.PluginsService; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.AbstractRestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.action.admin.cluster.RestGetRepositoriesAction; +import org.opensearch.rest.AbstractRestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.action.admin.cluster.RestGetRepositoriesAction; import org.elasticsearch.test.ESSingleNodeTestCase; import org.elasticsearch.test.rest.FakeRestRequest; @@ -120,11 +120,11 @@ public void testRepositoryCredentialsOverrideSecureCredentials() { assertThat(credentials.getAWSSecretKey(), is("insecure_aws_secret")); assertWarnings( - "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release!" + "[secret_key] setting was deprecated in OpenSearch and will be removed in a future release!" + " See the breaking changes documentation for the next major version.", "Using s3 access/secret key from repository settings. Instead store these in named clients and" - + " the elasticsearch keystore for secure settings.", - "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release!" + + " the opensearch keystore for secure settings.", + "[access_key] setting was deprecated in OpenSearch and will be removed in a future release!" + " See the breaking changes documentation for the next major version."); } @@ -205,11 +205,11 @@ public void testReinitSecureCredentials() { if (hasInsecureSettings) { assertWarnings( - "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release!" + "[secret_key] setting was deprecated in OpenSearch and will be removed in a future release!" + " See the breaking changes documentation for the next major version.", "Using s3 access/secret key from repository settings. Instead store these in named clients and" - + " the elasticsearch keystore for secure settings.", - "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release!" + + " the opensearch keystore for secure settings.", + "[access_key] setting was deprecated in OpenSearch and will be removed in a future release!" + " See the breaking changes documentation for the next major version."); } } @@ -248,7 +248,7 @@ public void sendResponse(RestResponse response) { assertWarnings( "Using s3 access/secret key from repository settings. Instead store these in named clients and" - + " the elasticsearch keystore for secure settings."); + + " the opensearch keystore for secure settings."); } private void createRepository(final String name, final Settings repositorySettings) { diff --git a/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpRequest.java b/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpRequest.java index 9ff079ffe72f7..34570367ef78f 100644 --- a/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpRequest.java +++ b/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpRequest.java @@ -32,8 +32,8 @@ import io.netty.handler.codec.http.cookie.ServerCookieEncoder; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.http.HttpRequest; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import java.util.AbstractMap; import java.util.Collection; diff --git a/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpResponse.java b/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpResponse.java index 85f1ab79bbc84..9b4ceff993e35 100644 --- a/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpResponse.java +++ b/plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpResponse.java @@ -25,7 +25,7 @@ import io.netty.handler.codec.http.HttpVersion; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.http.HttpResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; public class NioHttpResponse extends DefaultFullHttpResponse implements HttpResponse { diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java index dabef89e78722..2562fbca5c311 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java @@ -48,8 +48,8 @@ import org.elasticsearch.nio.InboundChannelBuffer; import org.elasticsearch.nio.SocketChannelContext; import org.elasticsearch.nio.TaskScheduler; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java index 5ae0851c6b839..8ea86cd658a28 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java @@ -35,7 +35,7 @@ import org.elasticsearch.http.HttpPipelinedResponse; import org.elasticsearch.http.HttpRequest; import org.elasticsearch.http.HttpResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.junit.After; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java index 327f3b42fde72..c7dfef7c2ca3a 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java @@ -52,9 +52,9 @@ import org.elasticsearch.http.NullDispatcher; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.nio.NioSocketChannel; -import org.elasticsearch.rest.BytesRestResponse; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.BytesRestResponse; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.threadpool.TestThreadPool; @@ -73,8 +73,8 @@ import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN; import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED; -import static org.elasticsearch.rest.RestStatus.BAD_REQUEST; -import static org.elasticsearch.rest.RestStatus.OK; +import static org.opensearch.rest.RestStatus.BAD_REQUEST; +import static org.opensearch.rest.RestStatus.OK; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java index 8e86e23df9fd2..7f85aa2c8e63b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java @@ -25,7 +25,7 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.junit.Before; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java index 0582d23481425..d6fbaf807f2af 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java @@ -36,7 +36,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.ingest.IngestTestPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import java.io.IOException; @@ -68,7 +68,7 @@ protected Collection> nodePlugins() { } public void testBulkIndexCreatesMapping() throws Exception { - String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/bulk-log.json"); + String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/bulk-log.json"); BulkRequestBuilder bulkBuilder = client().prepareBulk(); bulkBuilder.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON); bulkBuilder.get(); @@ -126,7 +126,7 @@ public void testExternallySetAutoGeneratedTimestamp() { public void testBulkWithGlobalDefaults() throws Exception { // all requests in the json are missing index and type parameters: "_index" : "test", "_type" : "type1", - String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk-missing-index-type.json"); + String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk-missing-index-type.json"); { BulkRequestBuilder bulkBuilder = client().prepareBulk(); bulkBuilder.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java index 5e848e2336d37..83be4d600bfcd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.RemoteTransportException; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java index 32872e6b75e02..c8c7eddbd84cd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java @@ -49,7 +49,7 @@ import org.elasticsearch.indices.IndicesService; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.aggregations.AbstractAggregationBuilder; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java index 2d79e2b585f3a..e7b06dd06484e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.Priority; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import static org.elasticsearch.common.unit.TimeValue.timeValueMillis; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java index e257f62604d8d..8466b11cbcc2f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java @@ -43,7 +43,7 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.rest.action.admin.indices.AliasesNotFoundException; +import org.opensearch.rest.action.admin.indices.AliasesNotFoundException; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.AggregationBuilders; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java index d24abb169637b..7e163cf05f6de 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java @@ -39,7 +39,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.discovery.MasterNotDiscoveredException; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.test.ESIntegTestCase; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java index 0f19c6cc48a01..edc2d96abdeb0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java @@ -39,7 +39,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.engine.VersionConflictEngineException; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.InternalSettingsPlugin; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java index afd01f2fa0b8a..40633788c607c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java @@ -47,7 +47,7 @@ import org.elasticsearch.plugins.IngestPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.threadpool.ThreadPool; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java index c39388bdb0398..e84cabdf789c3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java @@ -31,7 +31,7 @@ import org.elasticsearch.client.Requests; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java index aece4c4ab27c0..9c8040bf30d1a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java @@ -30,7 +30,7 @@ import org.elasticsearch.index.translog.Translog; import org.elasticsearch.plugins.EnginePlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; import org.junit.After; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java index 922a65a43aa5c..df8dc345f2edf 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java @@ -43,7 +43,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.indices.breaker.CircuitBreakerStats; import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java index 03e68ff7c04bb..c83cc0aedea76 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java @@ -28,7 +28,7 @@ import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.InternalTestCluster; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java index dacd07d020cca..37825f873f8bd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java @@ -38,7 +38,7 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import java.io.IOException; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java index 51765346f7298..bf11c2aa6f680 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java @@ -43,7 +43,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import static org.hamcrest.Matchers.containsString; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java index b4c1cc6082e37..bcbe1ea55e202 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.InnerHitBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; import org.elasticsearch.search.aggregations.InternalAggregation; import org.elasticsearch.search.aggregations.bucket.filter.Filter; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java index c7090e432e7c3..912d028e26af5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java @@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchService; import org.elasticsearch.test.ESIntegTestCase; import org.junit.After; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java index 2a1b7ce09108c..59db9872f5293 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java @@ -52,7 +52,7 @@ import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.plugins.AnalysisPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder.BoundaryScannerType; @@ -422,7 +422,7 @@ public void testSourceLookupHighlightingUsingPlainHighlighter() throws Exception for (int i = 0; i < indexRequestBuilders.length; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) .setSource(XContentFactory.jsonBuilder().startObject() - .field("title", "This is a test on the highlighting bug present in elasticsearch") + .field("title", "This is a test on the highlighting bug present in opensearch") .startArray("attachments") .startObject().field("body", "attachment 1").endObject() .startObject().field("body", "attachment 2").endObject() @@ -436,7 +436,7 @@ public void testSourceLookupHighlightingUsingPlainHighlighter() throws Exception .get(); for (int i = 0; i < indexRequestBuilders.length; i++) { - assertHighlight(search, i, "title", 0, equalTo("This is a test on the highlighting bug present in elasticsearch")); + assertHighlight(search, i, "title", 0, equalTo("This is a test on the highlighting bug present in opensearch")); } search = client().prepareSearch() @@ -475,7 +475,7 @@ public void testSourceLookupHighlightingUsingFastVectorHighlighter() throws Exce for (int i = 0; i < indexRequestBuilders.length; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) .setSource(XContentFactory.jsonBuilder().startObject() - .field("title", "This is a test on the highlighting bug present in elasticsearch") + .field("title", "This is a test on the highlighting bug present in opensearch") .startArray("attachments") .startObject().field("body", "attachment 1").endObject() .startObject().field("body", "attachment 2").endObject() @@ -489,7 +489,7 @@ public void testSourceLookupHighlightingUsingFastVectorHighlighter() throws Exce .get(); for (int i = 0; i < indexRequestBuilders.length; i++) { - assertHighlight(search, i, "title", 0, equalTo("This is a test on the highlighting bug present in elasticsearch")); + assertHighlight(search, i, "title", 0, equalTo("This is a test on the highlighting bug present in opensearch")); } search = client().prepareSearch() @@ -527,7 +527,7 @@ public void testSourceLookupHighlightingUsingPostingsHighlighter() throws Except for (int i = 0; i < indexRequestBuilders.length; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) .setSource(XContentFactory.jsonBuilder().startObject() - .array("title", "This is a test on the highlighting bug present in elasticsearch. Hopefully it works.", + .array("title", "This is a test on the highlighting bug present in opensearch. Hopefully it works.", "This is the second bug to perform highlighting on.") .startArray("attachments") .startObject().field("body", "attachment for this test").endObject() @@ -543,7 +543,7 @@ public void testSourceLookupHighlightingUsingPostingsHighlighter() throws Except for (int i = 0; i < indexRequestBuilders.length; i++) { assertHighlight(search, i, "title", 0, - equalTo("This is a test on the highlighting bug present in elasticsearch. Hopefully it works.")); + equalTo("This is a test on the highlighting bug present in opensearch. Hopefully it works.")); assertHighlight(search, i, "title", 1, 2, equalTo("This is the second bug to perform highlighting on.")); } @@ -554,7 +554,7 @@ public void testSourceLookupHighlightingUsingPostingsHighlighter() throws Except for (int i = 0; i < indexRequestBuilders.length; i++) { assertHighlight(search, i, "title", 0, - equalTo("This is a test on the highlighting bug present in elasticsearch. Hopefully it works.")); + equalTo("This is a test on the highlighting bug present in opensearch. Hopefully it works.")); assertHighlight(search, i, "title", 1, 2, equalTo("This is the second bug to perform highlighting on.")); } @@ -576,7 +576,7 @@ public void testHighlightIssue1994() throws Exception { "title", "type=text,store=false", "titleTV", "type=text,store=false,term_vector=with_positions_offsets")); - String[] titles = new String[] {"This is a test on the highlighting bug present in elasticsearch", "The bug is bugging us"}; + String[] titles = new String[] {"This is a test on the highlighting bug present in opensearch", "The bug is bugging us"}; indexRandom(false, client().prepareIndex("test", "type1", "1").setSource("title", titles, "titleTV", titles)); indexRandom(true, client().prepareIndex("test", "type1", "2") @@ -587,9 +587,9 @@ public void testHighlightIssue1994() throws Exception { .highlighter(new HighlightBuilder().field("title", -1, 2).field("titleTV", -1, 2).requireFieldMatch(false)) .get(); - assertHighlight(search, 0, "title", 0, equalTo("This is a test on the highlighting bug present in elasticsearch")); + assertHighlight(search, 0, "title", 0, equalTo("This is a test on the highlighting bug present in opensearch")); assertHighlight(search, 0, "title", 1, 2, equalTo("The bug is bugging us")); - assertHighlight(search, 0, "titleTV", 0, equalTo("This is a test on the highlighting bug present in elasticsearch")); + assertHighlight(search, 0, "titleTV", 0, equalTo("This is a test on the highlighting bug present in opensearch")); assertHighlight(search, 0, "titleTV", 1, 2, equalTo("The bug is bugging us")); search = client().prepareSearch() @@ -1113,7 +1113,7 @@ public void testSameContent() throws Exception { IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[5]; for (int i = 0; i < 5; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) - .setSource("title", "This is a test on the highlighting bug present in elasticsearch"); + .setSource("title", "This is a test on the highlighting bug present in opensearch"); } indexRandom(true, indexRequestBuilders); @@ -1124,7 +1124,7 @@ public void testSameContent() throws Exception { for (int i = 0; i < 5; i++) { assertHighlight(search, i, "title", 0, 1, equalTo("This is a test on the highlighting bug " + - "present in elasticsearch")); + "present in opensearch")); } } @@ -1135,7 +1135,7 @@ public void testFastVectorHighlighterOffsetParameter() throws Exception { IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[5]; for (int i = 0; i < 5; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) - .setSource("title", "This is a test on the highlighting bug present in elasticsearch"); + .setSource("title", "This is a test on the highlighting bug present in opensearch"); } indexRandom(true, indexRequestBuilders); @@ -1146,7 +1146,7 @@ public void testFastVectorHighlighterOffsetParameter() throws Exception { for (int i = 0; i < 5; i++) { // LUCENE 3.1 UPGRADE: Caused adding the space at the end... - assertHighlight(search, i, "title", 0, 1, equalTo("highlighting bug present in elasticsearch")); + assertHighlight(search, i, "title", 0, 1, equalTo("highlighting bug present in opensearch")); } } @@ -1157,7 +1157,7 @@ public void testEscapeHtml() throws Exception { IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[5]; for (int i = 0; i < indexRequestBuilders.length; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) - .setSource("title", "This is a html escaping highlighting test for *&? elasticsearch"); + .setSource("title", "This is a html escaping highlighting test for *&? opensearch"); } indexRandom(true, indexRequestBuilders); @@ -1179,7 +1179,7 @@ public void testEscapeHtmlVector() throws Exception { IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[5]; for (int i = 0; i < 5; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) - .setSource("title", "This is a html escaping highlighting test for *&? elasticsearch"); + .setSource("title", "This is a html escaping highlighting test for *&? opensearch"); } indexRandom(true, indexRequestBuilders); @@ -1189,7 +1189,7 @@ public void testEscapeHtmlVector() throws Exception { .get(); for (int i = 0; i < 5; i++) { - assertHighlight(search, i, "title", 0, 1, equalTo(" highlighting test for *&? elasticsearch")); + assertHighlight(search, i, "title", 0, 1, equalTo(" highlighting test for *&? opensearch")); } } @@ -1628,7 +1628,7 @@ public void testNumericHighlighting() throws Exception { "double", "type=double")); ensureGreen(); - client().prepareIndex("test", "test", "1").setSource("text", "elasticsearch test", + client().prepareIndex("test", "test", "1").setSource("text", "opensearch test", "byte", 25, "short", 42, "int", 100, "long", -1, "float", 3.2f, "double", 42.42).get(); refresh(); @@ -1653,7 +1653,7 @@ public void testResetTwice() throws Exception { .addMapping("type", "text", "type=text,analyzer=my_analyzer")); ensureGreen(); client().prepareIndex("test", "type", "1") - .setSource("text", "elasticsearch test").get(); + .setSource("text", "opensearch test").get(); refresh(); SearchResponse response = client().prepareSearch("test") @@ -2204,7 +2204,7 @@ public void testPostingsHighlighterEscapeHtml() throws Exception { IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[5]; for (int i = 0; i < 5; i++) { indexRequestBuilders[i] = client().prepareIndex("test", "type1", Integer.toString(i)) - .setSource("title", "This is a html escaping highlighting test for *&? elasticsearch"); + .setSource("title", "This is a html escaping highlighting test for *&? opensearch"); } indexRandom(true, indexRequestBuilders); @@ -2214,7 +2214,7 @@ public void testPostingsHighlighterEscapeHtml() throws Exception { for (int i = 0; i < indexRequestBuilders.length; i++) { assertHighlight(searchResponse, i, "title", 0, 1, - equalTo("This is a html escaping highlighting test for *&? elasticsearch")); + equalTo("This is a html escaping highlighting test for *&? opensearch")); } } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java index 4b2eacfdb4b21..1ca3bd530daee 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java @@ -37,7 +37,7 @@ import org.elasticsearch.index.fielddata.ScriptDocValues; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java index 61b32e3688cf7..a05b4682266a3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java @@ -32,7 +32,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.node.Node; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; import java.io.IOException; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java index 553d168fea005..43012e0530e7a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java @@ -60,7 +60,7 @@ import org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider; import org.elasticsearch.plugins.AnalysisPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.AggregationBuilders; @@ -929,7 +929,7 @@ public void testFuzzyQueryString() { assertFirstHit(searchResponse, hasId("1")); } - @TestIssueLogging(value = "org.elasticsearch.search.query.SearchQueryIT:DEBUG", + @TestIssueLogging(value = "org.opensearch.search.query.SearchQueryIT:DEBUG", issueUrl = "https://github.com/elastic/elasticsearch/issues/43144") public void testQuotedQueryStringWithBoost() throws InterruptedException { float boost = 10.0f; @@ -1736,7 +1736,7 @@ public void testSearchEmptyDoc() { public void testMatchPhrasePrefixQuery() throws ExecutionException, InterruptedException { createIndex("test1"); indexRandom(true, client().prepareIndex("test1", "type1", "1").setSource("field", "Johnnie Walker Black Label"), - client().prepareIndex("test1", "type1", "2").setSource("field", "trying out Elasticsearch")); + client().prepareIndex("test1", "type1", "2").setSource("field", "trying out OpenSearch")); SearchResponse searchResponse = client().prepareSearch().setQuery(matchPhrasePrefixQuery("field", "Johnnie la").slop(between(2, 5))) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java index 00b5a8669a9b0..2b773d5bc26e0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java @@ -39,7 +39,7 @@ import org.elasticsearch.index.query.MatchAllQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.sort.FieldSortBuilder; import org.elasticsearch.search.sort.SortOrder; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java index 125eb9a001d96..4dae277463e1b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java @@ -32,7 +32,7 @@ import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.rescore.QueryRescorerBuilder; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.ESIntegTestCase; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java index ed8cb66f193d1..5a8d532cf9c16 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java @@ -39,7 +39,7 @@ import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java index 90df75cfc9ff3..a54ec655fda56 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.unit.Fuzziness; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.suggest.CompletionSuggestSearchIT.CompletionMappingBuilder; import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder; import org.elasticsearch.search.suggest.completion.context.CategoryContextMapping; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java index 923fdd6411f00..8637575835223 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java @@ -69,12 +69,12 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.repositories.RepositoryMissingException; import org.elasticsearch.repositories.blobstore.BlobStoreRepository; -import org.elasticsearch.rest.AbstractRestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.admin.cluster.RestClusterStateAction; -import org.elasticsearch.rest.action.admin.cluster.RestGetRepositoriesAction; +import org.opensearch.rest.AbstractRestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.admin.cluster.RestClusterStateAction; +import org.opensearch.rest.action.admin.cluster.RestGetRepositoriesAction; import org.elasticsearch.snapshots.mockstore.MockRepository; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java index 8c36224c8ede7..06b3106ef92cd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java @@ -36,7 +36,7 @@ import org.elasticsearch.repositories.RepositoriesService; import org.elasticsearch.repositories.Repository; import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.snapshots.mockstore.MockRepository; import java.io.IOException; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java index 5f8367e007bdc..63bb07ded6846 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java @@ -35,7 +35,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.indices.InvalidIndexNameException; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.nio.file.Path; import java.util.Collections; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java index 9a4cb1d055137..5c4ec5787a667 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java @@ -40,7 +40,7 @@ import org.elasticsearch.index.engine.DocumentMissingException; import org.elasticsearch.index.engine.VersionConflictEngineException; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; diff --git a/server/src/main/java/org/elasticsearch/ExceptionsHelper.java b/server/src/main/java/org/elasticsearch/ExceptionsHelper.java index cab3bc9f97510..700699b12c8dd 100644 --- a/server/src/main/java/org/elasticsearch/ExceptionsHelper.java +++ b/server/src/main/java/org/elasticsearch/ExceptionsHelper.java @@ -29,7 +29,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.io.PrintWriter; diff --git a/server/src/main/java/org/elasticsearch/OpenSearchException.java b/server/src/main/java/org/elasticsearch/OpenSearchException.java index 024cd59898c11..72ff93ddd10d2 100644 --- a/server/src/main/java/org/elasticsearch/OpenSearchException.java +++ b/server/src/main/java/org/elasticsearch/OpenSearchException.java @@ -35,7 +35,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchException; import org.elasticsearch.search.aggregations.MultiBucketConsumerService; import org.elasticsearch.transport.TcpTransport; @@ -936,8 +936,8 @@ private enum OpenSearchExceptionHandle { org.elasticsearch.common.settings.NoClassSettingsException::new, 111, UNKNOWN_VERSION_ADDED), BIND_TRANSPORT_EXCEPTION(org.elasticsearch.transport.BindTransportException.class, org.elasticsearch.transport.BindTransportException::new, 112, UNKNOWN_VERSION_ADDED), - ALIASES_NOT_FOUND_EXCEPTION(org.elasticsearch.rest.action.admin.indices.AliasesNotFoundException.class, - org.elasticsearch.rest.action.admin.indices.AliasesNotFoundException::new, 113, UNKNOWN_VERSION_ADDED), + ALIASES_NOT_FOUND_EXCEPTION(org.opensearch.rest.action.admin.indices.AliasesNotFoundException.class, + org.opensearch.rest.action.admin.indices.AliasesNotFoundException::new, 113, UNKNOWN_VERSION_ADDED), INDEX_SHARD_RECOVERING_EXCEPTION(org.elasticsearch.index.shard.IndexShardRecoveringException.class, org.elasticsearch.index.shard.IndexShardRecoveringException::new, 114, UNKNOWN_VERSION_ADDED), TRANSLOG_EXCEPTION(org.elasticsearch.index.translog.TranslogException.class, diff --git a/server/src/main/java/org/elasticsearch/OpenSearchParseException.java b/server/src/main/java/org/elasticsearch/OpenSearchParseException.java index 8b301c5628a26..4e617e2f5a5f7 100644 --- a/server/src/main/java/org/elasticsearch/OpenSearchParseException.java +++ b/server/src/main/java/org/elasticsearch/OpenSearchParseException.java @@ -20,7 +20,7 @@ package org.elasticsearch; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/OpenSearchSecurityException.java b/server/src/main/java/org/elasticsearch/OpenSearchSecurityException.java index dfa22ed7beca0..6a5e37d1e3895 100644 --- a/server/src/main/java/org/elasticsearch/OpenSearchSecurityException.java +++ b/server/src/main/java/org/elasticsearch/OpenSearchSecurityException.java @@ -19,7 +19,7 @@ package org.elasticsearch; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/OpenSearchStatusException.java b/server/src/main/java/org/elasticsearch/OpenSearchStatusException.java index 6091cc9005d0e..a325d48f9f625 100644 --- a/server/src/main/java/org/elasticsearch/OpenSearchStatusException.java +++ b/server/src/main/java/org/elasticsearch/OpenSearchStatusException.java @@ -21,7 +21,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/ResourceAlreadyExistsException.java b/server/src/main/java/org/elasticsearch/ResourceAlreadyExistsException.java index b64ac81410ba1..0b194356ff460 100644 --- a/server/src/main/java/org/elasticsearch/ResourceAlreadyExistsException.java +++ b/server/src/main/java/org/elasticsearch/ResourceAlreadyExistsException.java @@ -21,7 +21,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/ResourceNotFoundException.java b/server/src/main/java/org/elasticsearch/ResourceNotFoundException.java index a7f330eb28e10..f1f1af18ff0dd 100644 --- a/server/src/main/java/org/elasticsearch/ResourceNotFoundException.java +++ b/server/src/main/java/org/elasticsearch/ResourceNotFoundException.java @@ -19,7 +19,7 @@ package org.elasticsearch; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java index 00026bd84ac0b..552f3616c1057 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java @@ -40,7 +40,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.seqno.SequenceNumbers; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java index 2017ec8b39f5a..452b951e544e0 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java @@ -36,7 +36,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.VersionType; import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.rest.action.document.RestBulkAction; +import org.opensearch.rest.action.document.RestBulkAction; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java index 73aadfec86c99..1b2ac95cddbcc 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.StatusToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/action/bulk/Retry.java b/server/src/main/java/org/elasticsearch/action/bulk/Retry.java index a0a92cbcfc539..1af52e0abf537 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/Retry.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/Retry.java @@ -23,7 +23,7 @@ import org.opensearch.action.ActionListener; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.threadpool.Scheduler; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.RemoteTransportException; diff --git a/server/src/main/java/org/elasticsearch/action/delete/DeleteResponse.java b/server/src/main/java/org/elasticsearch/action/delete/DeleteResponse.java index a5f56d0908a51..dc7d3c1bce0f7 100644 --- a/server/src/main/java/org/elasticsearch/action/delete/DeleteResponse.java +++ b/server/src/main/java/org/elasticsearch/action/delete/DeleteResponse.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/explain/ExplainResponse.java b/server/src/main/java/org/elasticsearch/action/explain/ExplainResponse.java index fc9f1f7dc8114..d98159fba173e 100644 --- a/server/src/main/java/org/elasticsearch/action/explain/ExplainResponse.java +++ b/server/src/main/java/org/elasticsearch/action/explain/ExplainResponse.java @@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.get.GetResult; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collection; diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexResponse.java b/server/src/main/java/org/elasticsearch/action/index/IndexResponse.java index 9947f4c54b92c..cf2bbc344c10b 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexResponse.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexResponse.java @@ -24,7 +24,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineResponse.java b/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineResponse.java index c88f1e7aa53b3..88e2c660ad1db 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineResponse.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineResponse.java @@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.ingest.PipelineConfiguration; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/action/search/ClearScrollResponse.java b/server/src/main/java/org/elasticsearch/action/search/ClearScrollResponse.java index d15260305f69f..57d2d895bf420 100644 --- a/server/src/main/java/org/elasticsearch/action/search/ClearScrollResponse.java +++ b/server/src/main/java/org/elasticsearch/action/search/ClearScrollResponse.java @@ -28,13 +28,13 @@ import org.elasticsearch.common.xcontent.StatusToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg; -import static org.elasticsearch.rest.RestStatus.NOT_FOUND; -import static org.elasticsearch.rest.RestStatus.OK; +import static org.opensearch.rest.RestStatus.NOT_FOUND; +import static org.opensearch.rest.RestStatus.OK; public class ClearScrollResponse extends ActionResponse implements StatusToXContentObject { diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchPhaseExecutionException.java b/server/src/main/java/org/elasticsearch/action/search/SearchPhaseExecutionException.java index 3acb050e8c6ad..8637d5b69c3ca 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchPhaseExecutionException.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchPhaseExecutionException.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.util.CollectionUtils; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java b/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java index 446126b566dc8..2563ef42b66e1 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java @@ -34,8 +34,8 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.RestActions; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.RestActions; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.Aggregations; diff --git a/server/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java b/server/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java index e36d326f982f6..b178e6a335ef1 100644 --- a/server/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java +++ b/server/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java @@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchException; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.transport.RemoteClusterAware; diff --git a/server/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java b/server/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java index 165349f25e783..99a3c4b273ce9 100644 --- a/server/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java +++ b/server/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java @@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/action/support/IndicesOptions.java b/server/src/main/java/org/elasticsearch/action/support/IndicesOptions.java index fe13eb358b10a..812189a3e177a 100644 --- a/server/src/main/java/org/elasticsearch/action/support/IndicesOptions.java +++ b/server/src/main/java/org/elasticsearch/action/support/IndicesOptions.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import java.io.IOException; import java.util.EnumSet; diff --git a/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java b/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java index d75abe81a87ab..1b92bd87f0d35 100644 --- a/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java +++ b/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java @@ -27,8 +27,8 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.action.RestActions; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.action.RestActions; import java.io.IOException; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java index fb1b2d8ae62f3..3535ff5371205 100644 --- a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java +++ b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java @@ -41,7 +41,7 @@ import org.elasticsearch.index.shard.ReplicationGroup; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.node.NodeClosedException; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.ConnectTransportException; diff --git a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationResponse.java b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationResponse.java index 8af6d2934d6e9..6577569cf2aaa 100644 --- a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationResponse.java +++ b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationResponse.java @@ -32,7 +32,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java index 61f4cf0786d6b..50a5883951f96 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java @@ -40,7 +40,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.VersionType; -import org.elasticsearch.rest.action.document.RestTermVectorsAction; +import org.opensearch.rest.action.document.RestTermVectorsAction; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/action/update/UpdateResponse.java b/server/src/main/java/org/elasticsearch/action/update/UpdateResponse.java index 98291ff220227..52d3cb2e68d53 100644 --- a/server/src/main/java/org/elasticsearch/action/update/UpdateResponse.java +++ b/server/src/main/java/org/elasticsearch/action/update/UpdateResponse.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.get.GetResult; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/client/transport/NoNodeAvailableException.java b/server/src/main/java/org/elasticsearch/client/transport/NoNodeAvailableException.java index 7bfaabfdf1736..4e2200f7926cd 100644 --- a/server/src/main/java/org/elasticsearch/client/transport/NoNodeAvailableException.java +++ b/server/src/main/java/org/elasticsearch/client/transport/NoNodeAvailableException.java @@ -21,7 +21,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java index 1afd621fb1ca0..fac28b1374c41 100644 --- a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java +++ b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.EnumSet; diff --git a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java index b5ad92ba7dd2a..766a68b599d8e 100644 --- a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java +++ b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collection; diff --git a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java index a72cd2977456c..c16a4c019bc84 100644 --- a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java +++ b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/NoMasterBlockService.java b/server/src/main/java/org/elasticsearch/cluster/coordination/NoMasterBlockService.java index 6baed9e7c7aa9..4bceeef6474a4 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/NoMasterBlockService.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/NoMasterBlockService.java @@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.util.EnumSet; diff --git a/server/src/main/java/org/elasticsearch/cluster/health/ClusterStateHealth.java b/server/src/main/java/org/elasticsearch/cluster/health/ClusterStateHealth.java index 2a329e4c5c015..6c821c4f243bb 100644 --- a/server/src/main/java/org/elasticsearch/cluster/health/ClusterStateHealth.java +++ b/server/src/main/java/org/elasticsearch/cluster/health/ClusterStateHealth.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java index a16ffdf61e43b..858ae423401d8 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java @@ -56,7 +56,7 @@ import org.elasticsearch.index.mapper.MapperService; import org.elasticsearch.index.seqno.SequenceNumbers; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.time.Instant; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java b/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java index eaf20ae54e8ae..2217275fbf4bc 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java @@ -59,7 +59,7 @@ import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.plugins.MapperPlugin; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamService.java index 2176c8b98292e..25f20c8440d80 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamService.java @@ -40,7 +40,7 @@ import org.elasticsearch.common.xcontent.ObjectPath; import org.elasticsearch.index.mapper.MapperService; import org.elasticsearch.index.mapper.MetadataFieldMapper; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexStateService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexStateService.java index 34daec0380468..170884b9444b0 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexStateService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexStateService.java @@ -72,7 +72,7 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.indices.ShardLimitValidator; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.snapshots.RestoreService; import org.elasticsearch.snapshots.SnapshotInProgressException; import org.elasticsearch.snapshots.SnapshotsService; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/ProcessClusterEventTimeoutException.java b/server/src/main/java/org/elasticsearch/cluster/metadata/ProcessClusterEventTimeoutException.java index ca09c888d77fe..00e0a12b97fb6 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/ProcessClusterEventTimeoutException.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/ProcessClusterEventTimeoutException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/common/ParsingException.java b/server/src/main/java/org/elasticsearch/common/ParsingException.java index 46a7661c06ef9..e59d9fae2e71a 100644 --- a/server/src/main/java/org/elasticsearch/common/ParsingException.java +++ b/server/src/main/java/org/elasticsearch/common/ParsingException.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentLocation; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/common/breaker/CircuitBreakingException.java b/server/src/main/java/org/elasticsearch/common/breaker/CircuitBreakingException.java index 9328413df2762..a27009870a0fd 100644 --- a/server/src/main/java/org/elasticsearch/common/breaker/CircuitBreakingException.java +++ b/server/src/main/java/org/elasticsearch/common/breaker/CircuitBreakingException.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/common/io/stream/NotSerializableExceptionWrapper.java b/server/src/main/java/org/elasticsearch/common/io/stream/NotSerializableExceptionWrapper.java index 162cc208a97cf..32dd0c82d3b36 100644 --- a/server/src/main/java/org/elasticsearch/common/io/stream/NotSerializableExceptionWrapper.java +++ b/server/src/main/java/org/elasticsearch/common/io/stream/NotSerializableExceptionWrapper.java @@ -21,7 +21,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index b9d1139ec6066..65646cf74769e 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -110,7 +110,7 @@ import org.elasticsearch.persistent.decider.EnableAssignmentDecider; import org.elasticsearch.plugins.PluginsService; import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.rest.BaseRestHandler; +import org.opensearch.rest.BaseRestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.SearchService; diff --git a/server/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java b/server/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java index 549713fd15261..1f9b183eba262 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java +++ b/server/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java @@ -22,7 +22,7 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.xcontent.ToXContent.Params; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestRequest; import java.util.ArrayList; import java.util.Collection; diff --git a/server/src/main/java/org/elasticsearch/common/xcontent/StatusToXContentObject.java b/server/src/main/java/org/elasticsearch/common/xcontent/StatusToXContentObject.java index ba6ccdfffad08..b3bb97d9ebddb 100644 --- a/server/src/main/java/org/elasticsearch/common/xcontent/StatusToXContentObject.java +++ b/server/src/main/java/org/elasticsearch/common/xcontent/StatusToXContentObject.java @@ -18,7 +18,7 @@ */ package org.elasticsearch.common.xcontent; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; /** * Objects that can both render themselves in as json/yaml/etc and can provide a {@link RestStatus} for their response. Usually should be diff --git a/server/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java b/server/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java index 4746b86ea7e8c..876f278e5d739 100644 --- a/server/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java +++ b/server/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java @@ -21,7 +21,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/gateway/GatewayService.java b/server/src/main/java/org/elasticsearch/gateway/GatewayService.java index 2f758781a548e..303f017e64b8f 100644 --- a/server/src/main/java/org/elasticsearch/gateway/GatewayService.java +++ b/server/src/main/java/org/elasticsearch/gateway/GatewayService.java @@ -42,7 +42,7 @@ import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.discovery.Discovery; import org.elasticsearch.discovery.zen.ZenDiscovery; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/server/src/main/java/org/elasticsearch/http/AbstractHttpServerTransport.java b/server/src/main/java/org/elasticsearch/http/AbstractHttpServerTransport.java index a26a56bc0532a..89e53d62763eb 100644 --- a/server/src/main/java/org/elasticsearch/http/AbstractHttpServerTransport.java +++ b/server/src/main/java/org/elasticsearch/http/AbstractHttpServerTransport.java @@ -41,8 +41,8 @@ import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.BindTransportException; diff --git a/server/src/main/java/org/elasticsearch/http/CorsHandler.java b/server/src/main/java/org/elasticsearch/http/CorsHandler.java index b3b0641ec497d..905fd44ff02a3 100644 --- a/server/src/main/java/org/elasticsearch/http/CorsHandler.java +++ b/server/src/main/java/org/elasticsearch/http/CorsHandler.java @@ -38,9 +38,9 @@ import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsException; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.rest.RestUtils; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; +import org.opensearch.rest.RestUtils; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -69,8 +69,8 @@ * files: io.netty.handler.codec.http.cors.CorsHandler, io.netty.handler.codec.http.cors.CorsConfig, and * io.netty.handler.codec.http.cors.CorsConfigBuilder. * - * It modifies the original netty code to operate on Elasticsearch http request/response abstractions. - * Additionally, it removes CORS features that are not used by Elasticsearch. + * It modifies the original netty code to operate on OpenSearch http request/response abstractions. + * Additionally, it removes CORS features that are not used by OpenSearch. */ public class CorsHandler { diff --git a/server/src/main/java/org/elasticsearch/http/DefaultRestChannel.java b/server/src/main/java/org/elasticsearch/http/DefaultRestChannel.java index a40163eb84e5a..1767ba2687396 100644 --- a/server/src/main/java/org/elasticsearch/http/DefaultRestChannel.java +++ b/server/src/main/java/org/elasticsearch/http/DefaultRestChannel.java @@ -30,11 +30,11 @@ import org.elasticsearch.common.network.CloseableChannel; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.rest.AbstractRestChannel; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.AbstractRestChannel; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.RestStatus; import java.util.ArrayList; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/http/HttpPipelinedRequest.java b/server/src/main/java/org/elasticsearch/http/HttpPipelinedRequest.java index d98dcb8bde632..25acaa9f68ec6 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpPipelinedRequest.java +++ b/server/src/main/java/org/elasticsearch/http/HttpPipelinedRequest.java @@ -20,8 +20,8 @@ package org.elasticsearch.http; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import java.util.List; import java.util.Map; diff --git a/server/src/main/java/org/elasticsearch/http/HttpRequest.java b/server/src/main/java/org/elasticsearch/http/HttpRequest.java index e07032db86175..9e6357ffc357e 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpRequest.java +++ b/server/src/main/java/org/elasticsearch/http/HttpRequest.java @@ -21,8 +21,8 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import java.util.Collections; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/http/HttpServerTransport.java b/server/src/main/java/org/elasticsearch/http/HttpServerTransport.java index 0ae43babcda6e..5bb44a32b14e4 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpServerTransport.java +++ b/server/src/main/java/org/elasticsearch/http/HttpServerTransport.java @@ -23,8 +23,8 @@ import org.elasticsearch.common.transport.BoundTransportAddress; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.node.ReportingService; -import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestChannel; +import org.opensearch.rest.RestRequest; public interface HttpServerTransport extends LifecycleComponent, ReportingService { diff --git a/server/src/main/java/org/elasticsearch/http/HttpTracer.java b/server/src/main/java/org/elasticsearch/http/HttpTracer.java index 568288692584e..9502f5677af6b 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpTracer.java +++ b/server/src/main/java/org/elasticsearch/http/HttpTracer.java @@ -26,8 +26,8 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; import org.elasticsearch.tasks.Task; import org.elasticsearch.transport.TransportService; diff --git a/server/src/main/java/org/elasticsearch/index/engine/DocumentMissingException.java b/server/src/main/java/org/elasticsearch/index/engine/DocumentMissingException.java index 58e06e50a4676..d0e4824116bbb 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/DocumentMissingException.java +++ b/server/src/main/java/org/elasticsearch/index/engine/DocumentMissingException.java @@ -20,7 +20,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/engine/DocumentSourceMissingException.java b/server/src/main/java/org/elasticsearch/index/engine/DocumentSourceMissingException.java index 4fa53ed5a1e0d..54dd93951a4c3 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/DocumentSourceMissingException.java +++ b/server/src/main/java/org/elasticsearch/index/engine/DocumentSourceMissingException.java @@ -20,7 +20,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/engine/VersionConflictEngineException.java b/server/src/main/java/org/elasticsearch/index/engine/VersionConflictEngineException.java index c98c499d7eb4e..6e84b52a38680 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/VersionConflictEngineException.java +++ b/server/src/main/java/org/elasticsearch/index/engine/VersionConflictEngineException.java @@ -21,7 +21,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.seqno.SequenceNumbers; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/MapperParsingException.java b/server/src/main/java/org/elasticsearch/index/mapper/MapperParsingException.java index 9769c58f4ec99..2cfa3c4428cc8 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/MapperParsingException.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/MapperParsingException.java @@ -20,7 +20,7 @@ package org.elasticsearch.index.mapper; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; @@ -46,4 +46,4 @@ public MapperParsingException(String message, Throwable cause, Object... args) { public RestStatus status() { return RestStatus.BAD_REQUEST; } -} \ No newline at end of file +} diff --git a/server/src/main/java/org/elasticsearch/index/mapper/StrictDynamicMappingException.java b/server/src/main/java/org/elasticsearch/index/mapper/StrictDynamicMappingException.java index da1304d9b42be..576fea757eaba 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/StrictDynamicMappingException.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/StrictDynamicMappingException.java @@ -19,7 +19,7 @@ package org.elasticsearch.index.mapper; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; @@ -37,4 +37,4 @@ public StrictDynamicMappingException(StreamInput in) throws IOException { public RestStatus status() { return RestStatus.BAD_REQUEST; } -} \ No newline at end of file +} diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryShardException.java b/server/src/main/java/org/elasticsearch/index/query/QueryShardException.java index 8974a663fedee..463603c708fa0 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryShardException.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryShardException.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollResponse.java b/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollResponse.java index 60792ee79f555..a2d7b5228ac51 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollResponse.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollResponse.java @@ -35,7 +35,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.index.reindex.ScrollableHitSource.SearchFailure; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java b/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java index 4044bc01c2606..44319a9d544ce 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java @@ -37,7 +37,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.threadpool.ThreadPool; @@ -237,7 +237,7 @@ public interface Hit { */ String getId(); /** - * The version of the match or {@code -1} if the version wasn't requested. The {@code -1} keeps it inline with Elasticsearch's + * The version of the match or {@code -1} if the version wasn't requested. The {@code -1} keeps it inline with OpenSearch's * internal APIs. */ long getVersion(); diff --git a/server/src/main/java/org/elasticsearch/index/shard/IllegalIndexShardStateException.java b/server/src/main/java/org/elasticsearch/index/shard/IllegalIndexShardStateException.java index 2e7e8d2ee69f4..4d2c3b10e7470 100644 --- a/server/src/main/java/org/elasticsearch/index/shard/IllegalIndexShardStateException.java +++ b/server/src/main/java/org/elasticsearch/index/shard/IllegalIndexShardStateException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java index b6c2bf9fd22dd..4678e59f4bcc7 100644 --- a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -148,7 +148,7 @@ import org.elasticsearch.indices.recovery.RecoveryTarget; import org.elasticsearch.repositories.RepositoriesService; import org.elasticsearch.repositories.Repository; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.suggest.completion.CompletionStats; import org.elasticsearch.threadpool.ThreadPool; @@ -1296,7 +1296,7 @@ static Engine.Searcher wrapSearcher(Engine.Searcher engineSearcher, final OpenSearchDirectoryReader openSearchDirectoryReader = OpenSearchDirectoryReader.getOpenSearchDirectoryReader(engineSearcher.getDirectoryReader()); if (openSearchDirectoryReader == null) { - throw new IllegalStateException("Can't wrap non elasticsearch directory reader"); + throw new IllegalStateException("Can't wrap non opensearch directory reader"); } NonClosingReaderWrapper nonClosingReaderWrapper = new NonClosingReaderWrapper(engineSearcher.getDirectoryReader()); DirectoryReader reader = readerWrapper.apply(nonClosingReaderWrapper); diff --git a/server/src/main/java/org/elasticsearch/indices/IndexClosedException.java b/server/src/main/java/org/elasticsearch/indices/IndexClosedException.java index 19b38bb6297d5..9b9f6949cf3cc 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndexClosedException.java +++ b/server/src/main/java/org/elasticsearch/indices/IndexClosedException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/IndexPrimaryShardNotAllocatedException.java b/server/src/main/java/org/elasticsearch/indices/IndexPrimaryShardNotAllocatedException.java index e6cdf595e3f91..e5d2abb36fb0e 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndexPrimaryShardNotAllocatedException.java +++ b/server/src/main/java/org/elasticsearch/indices/IndexPrimaryShardNotAllocatedException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/IndexTemplateMissingException.java b/server/src/main/java/org/elasticsearch/indices/IndexTemplateMissingException.java index f583bb34a31ca..ab10a9bfe0799 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndexTemplateMissingException.java +++ b/server/src/main/java/org/elasticsearch/indices/IndexTemplateMissingException.java @@ -21,7 +21,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/InvalidAliasNameException.java b/server/src/main/java/org/elasticsearch/indices/InvalidAliasNameException.java index 1d914c991f2e8..be0aa31b880c0 100644 --- a/server/src/main/java/org/elasticsearch/indices/InvalidAliasNameException.java +++ b/server/src/main/java/org/elasticsearch/indices/InvalidAliasNameException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/InvalidIndexNameException.java b/server/src/main/java/org/elasticsearch/indices/InvalidIndexNameException.java index 0d2bb4a6f2132..d48594b64c7e9 100644 --- a/server/src/main/java/org/elasticsearch/indices/InvalidIndexNameException.java +++ b/server/src/main/java/org/elasticsearch/indices/InvalidIndexNameException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/InvalidIndexTemplateException.java b/server/src/main/java/org/elasticsearch/indices/InvalidIndexTemplateException.java index f78f09e2182c8..a2f43eade619a 100644 --- a/server/src/main/java/org/elasticsearch/indices/InvalidIndexTemplateException.java +++ b/server/src/main/java/org/elasticsearch/indices/InvalidIndexTemplateException.java @@ -21,7 +21,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/InvalidTypeNameException.java b/server/src/main/java/org/elasticsearch/indices/InvalidTypeNameException.java index 05030b52ba4fe..adf84dbf2c67b 100644 --- a/server/src/main/java/org/elasticsearch/indices/InvalidTypeNameException.java +++ b/server/src/main/java/org/elasticsearch/indices/InvalidTypeNameException.java @@ -21,7 +21,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.mapper.MapperException; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/indices/TypeMissingException.java b/server/src/main/java/org/elasticsearch/indices/TypeMissingException.java index f96ba78a5bf52..0f9caab5cd685 100644 --- a/server/src/main/java/org/elasticsearch/indices/TypeMissingException.java +++ b/server/src/main/java/org/elasticsearch/indices/TypeMissingException.java @@ -22,7 +22,7 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.Index; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/node/Node.java b/server/src/main/java/org/elasticsearch/node/Node.java index 103509c9057cf..e48e925ac513c 100644 --- a/server/src/main/java/org/elasticsearch/node/Node.java +++ b/server/src/main/java/org/elasticsearch/node/Node.java @@ -152,7 +152,7 @@ import org.elasticsearch.plugins.SystemIndexPlugin; import org.elasticsearch.repositories.RepositoriesModule; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.rest.RestController; +import org.opensearch.rest.RestController; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptEngine; import org.elasticsearch.script.ScriptModule; @@ -330,7 +330,7 @@ protected Node(final Environment initialEnvironment, logger.info("JVM arguments {}", Arrays.toString(jvmInfo.getInputArguments())); if (Build.CURRENT.isProductionRelease() == false) { logger.warn( - "version [{}] is a pre-release version of Elasticsearch and is not suitable for production", + "version [{}] is a pre-release version of OpenSearch and is not suitable for production", Build.CURRENT.getQualifiedVersion()); } diff --git a/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java b/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java index db8f9cc0cd699..3fbd0257622b2 100644 --- a/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java +++ b/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java @@ -36,9 +36,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsFilter; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestHandler; -import org.elasticsearch.rest.RestHeaderDefinition; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestHandler; +import org.opensearch.rest.RestHeaderDefinition; import java.util.Collection; import java.util.Collections; @@ -49,7 +49,7 @@ import java.util.stream.Collectors; /** - * An additional extension point for {@link Plugin}s that extends Elasticsearch's scripting functionality. Implement it like this: + * An additional extension point for {@link Plugin}s that extends OpenSearch's scripting functionality. Implement it like this: *
{@code
  *   {@literal @}Override
  *   public List> getActions() {
diff --git a/server/src/main/java/org/elasticsearch/repositories/RepositoryMissingException.java b/server/src/main/java/org/elasticsearch/repositories/RepositoryMissingException.java
index 8b4e0976e1850..4d5614a3a7f83 100644
--- a/server/src/main/java/org/elasticsearch/repositories/RepositoryMissingException.java
+++ b/server/src/main/java/org/elasticsearch/repositories/RepositoryMissingException.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.repositories;
 
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/repositories/RepositoryVerificationException.java b/server/src/main/java/org/elasticsearch/repositories/RepositoryVerificationException.java
index 2574ff3b09266..143e955ae8cbe 100644
--- a/server/src/main/java/org/elasticsearch/repositories/RepositoryVerificationException.java
+++ b/server/src/main/java/org/elasticsearch/repositories/RepositoryVerificationException.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.repositories;
 
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/package-info.java b/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/package-info.java
deleted file mode 100644
index 05476fbe16aca..0000000000000
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to Elasticsearch under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * {@link org.elasticsearch.rest.RestHandler}s for managing dangling indices.
- *
- * @see org.elasticsearch.action.admin.indices.dangling
- */
-package org.elasticsearch.rest.action.admin.cluster.dangling;
diff --git a/server/src/main/java/org/elasticsearch/script/ScriptException.java b/server/src/main/java/org/elasticsearch/script/ScriptException.java
index f8ade35f48631..b6839e0baba66 100644
--- a/server/src/main/java/org/elasticsearch/script/ScriptException.java
+++ b/server/src/main/java/org/elasticsearch/script/ScriptException.java
@@ -8,7 +8,7 @@
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 /*
  * Licensed to Elasticsearch under one or more contributor
diff --git a/server/src/main/java/org/elasticsearch/search/SearchContextMissingException.java b/server/src/main/java/org/elasticsearch/search/SearchContextMissingException.java
index a680d8a508ed5..ec6d1b28545df 100644
--- a/server/src/main/java/org/elasticsearch/search/SearchContextMissingException.java
+++ b/server/src/main/java/org/elasticsearch/search/SearchContextMissingException.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.search.internal.ShardSearchContextId;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/elasticsearch/search/SearchHits.java b/server/src/main/java/org/elasticsearch/search/SearchHits.java
index b557ed806c8ed..ad47fdd3633ea 100644
--- a/server/src/main/java/org/elasticsearch/search/SearchHits.java
+++ b/server/src/main/java/org/elasticsearch/search/SearchHits.java
@@ -31,7 +31,7 @@
 import org.elasticsearch.common.xcontent.ToXContentFragment;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/elasticsearch/search/SearchParseException.java b/server/src/main/java/org/elasticsearch/search/SearchParseException.java
index a876a5122022f..3fa6cf33e2463 100644
--- a/server/src/main/java/org/elasticsearch/search/SearchParseException.java
+++ b/server/src/main/java/org/elasticsearch/search/SearchParseException.java
@@ -24,7 +24,7 @@
 import org.elasticsearch.common.io.stream.StreamOutput;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentLocation;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java b/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java
index 1f884ea28ec5c..4268e51fdb38e 100644
--- a/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java
+++ b/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java
@@ -25,7 +25,7 @@
 import org.elasticsearch.common.io.stream.StreamOutput;
 import org.elasticsearch.common.util.BigArrays;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.script.ScriptService;
 import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
 import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator.PipelineTree;
@@ -312,8 +312,8 @@ public Map getMetadata() {
     }
 
     /**
-     * The {@linkplain PipelineAggregator}s sent to older versions of Elasticsearch.
-     * @deprecated only use these for serializing to older Elasticsearch versions
+     * The {@linkplain PipelineAggregator}s sent to older versions of OpenSearch.
+     * @deprecated only use these for serializing to older OpenSearch versions
      */
     @Deprecated
     public List pipelineAggregatorsForBwcSerialization() {
diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/MultiBucketConsumerService.java b/server/src/main/java/org/elasticsearch/search/aggregations/MultiBucketConsumerService.java
index 9cbc4eeab9c9a..b7dcce269cccf 100644
--- a/server/src/main/java/org/elasticsearch/search/aggregations/MultiBucketConsumerService.java
+++ b/server/src/main/java/org/elasticsearch/search/aggregations/MultiBucketConsumerService.java
@@ -25,7 +25,7 @@
 import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.search.aggregations.bucket.BucketsAggregator;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/elasticsearch/search/fetch/StoredFieldsContext.java b/server/src/main/java/org/elasticsearch/search/fetch/StoredFieldsContext.java
index 9ac90806aa4c7..6ae1549fc9b01 100644
--- a/server/src/main/java/org/elasticsearch/search/fetch/StoredFieldsContext.java
+++ b/server/src/main/java/org/elasticsearch/search/fetch/StoredFieldsContext.java
@@ -26,7 +26,7 @@
 import org.elasticsearch.common.io.stream.Writeable;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/elasticsearch/search/fetch/subphase/FetchSourceContext.java b/server/src/main/java/org/elasticsearch/search/fetch/subphase/FetchSourceContext.java
index 5298e7eca0586..e38382297a7a4 100644
--- a/server/src/main/java/org/elasticsearch/search/fetch/subphase/FetchSourceContext.java
+++ b/server/src/main/java/org/elasticsearch/search/fetch/subphase/FetchSourceContext.java
@@ -30,7 +30,7 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.support.XContentMapValues;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/elasticsearch/search/suggest/Suggest.java b/server/src/main/java/org/elasticsearch/search/suggest/Suggest.java
index 4f4a5e7571380..c5742187f39e1 100644
--- a/server/src/main/java/org/elasticsearch/search/suggest/Suggest.java
+++ b/server/src/main/java/org/elasticsearch/search/suggest/Suggest.java
@@ -35,7 +35,7 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentParserUtils;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.aggregations.Aggregation;
 import org.elasticsearch.search.suggest.Suggest.Suggestion.Entry;
 import org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option;
diff --git a/server/src/main/java/org/elasticsearch/snapshots/ConcurrentSnapshotExecutionException.java b/server/src/main/java/org/elasticsearch/snapshots/ConcurrentSnapshotExecutionException.java
index 91a40fea09ffb..cca1018e01239 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/ConcurrentSnapshotExecutionException.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/ConcurrentSnapshotExecutionException.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.snapshots;
 
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/snapshots/InvalidSnapshotNameException.java b/server/src/main/java/org/elasticsearch/snapshots/InvalidSnapshotNameException.java
index 2acc82add36df..9a033a68e9bd9 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/InvalidSnapshotNameException.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/InvalidSnapshotNameException.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.snapshots;
 
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java b/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java
index 1c38d9fa1a07f..dadbe58609563 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java
@@ -27,7 +27,7 @@
 import org.elasticsearch.common.xcontent.ToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.Collections;
diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInProgressException.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInProgressException.java
index ca71abe851175..63e08137b17bf 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInProgressException.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInProgressException.java
@@ -21,7 +21,7 @@
 
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java
index 710315d0436f6..5c987bc07d7ee 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java
@@ -35,7 +35,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentParserUtils;
 import org.elasticsearch.repositories.IndexId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.time.Instant;
@@ -446,10 +446,10 @@ public List shardFailures() {
     }
 
     /**
-     * Returns the version of elasticsearch that the snapshot was created with.  Will only
+     * Returns the version of opensearch that the snapshot was created with.  Will only
      * return {@code null} if {@link #state()} returns {@code null} or {@link SnapshotState#INCOMPATIBLE}.
      *
-     * @return version of elasticsearch that the snapshot was created with
+     * @return version of opensearch that the snapshot was created with
      */
     @Nullable
     public Version version() {
diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java
index 93fa6af2c3f25..163dbceec57f7 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.snapshots;
 
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java
index d1d7d560dda5e..6b43cf3ebeae1 100644
--- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java
+++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java
@@ -31,7 +31,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.index.snapshots.IndexShardSnapshotFailedException;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.Objects;
diff --git a/server/src/main/java/org/elasticsearch/transport/TcpTransport.java b/server/src/main/java/org/elasticsearch/transport/TcpTransport.java
index ea5fbd2290b9e..c24ee341c6b3a 100644
--- a/server/src/main/java/org/elasticsearch/transport/TcpTransport.java
+++ b/server/src/main/java/org/elasticsearch/transport/TcpTransport.java
@@ -56,7 +56,7 @@
 import org.elasticsearch.indices.breaker.CircuitBreakerService;
 import org.elasticsearch.monitor.jvm.JvmInfo;
 import org.elasticsearch.node.Node;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.threadpool.ThreadPool;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/elasticsearch/usage/UsageService.java b/server/src/main/java/org/elasticsearch/usage/UsageService.java
index 311679aeaeb3e..8567866e9096a 100644
--- a/server/src/main/java/org/elasticsearch/usage/UsageService.java
+++ b/server/src/main/java/org/elasticsearch/usage/UsageService.java
@@ -39,7 +39,7 @@
 package org.elasticsearch.usage;
 
 import org.opensearch.action.admin.cluster.node.usage.NodeUsage;
-import org.elasticsearch.rest.BaseRestHandler;
+import org.opensearch.rest.BaseRestHandler;
 
 import java.util.HashMap;
 import java.util.Locale;
@@ -47,7 +47,7 @@
 import java.util.Objects;
 
 /**
- * A service to monitor usage of Elasticsearch features.
+ * A service to monitor usage of OpenSearch features.
  */
 public class UsageService {
 
diff --git a/server/src/main/java/org/opensearch/action/ActionModule.java b/server/src/main/java/org/opensearch/action/ActionModule.java
index df78560c43f79..55092416fd30a 100644
--- a/server/src/main/java/org/opensearch/action/ActionModule.java
+++ b/server/src/main/java/org/opensearch/action/ActionModule.java
@@ -263,136 +263,136 @@
 import org.elasticsearch.persistent.UpdatePersistentTaskStatusAction;
 import org.elasticsearch.plugins.ActionPlugin;
 import org.elasticsearch.plugins.ActionPlugin.ActionHandler;
-import org.elasticsearch.rest.RestController;
-import org.elasticsearch.rest.RestHandler;
-import org.elasticsearch.rest.RestHeaderDefinition;
-import org.elasticsearch.rest.action.RestFieldCapabilitiesAction;
-import org.elasticsearch.rest.action.RestMainAction;
-import org.elasticsearch.rest.action.admin.cluster.RestAddVotingConfigExclusionAction;
-import org.elasticsearch.rest.action.admin.cluster.RestCancelTasksAction;
-import org.elasticsearch.rest.action.admin.cluster.RestCleanupRepositoryAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClearVotingConfigExclusionsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestCloneSnapshotAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterAllocationExplainAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterGetSettingsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterHealthAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterRerouteAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterSearchShardsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterStateAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterStatsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterUpdateSettingsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestCreateSnapshotAction;
-import org.elasticsearch.rest.action.admin.cluster.RestDeleteRepositoryAction;
-import org.elasticsearch.rest.action.admin.cluster.RestDeleteSnapshotAction;
-import org.elasticsearch.rest.action.admin.cluster.RestDeleteStoredScriptAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetRepositoriesAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetScriptContextAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetScriptLanguageAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetSnapshotsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetStoredScriptAction;
-import org.elasticsearch.rest.action.admin.cluster.RestGetTaskAction;
-import org.elasticsearch.rest.action.admin.cluster.RestListTasksAction;
-import org.elasticsearch.rest.action.admin.cluster.RestNodesHotThreadsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction;
-import org.elasticsearch.rest.action.admin.cluster.RestNodesStatsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestNodesUsageAction;
-import org.elasticsearch.rest.action.admin.cluster.RestPendingClusterTasksAction;
-import org.elasticsearch.rest.action.admin.cluster.RestPutRepositoryAction;
-import org.elasticsearch.rest.action.admin.cluster.RestPutStoredScriptAction;
-import org.elasticsearch.rest.action.admin.cluster.RestReloadSecureSettingsAction;
-import org.elasticsearch.rest.action.admin.cluster.RestRemoteClusterInfoAction;
-import org.elasticsearch.rest.action.admin.cluster.RestRestoreSnapshotAction;
-import org.elasticsearch.rest.action.admin.cluster.RestSnapshotsStatusAction;
-import org.elasticsearch.rest.action.admin.cluster.RestVerifyRepositoryAction;
-import org.elasticsearch.rest.action.admin.cluster.dangling.RestDeleteDanglingIndexAction;
-import org.elasticsearch.rest.action.admin.cluster.dangling.RestImportDanglingIndexAction;
-import org.elasticsearch.rest.action.admin.cluster.dangling.RestListDanglingIndicesAction;
-import org.elasticsearch.rest.action.admin.indices.RestAddIndexBlockAction;
-import org.elasticsearch.rest.action.admin.indices.RestAnalyzeAction;
-import org.elasticsearch.rest.action.admin.indices.RestClearIndicesCacheAction;
-import org.elasticsearch.rest.action.admin.indices.RestCloseIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestCreateDataStreamAction;
-import org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestDataStreamsStatsAction;
-import org.elasticsearch.rest.action.admin.indices.RestDeleteComponentTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestDeleteComposableIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestDeleteDataStreamAction;
-import org.elasticsearch.rest.action.admin.indices.RestDeleteIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestDeleteIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestFlushAction;
-import org.elasticsearch.rest.action.admin.indices.RestForceMergeAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetAliasesAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetComponentTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetComposableIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetDataStreamsAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetFieldMappingAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetIndicesAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetMappingAction;
-import org.elasticsearch.rest.action.admin.indices.RestGetSettingsAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndexDeleteAliasesAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndexPutAliasAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndicesAliasesAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndicesSegmentsAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndicesShardStoresAction;
-import org.elasticsearch.rest.action.admin.indices.RestIndicesStatsAction;
-import org.elasticsearch.rest.action.admin.indices.RestOpenIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestPutComponentTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestPutComposableIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestPutIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestPutMappingAction;
-import org.elasticsearch.rest.action.admin.indices.RestRecoveryAction;
-import org.elasticsearch.rest.action.admin.indices.RestRefreshAction;
-import org.elasticsearch.rest.action.admin.indices.RestResizeHandler;
-import org.elasticsearch.rest.action.admin.indices.RestResolveIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestRolloverIndexAction;
-import org.elasticsearch.rest.action.admin.indices.RestSimulateIndexTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestSimulateTemplateAction;
-import org.elasticsearch.rest.action.admin.indices.RestSyncedFlushAction;
-import org.elasticsearch.rest.action.admin.indices.RestUpdateSettingsAction;
-import org.elasticsearch.rest.action.admin.indices.RestUpgradeAction;
-import org.elasticsearch.rest.action.admin.indices.RestUpgradeStatusAction;
-import org.elasticsearch.rest.action.admin.indices.RestValidateQueryAction;
-import org.elasticsearch.rest.action.cat.AbstractCatAction;
-import org.elasticsearch.rest.action.cat.RestAliasAction;
-import org.elasticsearch.rest.action.cat.RestAllocationAction;
-import org.elasticsearch.rest.action.cat.RestCatAction;
-import org.elasticsearch.rest.action.cat.RestCatRecoveryAction;
-import org.elasticsearch.rest.action.cat.RestFielddataAction;
-import org.elasticsearch.rest.action.cat.RestHealthAction;
-import org.elasticsearch.rest.action.cat.RestIndicesAction;
-import org.elasticsearch.rest.action.cat.RestMasterAction;
-import org.elasticsearch.rest.action.cat.RestNodeAttrsAction;
-import org.elasticsearch.rest.action.cat.RestNodesAction;
-import org.elasticsearch.rest.action.cat.RestPluginsAction;
-import org.elasticsearch.rest.action.cat.RestRepositoriesAction;
-import org.elasticsearch.rest.action.cat.RestSegmentsAction;
-import org.elasticsearch.rest.action.cat.RestShardsAction;
-import org.elasticsearch.rest.action.cat.RestSnapshotAction;
-import org.elasticsearch.rest.action.cat.RestTasksAction;
-import org.elasticsearch.rest.action.cat.RestTemplatesAction;
-import org.elasticsearch.rest.action.cat.RestThreadPoolAction;
-import org.elasticsearch.rest.action.document.RestBulkAction;
-import org.elasticsearch.rest.action.document.RestDeleteAction;
-import org.elasticsearch.rest.action.document.RestGetAction;
-import org.elasticsearch.rest.action.document.RestGetSourceAction;
-import org.elasticsearch.rest.action.document.RestIndexAction;
-import org.elasticsearch.rest.action.document.RestIndexAction.AutoIdHandler;
-import org.elasticsearch.rest.action.document.RestIndexAction.CreateHandler;
-import org.elasticsearch.rest.action.document.RestMultiGetAction;
-import org.elasticsearch.rest.action.document.RestMultiTermVectorsAction;
-import org.elasticsearch.rest.action.document.RestTermVectorsAction;
-import org.elasticsearch.rest.action.document.RestUpdateAction;
-import org.elasticsearch.rest.action.ingest.RestDeletePipelineAction;
-import org.elasticsearch.rest.action.ingest.RestGetPipelineAction;
-import org.elasticsearch.rest.action.ingest.RestPutPipelineAction;
-import org.elasticsearch.rest.action.ingest.RestSimulatePipelineAction;
-import org.elasticsearch.rest.action.search.RestClearScrollAction;
-import org.elasticsearch.rest.action.search.RestCountAction;
-import org.elasticsearch.rest.action.search.RestExplainAction;
-import org.elasticsearch.rest.action.search.RestMultiSearchAction;
-import org.elasticsearch.rest.action.search.RestSearchAction;
-import org.elasticsearch.rest.action.search.RestSearchScrollAction;
+import org.opensearch.rest.RestController;
+import org.opensearch.rest.RestHandler;
+import org.opensearch.rest.RestHeaderDefinition;
+import org.opensearch.rest.action.RestFieldCapabilitiesAction;
+import org.opensearch.rest.action.RestMainAction;
+import org.opensearch.rest.action.admin.cluster.RestAddVotingConfigExclusionAction;
+import org.opensearch.rest.action.admin.cluster.RestCancelTasksAction;
+import org.opensearch.rest.action.admin.cluster.RestCleanupRepositoryAction;
+import org.opensearch.rest.action.admin.cluster.RestClearVotingConfigExclusionsAction;
+import org.opensearch.rest.action.admin.cluster.RestCloneSnapshotAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterAllocationExplainAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterGetSettingsAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterHealthAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterRerouteAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterSearchShardsAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterStateAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterStatsAction;
+import org.opensearch.rest.action.admin.cluster.RestClusterUpdateSettingsAction;
+import org.opensearch.rest.action.admin.cluster.RestCreateSnapshotAction;
+import org.opensearch.rest.action.admin.cluster.RestDeleteRepositoryAction;
+import org.opensearch.rest.action.admin.cluster.RestDeleteSnapshotAction;
+import org.opensearch.rest.action.admin.cluster.RestDeleteStoredScriptAction;
+import org.opensearch.rest.action.admin.cluster.RestGetRepositoriesAction;
+import org.opensearch.rest.action.admin.cluster.RestGetScriptContextAction;
+import org.opensearch.rest.action.admin.cluster.RestGetScriptLanguageAction;
+import org.opensearch.rest.action.admin.cluster.RestGetSnapshotsAction;
+import org.opensearch.rest.action.admin.cluster.RestGetStoredScriptAction;
+import org.opensearch.rest.action.admin.cluster.RestGetTaskAction;
+import org.opensearch.rest.action.admin.cluster.RestListTasksAction;
+import org.opensearch.rest.action.admin.cluster.RestNodesHotThreadsAction;
+import org.opensearch.rest.action.admin.cluster.RestNodesInfoAction;
+import org.opensearch.rest.action.admin.cluster.RestNodesStatsAction;
+import org.opensearch.rest.action.admin.cluster.RestNodesUsageAction;
+import org.opensearch.rest.action.admin.cluster.RestPendingClusterTasksAction;
+import org.opensearch.rest.action.admin.cluster.RestPutRepositoryAction;
+import org.opensearch.rest.action.admin.cluster.RestPutStoredScriptAction;
+import org.opensearch.rest.action.admin.cluster.RestReloadSecureSettingsAction;
+import org.opensearch.rest.action.admin.cluster.RestRemoteClusterInfoAction;
+import org.opensearch.rest.action.admin.cluster.RestRestoreSnapshotAction;
+import org.opensearch.rest.action.admin.cluster.RestSnapshotsStatusAction;
+import org.opensearch.rest.action.admin.cluster.RestVerifyRepositoryAction;
+import org.opensearch.rest.action.admin.cluster.dangling.RestDeleteDanglingIndexAction;
+import org.opensearch.rest.action.admin.cluster.dangling.RestImportDanglingIndexAction;
+import org.opensearch.rest.action.admin.cluster.dangling.RestListDanglingIndicesAction;
+import org.opensearch.rest.action.admin.indices.RestAddIndexBlockAction;
+import org.opensearch.rest.action.admin.indices.RestAnalyzeAction;
+import org.opensearch.rest.action.admin.indices.RestClearIndicesCacheAction;
+import org.opensearch.rest.action.admin.indices.RestCloseIndexAction;
+import org.opensearch.rest.action.admin.indices.RestCreateDataStreamAction;
+import org.opensearch.rest.action.admin.indices.RestCreateIndexAction;
+import org.opensearch.rest.action.admin.indices.RestDataStreamsStatsAction;
+import org.opensearch.rest.action.admin.indices.RestDeleteComponentTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestDeleteComposableIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestDeleteDataStreamAction;
+import org.opensearch.rest.action.admin.indices.RestDeleteIndexAction;
+import org.opensearch.rest.action.admin.indices.RestDeleteIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestFlushAction;
+import org.opensearch.rest.action.admin.indices.RestForceMergeAction;
+import org.opensearch.rest.action.admin.indices.RestGetAliasesAction;
+import org.opensearch.rest.action.admin.indices.RestGetComponentTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestGetComposableIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestGetDataStreamsAction;
+import org.opensearch.rest.action.admin.indices.RestGetFieldMappingAction;
+import org.opensearch.rest.action.admin.indices.RestGetIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestGetIndicesAction;
+import org.opensearch.rest.action.admin.indices.RestGetMappingAction;
+import org.opensearch.rest.action.admin.indices.RestGetSettingsAction;
+import org.opensearch.rest.action.admin.indices.RestIndexDeleteAliasesAction;
+import org.opensearch.rest.action.admin.indices.RestIndexPutAliasAction;
+import org.opensearch.rest.action.admin.indices.RestIndicesAliasesAction;
+import org.opensearch.rest.action.admin.indices.RestIndicesSegmentsAction;
+import org.opensearch.rest.action.admin.indices.RestIndicesShardStoresAction;
+import org.opensearch.rest.action.admin.indices.RestIndicesStatsAction;
+import org.opensearch.rest.action.admin.indices.RestOpenIndexAction;
+import org.opensearch.rest.action.admin.indices.RestPutComponentTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestPutComposableIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestPutIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestPutMappingAction;
+import org.opensearch.rest.action.admin.indices.RestRecoveryAction;
+import org.opensearch.rest.action.admin.indices.RestRefreshAction;
+import org.opensearch.rest.action.admin.indices.RestResizeHandler;
+import org.opensearch.rest.action.admin.indices.RestResolveIndexAction;
+import org.opensearch.rest.action.admin.indices.RestRolloverIndexAction;
+import org.opensearch.rest.action.admin.indices.RestSimulateIndexTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestSimulateTemplateAction;
+import org.opensearch.rest.action.admin.indices.RestSyncedFlushAction;
+import org.opensearch.rest.action.admin.indices.RestUpdateSettingsAction;
+import org.opensearch.rest.action.admin.indices.RestUpgradeAction;
+import org.opensearch.rest.action.admin.indices.RestUpgradeStatusAction;
+import org.opensearch.rest.action.admin.indices.RestValidateQueryAction;
+import org.opensearch.rest.action.cat.AbstractCatAction;
+import org.opensearch.rest.action.cat.RestAliasAction;
+import org.opensearch.rest.action.cat.RestAllocationAction;
+import org.opensearch.rest.action.cat.RestCatAction;
+import org.opensearch.rest.action.cat.RestCatRecoveryAction;
+import org.opensearch.rest.action.cat.RestFielddataAction;
+import org.opensearch.rest.action.cat.RestHealthAction;
+import org.opensearch.rest.action.cat.RestIndicesAction;
+import org.opensearch.rest.action.cat.RestMasterAction;
+import org.opensearch.rest.action.cat.RestNodeAttrsAction;
+import org.opensearch.rest.action.cat.RestNodesAction;
+import org.opensearch.rest.action.cat.RestPluginsAction;
+import org.opensearch.rest.action.cat.RestRepositoriesAction;
+import org.opensearch.rest.action.cat.RestSegmentsAction;
+import org.opensearch.rest.action.cat.RestShardsAction;
+import org.opensearch.rest.action.cat.RestSnapshotAction;
+import org.opensearch.rest.action.cat.RestTasksAction;
+import org.opensearch.rest.action.cat.RestTemplatesAction;
+import org.opensearch.rest.action.cat.RestThreadPoolAction;
+import org.opensearch.rest.action.document.RestBulkAction;
+import org.opensearch.rest.action.document.RestDeleteAction;
+import org.opensearch.rest.action.document.RestGetAction;
+import org.opensearch.rest.action.document.RestGetSourceAction;
+import org.opensearch.rest.action.document.RestIndexAction;
+import org.opensearch.rest.action.document.RestIndexAction.AutoIdHandler;
+import org.opensearch.rest.action.document.RestIndexAction.CreateHandler;
+import org.opensearch.rest.action.document.RestMultiGetAction;
+import org.opensearch.rest.action.document.RestMultiTermVectorsAction;
+import org.opensearch.rest.action.document.RestTermVectorsAction;
+import org.opensearch.rest.action.document.RestUpdateAction;
+import org.opensearch.rest.action.ingest.RestDeletePipelineAction;
+import org.opensearch.rest.action.ingest.RestGetPipelineAction;
+import org.opensearch.rest.action.ingest.RestPutPipelineAction;
+import org.opensearch.rest.action.ingest.RestSimulatePipelineAction;
+import org.opensearch.rest.action.search.RestClearScrollAction;
+import org.opensearch.rest.action.search.RestCountAction;
+import org.opensearch.rest.action.search.RestExplainAction;
+import org.opensearch.rest.action.search.RestMultiSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchScrollAction;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.usage.UsageService;
@@ -797,11 +797,11 @@ public void initRestHandlers(Supplier nodesInCluster) {
         registerHandler.accept(new RestIndicesAction());
         registerHandler.accept(new RestSegmentsAction());
         // Fully qualified to prevent interference with rest.action.count.RestCountAction
-        registerHandler.accept(new org.elasticsearch.rest.action.cat.RestCountAction());
+        registerHandler.accept(new org.opensearch.rest.action.cat.RestCountAction());
         // Fully qualified to prevent interference with rest.action.indices.RestRecoveryAction
         registerHandler.accept(new RestCatRecoveryAction());
         registerHandler.accept(new RestHealthAction());
-        registerHandler.accept(new org.elasticsearch.rest.action.cat.RestPendingClusterTasksAction());
+        registerHandler.accept(new org.opensearch.rest.action.cat.RestPendingClusterTasksAction());
         registerHandler.accept(new RestAliasAction());
         registerHandler.accept(new RestThreadPoolAction());
         registerHandler.accept(new RestPluginsAction());
diff --git a/server/src/main/java/org/opensearch/action/DocWriteResponse.java b/server/src/main/java/org/opensearch/action/DocWriteResponse.java
index a6daceb0a89bc..0c0cff8975998 100644
--- a/server/src/main/java/org/opensearch/action/DocWriteResponse.java
+++ b/server/src/main/java/org/opensearch/action/DocWriteResponse.java
@@ -35,7 +35,7 @@
 import org.elasticsearch.index.IndexSettings;
 import org.elasticsearch.index.seqno.SequenceNumbers;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
diff --git a/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java b/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java
index 338bde4d17b85..8382d3c17af6f 100644
--- a/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java
+++ b/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/opensearch/action/RoutingMissingException.java b/server/src/main/java/org/opensearch/action/RoutingMissingException.java
index dab9d892d0dff..23c7a62341b52 100644
--- a/server/src/main/java/org/opensearch/action/RoutingMissingException.java
+++ b/server/src/main/java/org/opensearch/action/RoutingMissingException.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.Objects;
diff --git a/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java b/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java
index e0e179fe3884a..cd97496553043 100644
--- a/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java
+++ b/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.io.stream.Writeable;
 import org.elasticsearch.common.xcontent.ToXContentObject;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.util.Objects;
 
diff --git a/server/src/main/java/org/opensearch/action/TaskOperationFailure.java b/server/src/main/java/org/opensearch/action/TaskOperationFailure.java
index ace55898f406d..b68fbabee6f76 100644
--- a/server/src/main/java/org/opensearch/action/TaskOperationFailure.java
+++ b/server/src/main/java/org/opensearch/action/TaskOperationFailure.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.ToXContentFragment;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/opensearch/action/UnavailableShardsException.java b/server/src/main/java/org/opensearch/action/UnavailableShardsException.java
index 93d8cfcf2c687..e63ce61b8f9b6 100644
--- a/server/src/main/java/org/opensearch/action/UnavailableShardsException.java
+++ b/server/src/main/java/org/opensearch/action/UnavailableShardsException.java
@@ -23,7 +23,7 @@
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java
index aa9142503ceae..483028acf8154 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java
@@ -34,7 +34,7 @@
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.HashMap;
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java
index 20984e7a2f3cb..f0f55ac40e0ce 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java
@@ -28,7 +28,7 @@
 import org.elasticsearch.common.xcontent.ToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.snapshots.SnapshotInfo;
 import org.elasticsearch.snapshots.SnapshotInfo.SnapshotInfoBuilder;
 
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java
index a3c0a569d5095..c56e888af1089 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.ToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.snapshots.RestoreInfo;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java
index a1f7f6f561366..74598c36afea6 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java
@@ -27,7 +27,7 @@
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.script.ScriptContextInfo;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java
index bc5b394bd88ad..329310242f5ff 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java
@@ -26,7 +26,7 @@
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.script.ScriptLanguagesInfo;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java
index 2d5e6821cf5fb..3d6023af4de18 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.script.StoredScriptSource;
 
 import java.io.IOException;
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java
index 12ab45968dbb8..14c6ca6f05171 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java
@@ -42,7 +42,7 @@
 import org.elasticsearch.common.inject.Inject;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.index.Index;
-import org.elasticsearch.rest.action.admin.indices.AliasesNotFoundException;
+import org.opensearch.rest.action.admin.indices.AliasesNotFoundException;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.transport.TransportService;
 
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java
index e0876267d3bf5..5e64a07578398 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java
@@ -28,7 +28,7 @@
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/SyncedFlushResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/SyncedFlushResponse.java
index 10dbc07d7a80b..0319204a62655 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/flush/SyncedFlushResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/SyncedFlushResponse.java
@@ -28,7 +28,7 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.indices.flush.ShardsSyncedFlushResult;
 import org.elasticsearch.indices.flush.SyncedFlushService;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java
index 006e67b85b4cc..f370746204de3 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java
@@ -46,8 +46,8 @@
 import java.util.Objects;
 
 import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
-import static org.elasticsearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 
 /**
  * A response for a get index action.
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java
index cf87f64d9b872..d80c74a4bd6f0 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java
@@ -35,7 +35,7 @@
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.mapper.Mapper;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
+import org.opensearch.rest.BaseRestHandler;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -47,7 +47,7 @@
 import static org.elasticsearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
 import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
 import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
-import static org.elasticsearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
+import static org.opensearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
 
 /**
  * Response object for {@link GetFieldMappingsRequest} API
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java
index dee23d3a87ca5..1c4884ed04ab6 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java
@@ -30,12 +30,12 @@
 import org.elasticsearch.common.xcontent.ToXContentFragment;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
+import org.opensearch.rest.BaseRestHandler;
 
 import java.io.IOException;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
+import static org.opensearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
 
 public class GetMappingsResponse extends ActionResponse implements ToXContentFragment {
 
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java
index 9f69452a39a74..ea8719c632c05 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java
@@ -32,8 +32,8 @@
 import java.util.List;
 
 import static java.util.Collections.singletonMap;
-import static org.elasticsearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.DEFAULT_INCLUDE_TYPE_NAME_POLICY;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 
 public class GetIndexTemplatesResponse extends ActionResponse implements ToXContentObject {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/AbstractRestChannel.java b/server/src/main/java/org/opensearch/rest/AbstractRestChannel.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/AbstractRestChannel.java
rename to server/src/main/java/org/opensearch/rest/AbstractRestChannel.java
index 467f1d969e8be..0b03479370b5b 100644
--- a/server/src/main/java/org/elasticsearch/rest/AbstractRestChannel.java
+++ b/server/src/main/java/org/opensearch/rest/AbstractRestChannel.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.Strings;
diff --git a/server/src/main/java/org/elasticsearch/rest/BaseRestHandler.java b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/BaseRestHandler.java
rename to server/src/main/java/org/opensearch/rest/BaseRestHandler.java
index 5e950ce64d583..fbd2271f3f485 100644
--- a/server/src/main/java/org/elasticsearch/rest/BaseRestHandler.java
+++ b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Setting.Property;
 import org.elasticsearch.plugins.ActionPlugin;
-import org.elasticsearch.rest.action.admin.cluster.RestNodesUsageAction;
+import org.opensearch.rest.action.admin.cluster.RestNodesUsageAction;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/elasticsearch/rest/BytesRestResponse.java b/server/src/main/java/org/opensearch/rest/BytesRestResponse.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/BytesRestResponse.java
rename to server/src/main/java/org/opensearch/rest/BytesRestResponse.java
index 1456ad16e3b54..535767f556136 100644
--- a/server/src/main/java/org/elasticsearch/rest/BytesRestResponse.java
+++ b/server/src/main/java/org/opensearch/rest/BytesRestResponse.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -181,7 +181,7 @@ public static OpenSearchStatusException errorFromXContent(XContentParser parser)
         }
 
         if (exception == null) {
-            throw new IllegalStateException("Failed to parse elasticsearch status exception: no exception was found");
+            throw new IllegalStateException("Failed to parse opensearch status exception: no exception was found");
         }
 
         OpenSearchStatusException result = new OpenSearchStatusException(exception.getMessage(), status, exception.getCause());
diff --git a/server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java b/server/src/main/java/org/opensearch/rest/DeprecationRestHandler.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java
rename to server/src/main/java/org/opensearch/rest/DeprecationRestHandler.java
index 0581c77b32da8..586058106bee0 100644
--- a/server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java
+++ b/server/src/main/java/org/opensearch/rest/DeprecationRestHandler.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
diff --git a/server/src/main/java/org/elasticsearch/rest/MethodHandlers.java b/server/src/main/java/org/opensearch/rest/MethodHandlers.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/MethodHandlers.java
rename to server/src/main/java/org/opensearch/rest/MethodHandlers.java
index 0d6233e62f925..409b468c6a365 100644
--- a/server/src/main/java/org/elasticsearch/rest/MethodHandlers.java
+++ b/server/src/main/java/org/opensearch/rest/MethodHandlers.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.common.Nullable;
 
diff --git a/server/src/main/java/org/elasticsearch/rest/RestChannel.java b/server/src/main/java/org/opensearch/rest/RestChannel.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/RestChannel.java
rename to server/src/main/java/org/opensearch/rest/RestChannel.java
index ab4b1e710c12f..7cb9ebe6fa516 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestChannel.java
+++ b/server/src/main/java/org/opensearch/rest/RestChannel.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
@@ -36,7 +36,7 @@ public interface RestChannel {
     XContentBuilder newErrorBuilder() throws IOException;
 
     XContentBuilder newBuilder(@Nullable XContentType xContentType, boolean useFiltering) throws IOException;
-    
+
     XContentBuilder newBuilder(@Nullable XContentType xContentType, @Nullable XContentType responseContentType,
             boolean useFiltering) throws IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/rest/RestController.java b/server/src/main/java/org/opensearch/rest/RestController.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/RestController.java
rename to server/src/main/java/org/opensearch/rest/RestController.java
index 4644d667fc2ee..4c361ad21e6e2 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestController.java
+++ b/server/src/main/java/org/opensearch/rest/RestController.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -55,12 +55,12 @@
 import java.util.stream.Collectors;
 
 import static org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY;
-import static org.elasticsearch.rest.BytesRestResponse.TEXT_CONTENT_TYPE;
-import static org.elasticsearch.rest.RestStatus.BAD_REQUEST;
-import static org.elasticsearch.rest.RestStatus.INTERNAL_SERVER_ERROR;
-import static org.elasticsearch.rest.RestStatus.METHOD_NOT_ALLOWED;
-import static org.elasticsearch.rest.RestStatus.NOT_ACCEPTABLE;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.BytesRestResponse.TEXT_CONTENT_TYPE;
+import static org.opensearch.rest.RestStatus.BAD_REQUEST;
+import static org.opensearch.rest.RestStatus.INTERNAL_SERVER_ERROR;
+import static org.opensearch.rest.RestStatus.METHOD_NOT_ALLOWED;
+import static org.opensearch.rest.RestStatus.NOT_ACCEPTABLE;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestController implements HttpServerTransport.Dispatcher {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/RestHandler.java b/server/src/main/java/org/opensearch/rest/RestHandler.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/RestHandler.java
rename to server/src/main/java/org/opensearch/rest/RestHandler.java
index 054c618876314..ec282e5b3f27c 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestHandler.java
+++ b/server/src/main/java/org/opensearch/rest/RestHandler.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.XContent;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest.Method;
 
 import java.util.Collections;
 import java.util.List;
diff --git a/server/src/main/java/org/elasticsearch/rest/RestHeaderDefinition.java b/server/src/main/java/org/opensearch/rest/RestHeaderDefinition.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/rest/RestHeaderDefinition.java
rename to server/src/main/java/org/opensearch/rest/RestHeaderDefinition.java
index 6fb95ba80dd5f..f24ce4a0cf1b2 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestHeaderDefinition.java
+++ b/server/src/main/java/org/opensearch/rest/RestHeaderDefinition.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 /**
  * A definition for an http header that should be copied to the {@link org.elasticsearch.common.util.concurrent.ThreadContext} when
diff --git a/server/src/main/java/org/elasticsearch/rest/RestRequest.java b/server/src/main/java/org/opensearch/rest/RestRequest.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/RestRequest.java
rename to server/src/main/java/org/opensearch/rest/RestRequest.java
index a89c3e76c6dae..8c4755dcf9cc0 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestRequest.java
+++ b/server/src/main/java/org/opensearch/rest/RestRequest.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.apache.lucene.util.SetOnce;
 import org.elasticsearch.OpenSearchParseException;
diff --git a/server/src/main/java/org/elasticsearch/rest/RestRequestFilter.java b/server/src/main/java/org/opensearch/rest/RestRequestFilter.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/RestRequestFilter.java
rename to server/src/main/java/org/opensearch/rest/RestRequestFilter.java
index 8fa235ab30f9d..db8f18de2ae64 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestRequestFilter.java
+++ b/server/src/main/java/org/opensearch/rest/RestRequestFilter.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.Strings;
@@ -34,7 +34,7 @@
 
 /**
  * Identifies an object that supplies a filter for the content of a {@link RestRequest}. This interface should be implemented by a
- * {@link org.elasticsearch.rest.RestHandler} that expects there will be sensitive content in the body of the request such as a password
+ * {@link org.opensearch.rest.RestHandler} that expects there will be sensitive content in the body of the request such as a password
  */
 public interface RestRequestFilter {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/RestResponse.java b/server/src/main/java/org/opensearch/rest/RestResponse.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/RestResponse.java
rename to server/src/main/java/org/opensearch/rest/RestResponse.java
index 7f07a9bc1ad5f..a1a9633bfbb87 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestResponse.java
+++ b/server/src/main/java/org/opensearch/rest/RestResponse.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.OpenSearchException;
 import org.elasticsearch.common.bytes.BytesReference;
diff --git a/server/src/main/java/org/elasticsearch/rest/RestStatus.java b/server/src/main/java/org/opensearch/rest/RestStatus.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/RestStatus.java
rename to server/src/main/java/org/opensearch/rest/RestStatus.java
index 50781d31741ae..dc9e87049f45d 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestStatus.java
+++ b/server/src/main/java/org/opensearch/rest/RestStatus.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.opensearch.action.ShardOperationFailedException;
 import org.elasticsearch.common.io.stream.StreamInput;
diff --git a/server/src/main/java/org/elasticsearch/rest/RestUtils.java b/server/src/main/java/org/opensearch/rest/RestUtils.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/RestUtils.java
rename to server/src/main/java/org/opensearch/rest/RestUtils.java
index f1907a2bf18b7..49425ba6be783 100644
--- a/server/src/main/java/org/elasticsearch/rest/RestUtils.java
+++ b/server/src/main/java/org/opensearch/rest/RestUtils.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.common.Booleans;
 import org.elasticsearch.common.Strings;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestActionListener.java b/server/src/main/java/org/opensearch/rest/action/RestActionListener.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/RestActionListener.java
rename to server/src/main/java/org/opensearch/rest/action/RestActionListener.java
index c6e972d334522..23ef5e805784e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestActionListener.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestActionListener.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.opensearch.action.ActionListener;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
 
 /**
  * An action listener that requires {@link #processResponse(Object)} to be implemented
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestActions.java b/server/src/main/java/org/opensearch/rest/action/RestActions.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/rest/action/RestActions.java
rename to server/src/main/java/org/opensearch/rest/action/RestActions.java
index 5b2247926ac0a..72c2cb80998e0 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestActions.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestActions.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.ExceptionsHelper;
 import org.opensearch.action.FailedNodeException;
@@ -37,11 +37,11 @@
 import org.elasticsearch.index.query.QueryBuilder;
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.index.query.QueryStringQueryBuilder;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.List;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestBuilderListener.java b/server/src/main/java/org/opensearch/rest/action/RestBuilderListener.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/RestBuilderListener.java
rename to server/src/main/java/org/opensearch/rest/action/RestBuilderListener.java
index c460331afaa9d..287a209d4799a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestBuilderListener.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestBuilderListener.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestResponse;
 
 /**
  * A REST action listener that builds an {@link XContentBuilder} based response.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestCancellableNodeClient.java b/server/src/main/java/org/opensearch/rest/action/RestCancellableNodeClient.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/action/RestCancellableNodeClient.java
rename to server/src/main/java/org/opensearch/rest/action/RestCancellableNodeClient.java
index 40b24786b899e..e79a6f9fa8d5c 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestCancellableNodeClient.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestCancellableNodeClient.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.ActionRequest;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java b/server/src/main/java/org/opensearch/rest/action/RestFieldCapabilitiesAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java
rename to server/src/main/java/org/opensearch/rest/action/RestFieldCapabilitiesAction.java
index 1bd585a3d2ab3..fc384600992c8 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestFieldCapabilitiesAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestFieldCapabilitiesAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestMainAction.java b/server/src/main/java/org/opensearch/rest/action/RestMainAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/RestMainAction.java
rename to server/src/main/java/org/opensearch/rest/action/RestMainAction.java
index f5a433cd57e73..f06c750029cb9 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestMainAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestMainAction.java
@@ -17,26 +17,26 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.action.main.MainAction;
 import org.elasticsearch.action.main.MainRequest;
 import org.elasticsearch.action.main.MainResponse;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
 
 public class RestMainAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestResponseListener.java b/server/src/main/java/org/opensearch/rest/action/RestResponseListener.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/RestResponseListener.java
rename to server/src/main/java/org/opensearch/rest/action/RestResponseListener.java
index 0f6d442e8d066..a85411e8d0f20 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestResponseListener.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestResponseListener.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestResponse;
 
 /**
  * A REST enabled action listener that has a basic onFailure implementation, and requires
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestStatusToXContentListener.java b/server/src/main/java/org/opensearch/rest/action/RestStatusToXContentListener.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/RestStatusToXContentListener.java
rename to server/src/main/java/org/opensearch/rest/action/RestStatusToXContentListener.java
index 6abe61ea5edbe..8fb68219f9e4e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestStatusToXContentListener.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestStatusToXContentListener.java
@@ -16,14 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.common.xcontent.StatusToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 
 import java.util.function.Function;
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestToXContentListener.java b/server/src/main/java/org/opensearch/rest/action/RestToXContentListener.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/RestToXContentListener.java
rename to server/src/main/java/org/opensearch/rest/action/RestToXContentListener.java
index 06fdd021a3261..0bbb693274200 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/RestToXContentListener.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestToXContentListener.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.ToXContentObject;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 
 /**
  * A REST based action listener that assumes the response is of type {@link ToXContent} and automatically
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java
index 29c7d6ba5894f..92f1b304110d6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -26,15 +26,15 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestAddVotingConfigExclusionAction extends BaseRestHandler {
     private static final TimeValue DEFAULT_TIMEOUT = TimeValue.timeValueSeconds(30L);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCancelTasksAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCancelTasksAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCancelTasksAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCancelTasksAction.java
index 7f41345eddf46..927d3b3a01e99 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCancelTasksAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCancelTasksAction.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.tasks.TaskId;
 
 import java.io.IOException;
@@ -33,8 +33,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.action.admin.cluster.RestListTasksAction.listTasksResponseListener;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.action.admin.cluster.RestListTasksAction.listTasksResponseListener;
 
 
 public class RestCancelTasksAction extends BaseRestHandler {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java
index ddbf0714194a3..3e17777361b90 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCleanupRepositoryAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.cleanupRepositoryRequest;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 /**
  * Cleans up a repository
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java
index 5cb6397f01e65..7910a5c3e07fb 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsAction;
 import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestClearVotingConfigExclusionsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCloneSnapshotAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCloneSnapshotAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCloneSnapshotAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCloneSnapshotAction.java
index 5e3b60d1594e1..45d1a99943ce6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCloneSnapshotAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCloneSnapshotAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.support.XContentMapValues;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 /**
  * Clones indices from one snapshot into another snapshot in the same repository
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java
index 350e205b93bd3..6013c5fca8751 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterAllocationExplainAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainRequest;
 import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainResponse;
@@ -25,20 +25,20 @@
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 /**
  * Class handling cluster allocation explanation at the REST level
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java
index 96b1d1d60ee7e..183954a7367b5 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.settings.ClusterGetSettingsResponse;
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
@@ -30,19 +30,19 @@
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
 import java.util.Set;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestClusterGetSettingsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthAction.java
index 77b1f4f444a23..f72cd43820a0b 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.health.ClusterHealthRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
@@ -26,9 +26,9 @@
 import org.elasticsearch.cluster.health.ClusterHealthStatus;
 import org.elasticsearch.common.Priority;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -39,7 +39,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.clusterHealthRequest;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestClusterHealthAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterRerouteAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterRerouteAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterRerouteAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterRerouteAction.java
index e39ddcaec905e..fed2a5ae10160 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterRerouteAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterRerouteAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest;
 import org.elasticsearch.client.Requests;
@@ -30,9 +30,9 @@
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.common.xcontent.ObjectParser;
 import org.elasticsearch.common.xcontent.ObjectParser.ValueType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -42,7 +42,7 @@
 import java.util.Set;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestClusterRerouteAction extends BaseRestHandler {
     private static final ObjectParser PARSER = new ObjectParser<>("cluster_reroute");
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java
index 1d43dd351bec4..2a36fa2cab455 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java
@@ -17,24 +17,24 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.Requests;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestClusterSearchShardsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStateAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStateAction.java
index c4aad084b1004..21f8af28e0a85 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStateAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
 import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
@@ -31,12 +31,12 @@
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -48,7 +48,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonMap;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestClusterStateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStatsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStatsAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStatsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStatsAction.java
index 6ae3ce8f18759..05924e6328603 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStatsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterStatsAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.stats.ClusterStatsRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions.NodesResponseRestListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions.NodesResponseRestListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestClusterStatsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java
index 84d80f6b75bfa..353346da70db3 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterUpdateSettingsAction.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
 import org.elasticsearch.client.Requests;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -34,7 +34,7 @@
 import java.util.Set;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestClusterUpdateSettingsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCreateSnapshotAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCreateSnapshotAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCreateSnapshotAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCreateSnapshotAction.java
index b85d0760db41b..75789a1d3c95a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCreateSnapshotAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestCreateSnapshotAction.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -31,8 +31,8 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.createSnapshotRequest;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 /**
  * Creates a new snapshot
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java
index 5740ba2165a5f..23d273c9cd285 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteRepositoryAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.deleteRepositoryRequest;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 /**
  * Unregisters a repository
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java
index d9c784379d9ed..2f6e52d4ffe93 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteSnapshotAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.deleteSnapshotRequest;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 /**
  * Deletes a snapshot
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java
index 706ee16472633..5e477940e6145 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestDeleteStoredScriptAction.java
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteStoredScriptAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetRepositoriesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetRepositoriesAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetRepositoriesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetRepositoriesAction.java
index 2305095c897db..fd5d5ac74a043 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetRepositoriesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetRepositoriesAction.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.SettingsFilter;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -35,7 +35,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.getRepositoryRequest;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Returns repository information
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptContextAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptContextAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptContextAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptContextAction.java
index 28e0015f197f3..e09e6663608f2 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptContextAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptContextAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.storedscripts.GetScriptContextAction;
 import org.opensearch.action.admin.cluster.storedscripts.GetScriptContextRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetScriptContextAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
index 3a705bc657037..892eebbea2b0e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.storedscripts.GetScriptLanguageAction;
 import org.opensearch.action.admin.cluster.storedscripts.GetScriptLanguageRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetScriptLanguageAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetSnapshotsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetSnapshotsAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetSnapshotsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetSnapshotsAction.java
index f4b976fa36b14..91efba9e9262c 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetSnapshotsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetSnapshotsAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.getSnapshotsRequest;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Returns information about snapshot
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetStoredScriptAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetStoredScriptAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetStoredScriptAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetStoredScriptAction.java
index 7646def375ff9..b27ec0027db68 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetStoredScriptAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetStoredScriptAction.java
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.storedscripts.GetStoredScriptRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetStoredScriptAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetTaskAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetTaskAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetTaskAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetTaskAction.java
index 49555abd7dcc9..2ed287f8ab4f2 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetTaskAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestGetTaskAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.tasks.TaskId;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetTaskAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestListTasksAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestListTasksAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestListTasksAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestListTasksAction.java
index 3cc44fafc955c..c405334beeb79 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestListTasksAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestListTasksAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest;
@@ -27,14 +27,14 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.tasks.TaskId;
 
 import java.io.IOException;
@@ -42,7 +42,7 @@
 import java.util.function.Supplier;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 
 public class RestListTasksAction extends BaseRestHandler {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java
index 100d18b1b8862..16acc0ecad930 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.hotthreads.NodeHotThreads;
 import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest;
@@ -25,12 +25,12 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -38,7 +38,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodesHotThreadsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoAction.java
index 9092de5caaf62..9ff8c60c110a5 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
 import org.elasticsearch.client.node.NodeClient;
@@ -25,9 +25,9 @@
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.common.util.set.Sets;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions.NodesResponseRestListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions.NodesResponseRestListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -35,7 +35,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodesInfoAction extends BaseRestHandler {
     static final Set ALLOWED_METRICS = NodesInfoRequest.Metric.allMetrics();
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java
similarity index 96%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java
index 39fa576b2699d..cc2ff3a5e9994 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest;
 import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
 import org.opensearch.action.admin.indices.stats.CommonStatsFlags.Flag;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions.NodesResponseRestListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions.NodesResponseRestListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -40,7 +40,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodesStatsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesUsageAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesUsageAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesUsageAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesUsageAction.java
index b8edb487d1db5..107d3f4c404c6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesUsageAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesUsageAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.usage.NodesUsageRequest;
 import org.opensearch.action.admin.cluster.node.usage.NodesUsageResponse;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -39,7 +39,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodesUsageAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java
index efc093da17f57..ad62eb1819881 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPendingClusterTasksAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestPendingClusterTasksAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutRepositoryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutRepositoryAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutRepositoryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutRepositoryAction.java
index cb8eafe665e6c..e7a5365fe497d 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutRepositoryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutRepositoryAction.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -32,8 +32,8 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.putRepositoryRequest;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 /**
  * Registers repositories
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutStoredScriptAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutStoredScriptAction.java
index cdc0293971ed0..2c7e279c33a1a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestPutStoredScriptAction.java
@@ -16,15 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.storedscripts.PutStoredScriptRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.script.StoredScriptSource;
 
 import java.io.IOException;
@@ -32,8 +32,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestPutStoredScriptAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java
index a8dc08f7e2784..2a0abd3cdc17b 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.reload.NodesReloadSecureSettingsRequest;
 import org.opensearch.action.admin.cluster.node.reload.NodesReloadSecureSettingsRequestBuilder;
@@ -28,14 +28,14 @@
 import org.elasticsearch.common.settings.SecureString;
 import org.elasticsearch.common.xcontent.ObjectParser;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequestFilter;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequestFilter;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -44,7 +44,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public final class RestReloadSecureSettingsAction extends BaseRestHandler implements RestRequestFilter {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java
index cafd5a02f194a..0b1500934de27 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRemoteClusterInfoAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.remote.RemoteInfoAction;
 import org.opensearch.action.admin.cluster.remote.RemoteInfoRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public final class RestRemoteClusterInfoAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java
index a064aca694c34..31d27dbb30c82 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestRestoreSnapshotAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.restoreSnapshotRequest;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 /**
  * Restores a snapshot
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java
index a1f2d0d6534d4..595dd7fd3c7c6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestSnapshotsStatusAction.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -32,7 +32,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.snapshotsStatusRequest;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Returns status of currently running snapshot
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java
index 8d0c91cfeda52..064ce3566bad4 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestVerifyRepositoryAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
 import static org.elasticsearch.client.Requests.verifyRepositoryRequest;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestVerifyRepositoryAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java
similarity index 85%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java
index 2b7c692cbbf9a..c8671f40352e3 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestDeleteDanglingIndexAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster.dangling;
+package org.opensearch.rest.action.admin.cluster.dangling;
 
 import org.opensearch.action.admin.indices.dangling.delete.DeleteDanglingIndexRequest;
 import org.elasticsearch.action.support.master.AcknowledgedResponse;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
-import static org.elasticsearch.rest.RestStatus.ACCEPTED;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestStatus.ACCEPTED;
 
 public class RestDeleteDanglingIndexAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java
similarity index 85%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java
index 316ebb93f53ce..d9ba2c9f9e98f 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestImportDanglingIndexAction.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster.dangling;
+package org.opensearch.rest.action.admin.cluster.dangling;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestStatus.ACCEPTED;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestStatus.ACCEPTED;
 
 import java.io.IOException;
 import java.util.List;
@@ -29,10 +29,10 @@
 import org.opensearch.action.admin.indices.dangling.import_index.ImportDanglingIndexRequest;
 import org.elasticsearch.action.support.master.AcknowledgedResponse;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 public class RestImportDanglingIndexAction extends BaseRestHandler {
     @Override
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java
index 563773df64084..2fb60a640914a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/RestListDanglingIndicesAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster.dangling;
+package org.opensearch.rest.action.admin.cluster.dangling;
 
 import org.opensearch.action.admin.indices.dangling.list.ListDanglingIndicesRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestListDanglingIndicesAction extends BaseRestHandler {
     @Override
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/package-info.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/package-info.java
similarity index 80%
rename from server/src/main/java/org/elasticsearch/rest/action/document/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/package-info.java
index 724bd129dea86..7123ff1aef2d9 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/dangling/package-info.java
@@ -18,6 +18,8 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s for actions that can be taken on documents like index, update, get, and delete.
+ * {@link org.opensearch.rest.RestHandler}s for managing dangling indices.
+ *
+ * @see org.opensearch.action.admin.indices.dangling
  */
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.admin.cluster.dangling;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/package-info.java b/server/src/main/java/org/opensearch/rest/action/admin/cluster/package-info.java
similarity index 82%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/cluster/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/admin/cluster/package-info.java
index 56c244c50f930..be680471ca708 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/cluster/package-info.java
@@ -18,7 +18,7 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s for administrative actions that can be taken on the cluster as a whole like getting the
+ * {@link org.opensearch.rest.RestHandler}s for administrative actions that can be taken on the cluster as a whole like getting the
  * listing tasks, adding repositories, and getting stats.
  */
-package org.elasticsearch.rest.action.admin.cluster;
\ No newline at end of file
+package org.opensearch.rest.action.admin.cluster;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/AliasesNotFoundException.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/AliasesNotFoundException.java
similarity index 96%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/AliasesNotFoundException.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/AliasesNotFoundException.java
index bb55a0e1a071d..a92c867331d2d 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/AliasesNotFoundException.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/AliasesNotFoundException.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.ResourceNotFoundException;
 import org.elasticsearch.common.io.stream.StreamInput;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAddIndexBlockAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAddIndexBlockAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAddIndexBlockAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestAddIndexBlockAction.java
index ccbfe1b3f85c5..f8c0cffd15606 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAddIndexBlockAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAddIndexBlockAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.readonly.AddIndexBlockRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.IndexMetadata;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestAddIndexBlockAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java
index 45a96a49797f0..6a6df62b3d76a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java
@@ -16,23 +16,23 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.analyze.AnalyzeAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.ParseField;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestAnalyzeAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheAction.java
index ac195420304e2..21cff3f7abc79 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestClearIndicesCacheAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCloseIndexAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestCloseIndexAction.java
index e25a0aee587c2..e2c04871503c4 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCloseIndexAction.java
@@ -17,23 +17,23 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.close.CloseIndexRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestCloseIndexAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateDataStreamAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateDataStreamAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateDataStreamAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateDataStreamAction.java
index 68bf474b80b6d..2b995848b679e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateDataStreamAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateDataStreamAction.java
@@ -16,13 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.datastream.CreateDataStreamAction;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateIndexAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateIndexAction.java
index fe60d0a06b6fd..c16c8af7000c5 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestCreateIndexAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.create.CreateIndexRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
@@ -26,9 +26,9 @@
 import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.HashMap;
@@ -37,7 +37,7 @@
 
 import static java.util.Collections.singletonList;
 import static java.util.Collections.singletonMap;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestCreateIndexAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestCreateIndexAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDataStreamsStatsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDataStreamsStatsAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDataStreamsStatsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDataStreamsStatsAction.java
index 33a82a3fb807d..11bf7cf02e2a6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDataStreamsStatsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDataStreamsStatsAction.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.datastream.DataStreamsStatsAction;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java
index 3e5429d7e0572..2cf6d20eb1b0c 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComponentTemplateAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.delete.DeleteComponentTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteComponentTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java
index b6a09da18d5bb..4c6ba3dd3dc78 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteComposableIndexTemplateAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.delete.DeleteComposableIndexTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteComposableIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteDataStreamAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteDataStreamAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteDataStreamAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteDataStreamAction.java
index 7ce87b781fe96..e279881ce8d20 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteDataStreamAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteDataStreamAction.java
@@ -16,14 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.datastream.DeleteDataStreamAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexAction.java
index f2b2ad1813bf4..9c4a340ed80a1 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.delete.DeleteIndexRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteIndexAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java
index b744cff7f4f0a..c0d379ee2fed6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestDeleteIndexTemplateAction.java
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestFlushAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestFlushAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestFlushAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestFlushAction.java
index 343da8cb7bd2e..92c60d2a4a5f1 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestFlushAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestFlushAction.java
@@ -17,23 +17,23 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.flush.FlushRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestFlushAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestForceMergeAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestForceMergeAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestForceMergeAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestForceMergeAction.java
index 8eb0e7857b084..d25ad045b817b 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestForceMergeAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestForceMergeAction.java
@@ -17,23 +17,23 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.forcemerge.ForceMergeRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestForceMergeAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetAliasesAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetAliasesAction.java
index e235d157e6c95..9563e4a4a438a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetAliasesAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
 import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest;
@@ -31,12 +31,12 @@
 import org.elasticsearch.common.regex.Regex;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.HashSet;
@@ -48,8 +48,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
 
 /**
  * The REST handler for get alias and head alias APIs.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComponentTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComponentTemplateAction.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComponentTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComponentTemplateAction.java
index c559d4e25ea37..3a18a235897dd 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComponentTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComponentTemplateAction.java
@@ -17,25 +17,25 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.get.GetComponentTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
 
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestGetComponentTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java
index bd1969334b43b..0c1d0f83724ec 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetComposableIndexTemplateAction.java
@@ -17,25 +17,25 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.get.GetComposableIndexTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
 
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestGetComposableIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetDataStreamsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetDataStreamsAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetDataStreamsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetDataStreamsAction.java
index 3ddaa724b5c5b..fc397759a8ec0 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetDataStreamsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetDataStreamsAction.java
@@ -16,14 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.datastream.GetDataStreamAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingAction.java
index 20e8a0a4e33df..2baf5ad51f2f5 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -29,12 +29,12 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -42,9 +42,9 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestGetFieldMappingAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndexTemplateAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndexTemplateAction.java
index 4ea835b18f7fa..3440c5d2de446 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndexTemplateAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesRequest;
 import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse;
@@ -26,10 +26,10 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.set.Sets;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -38,10 +38,10 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
 
 /**
  * The REST handler for get template and head template APIs.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndicesAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndicesAction.java
index 9672d4ed0c910..ea8168a0c34bf 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetIndicesAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 
 import org.opensearch.action.admin.indices.get.GetIndexRequest;
@@ -26,9 +26,9 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -39,8 +39,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
 
 /**
  * The REST handler for get index and head index APIs.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetMappingAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetMappingAction.java
index 7f55fbd67ec74..0b1fe4f57fca2 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetMappingAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import com.carrotsearch.hppc.cursors.ObjectCursor;
 
@@ -38,13 +38,13 @@
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.indices.TypeMissingException;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestBuilderListener;
 import org.elasticsearch.threadpool.ThreadPool;
 
 import java.io.IOException;
@@ -59,8 +59,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
 
 public class RestGetMappingAction extends BaseRestHandler {
     private static final Logger logger = LogManager.getLogger(RestGetMappingAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetSettingsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetSettingsAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetSettingsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetSettingsAction.java
index 26afcf0fa9571..18cf83a3cd410 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetSettingsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestGetSettingsAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.settings.get.GetSettingsRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetSettingsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java
index 490d4ecccce92..aff070b7fb28e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexDeleteAliasesAction.java
@@ -16,22 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest;
 import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestIndexDeleteAliasesAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexPutAliasAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexPutAliasAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexPutAliasAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexPutAliasAction.java
index 441cfdb821634..564da6017eb8e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndexPutAliasAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndexPutAliasAction.java
@@ -16,16 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest;
 import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -33,8 +33,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestIndexPutAliasAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesAliasesAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesAliasesAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesAliasesAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesAliasesAction.java
index f92d36a3f4daa..b3552fac34eb8 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesAliasesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesAliasesAction.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestIndicesAliasesAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesSegmentsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesSegmentsAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesSegmentsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesSegmentsAction.java
index 740ac8142c7bb..a7b0be13e83c0 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesSegmentsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesSegmentsAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.segments.IndicesSegmentsRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestIndicesSegmentsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesShardStoresAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesShardStoresAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesShardStoresAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesShardStoresAction.java
index 1c9aadeddc47b..e268c28f5608a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesShardStoresAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesShardStoresAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.shards.IndicesShardStoresAction;
 import org.opensearch.action.admin.indices.shards.IndicesShardStoresRequest;
@@ -26,19 +26,19 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestStatus.OK;
 
 /**
  * Rest action for {@link IndicesShardStoresAction}
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsAction.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsAction.java
index 5a02f6f77ee68..52ab5a677df2c 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
 import org.opensearch.action.admin.indices.stats.CommonStatsFlags.Flag;
@@ -25,9 +25,9 @@
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -41,7 +41,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestIndicesStatsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestOpenIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestOpenIndexAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestOpenIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestOpenIndexAction.java
index 577fd534b13e7..a4d90d750beba 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestOpenIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestOpenIndexAction.java
@@ -17,23 +17,23 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.open.OpenIndexRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestOpenIndexAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComponentTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComponentTemplateAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComponentTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComponentTemplateAction.java
index cb7b5c7987a28..3773a17d6194a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComponentTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComponentTemplateAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.put.PutComponentTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.ComponentTemplate;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestPutComponentTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java
index 003967ddd8de6..3b55f5e1e0e5b 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutComposableIndexTemplateAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.put.PutComposableIndexTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.ComposableIndexTemplate;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestPutComposableIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateAction.java
index b7088db2c69aa..0a5d7e2820f16 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateAction.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.put.PutIndexTemplateRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -36,8 +36,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestPutIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutMappingAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutMappingAction.java
index ce91e43002ea9..e5dfe40c37ad1 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestPutMappingAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest;
 import org.elasticsearch.action.support.IndicesOptions;
@@ -26,9 +26,9 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -38,8 +38,8 @@
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.putMappingRequest;
 import static org.elasticsearch.index.mapper.MapperService.isMappingSourceTyped;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestPutMappingAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutMappingAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRecoveryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRecoveryAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRecoveryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestRecoveryAction.java
index 6f2941889fcce..e7a8d43211fa0 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRecoveryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRecoveryAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.recovery.RecoveryRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * REST handler to report on index recoveries.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRefreshAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRefreshAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRefreshAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestRefreshAction.java
index b1f04d64bb8cf..ad454c4eae1a7 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRefreshAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRefreshAction.java
@@ -17,25 +17,25 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.refresh.RefreshRequest;
 import org.opensearch.action.admin.indices.refresh.RefreshResponse;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestRefreshAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java
index c94e062851b8f..ed889cd76f7fe 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.LogManager;
@@ -28,17 +28,17 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Booleans;
 import org.elasticsearch.common.logging.DeprecationLogger;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public abstract class RestResizeHandler extends BaseRestHandler {
     private static final Logger logger = LogManager.getLogger(RestResizeHandler.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResolveIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResolveIndexAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResolveIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestResolveIndexAction.java
index 9b326f3228f22..61c9256960feb 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResolveIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResolveIndexAction.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.resolve.ResolveIndexAction;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRolloverIndexAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRolloverIndexAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRolloverIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestRolloverIndexAction.java
index aac3f3f182636..75cfb96a707e0 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestRolloverIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestRolloverIndexAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.rollover.RolloverRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.logging.DeprecationLogger;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestRolloverIndexAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java
index cc3b2de2f870b..c54e494b3b822 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateIndexTemplateAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.post.SimulateIndexTemplateAction;
 import org.opensearch.action.admin.indices.template.post.SimulateIndexTemplateRequest;
 import org.opensearch.action.admin.indices.template.put.PutComposableIndexTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.ComposableIndexTemplate;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestSimulateIndexTemplateAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateTemplateAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateTemplateAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateTemplateAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateTemplateAction.java
index 50dc7339e106e..93408fc95fdee 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSimulateTemplateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSimulateTemplateAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.template.post.SimulateTemplateAction;
 import org.opensearch.action.admin.indices.template.put.PutComposableIndexTemplateAction;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.ComposableIndexTemplate;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestSimulateTemplateAction extends BaseRestHandler {
     @Override
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSyncedFlushAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSyncedFlushAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSyncedFlushAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestSyncedFlushAction.java
index c351765d3bcdb..b61fd0ba59915 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestSyncedFlushAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestSyncedFlushAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.flush.SyncedFlushRequest;
 import org.opensearch.action.admin.indices.flush.SyncedFlushResponse;
@@ -25,19 +25,19 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestBuilderListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestSyncedFlushAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpdateSettingsAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpdateSettingsAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpdateSettingsAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpdateSettingsAction.java
index e074b3219e3cc..403ac1a965e39 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpdateSettingsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpdateSettingsAction.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest;
 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.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -35,7 +35,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.client.Requests.updateSettingsRequest;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestUpdateSettingsAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeAction.java
index e98ba81587fdc..1fca33e2fe72e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.upgrade.post.UpgradeRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestUpgradeAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeStatusAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeStatusAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeStatusAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeStatusAction.java
index 3ad8d289a9dd6..efba11208f6ab 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeStatusAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestUpgradeStatusAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.upgrade.get.UpgradeStatusRequest;
 import org.elasticsearch.action.support.IndicesOptions;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestUpgradeStatusAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestValidateQueryAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryAction.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/RestValidateQueryAction.java
index e0a1541fc4c95..7a143a31ad09f 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestValidateQueryAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.validate.query.QueryExplanation;
 import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequest;
@@ -28,21 +28,21 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestValidateQueryAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestValidateQueryAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/package-info.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/package-info.java
similarity index 81%
rename from server/src/main/java/org/elasticsearch/rest/action/admin/indices/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/admin/indices/package-info.java
index 3e103b4f6cb82..f40497872588a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/package-info.java
@@ -18,7 +18,7 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s for administrative actions that can be taken on indexes like creation, deletion, setting up
+ * {@link org.opensearch.rest.RestHandler}s for administrative actions that can be taken on indexes like creation, deletion, setting up
  * aliases, and changing mapping.
  */
-package org.elasticsearch.rest.action.admin.indices;
\ No newline at end of file
+package org.opensearch.rest.action.admin.indices;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/AbstractCatAction.java b/server/src/main/java/org/opensearch/rest/action/cat/AbstractCatAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/AbstractCatAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/AbstractCatAction.java
index 2f1ed2b499816..719b94dbc2a33 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/AbstractCatAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/AbstractCatAction.java
@@ -16,17 +16,17 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.io.Streams;
 import org.elasticsearch.common.io.UTF8StreamWriter;
 import org.elasticsearch.common.io.stream.BytesStream;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -34,8 +34,8 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import static org.elasticsearch.rest.action.cat.RestTable.buildHelpWidths;
-import static org.elasticsearch.rest.action.cat.RestTable.pad;
+import static org.opensearch.rest.action.cat.RestTable.buildHelpWidths;
+import static org.opensearch.rest.action.cat.RestTable.pad;
 
 public abstract class AbstractCatAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestAliasAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestAliasAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestAliasAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestAliasAction.java
index 7b071acb846f1..c4f7e4451eac3 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestAliasAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestAliasAction.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
 import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest;
@@ -26,15 +26,15 @@
 import org.elasticsearch.cluster.metadata.AliasMetadata;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.Table;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestAliasAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestAllocationAction.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestAllocationAction.java
index ae9374395ead0..48afa623bd9e1 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestAllocationAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import com.carrotsearch.hppc.ObjectIntScatterMap;
 import org.opensearch.action.admin.cluster.node.stats.NodeStats;
@@ -32,16 +32,16 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.unit.ByteSizeValue;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 
 public class RestAllocationAction extends AbstractCatAction {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCatAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestCatAction.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestCatAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestCatAction.java
index c545a1bd2f384..cc9bf45ff0fe6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCatAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestCatAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestCatAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCatRecoveryAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestCatRecoveryAction.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestCatRecoveryAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestCatRecoveryAction.java
index a7648ed5a2666..0b3b3b89cc0d8 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCatRecoveryAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestCatRecoveryAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.apache.lucene.util.CollectionUtil;
 import org.opensearch.action.admin.indices.recovery.RecoveryRequest;
@@ -31,9 +31,9 @@
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.xcontent.XContentOpenSearchExtension;
 import org.elasticsearch.indices.recovery.RecoveryState;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.Comparator;
 import java.util.List;
@@ -41,7 +41,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * RestRecoveryAction provides information about the status of replica recovery
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCountAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestCountAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestCountAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestCountAction.java
index 6a988faf3444a..3c004ceae7518 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestCountAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestCountAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.apache.lucene.search.TotalHits;
 import org.elasticsearch.OpenSearchException;
@@ -27,10 +27,10 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 
 import java.io.IOException;
@@ -38,7 +38,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestCountAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestFielddataAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestFielddataAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestFielddataAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestFielddataAction.java
index 0545b45f85577..01c94fe75fe45 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestFielddataAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestFielddataAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import com.carrotsearch.hppc.cursors.ObjectLongCursor;
 import org.opensearch.action.admin.cluster.node.stats.NodeStats;
@@ -26,15 +26,15 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.unit.ByteSizeValue;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Cat API class to display information about the size of fielddata fields per node
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestHealthAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestHealthAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java
index 768790b4b971c..0c65d43f68045 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestHealthAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.health.ClusterHealthRequest;
 import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Table;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 import java.util.Locale;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestHealthAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
similarity index 99%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
index babc33a78fbaf..eda77d7014b1a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.ActionResponse;
@@ -43,9 +43,9 @@
 import org.elasticsearch.common.time.DateFormatter;
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.time.Instant;
 import java.time.ZoneOffset;
@@ -64,7 +64,7 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.action.support.master.MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestIndicesAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestMasterAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestMasterAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestMasterAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestMasterAction.java
index 73a0a6793581c..0eba5375c8334 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestMasterAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestMasterAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
 import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
@@ -25,14 +25,14 @@
 import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.common.Table;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestMasterAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodeAttrsAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestNodeAttrsAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestNodeAttrsAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestNodeAttrsAction.java
index f10c65368200e..5a91a83c296b6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodeAttrsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestNodeAttrsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.node.info.NodeInfo;
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
@@ -30,16 +30,16 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.monitor.process.ProcessInfo;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 import java.util.Map;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodeAttrsAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestNodesAction.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestNodesAction.java
index c930e4f4039bb..faf03301e2081 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestNodesAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.node.info.NodeInfo;
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
@@ -55,10 +55,10 @@
 import org.elasticsearch.monitor.os.OsStats;
 import org.elasticsearch.monitor.process.ProcessInfo;
 import org.elasticsearch.monitor.process.ProcessStats;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.script.ScriptStats;
 import org.elasticsearch.search.suggest.completion.CompletionStats;
 
@@ -67,7 +67,7 @@
 import java.util.stream.Collectors;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestNodesAction extends AbstractCatAction {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestNodesAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestPendingClusterTasksAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestPendingClusterTasksAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestPendingClusterTasksAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestPendingClusterTasksAction.java
index 9040efa1bf723..00f7fadc0c07a 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestPendingClusterTasksAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestPendingClusterTasksAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksRequest;
 import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksResponse;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.service.PendingClusterTask;
 import org.elasticsearch.common.Table;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestPendingClusterTasksAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestPluginsAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestPluginsAction.java
index c504340d68cce..879c88949667f 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestPluginsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.node.info.NodeInfo;
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
@@ -30,15 +30,15 @@
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.plugins.PluginInfo;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestPluginsAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestRepositoriesAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestRepositoriesAction.java
similarity index 93%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestRepositoriesAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestRepositoriesAction.java
index ec51eb0d9b883..327dc5086e141 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestRepositoriesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestRepositoriesAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest;
 import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.metadata.RepositoryMetadata;
 import org.elasticsearch.common.Table;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Cat API class to display information about snapshot repositories
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestSegmentsAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestSegmentsAction.java
similarity index 96%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestSegmentsAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestSegmentsAction.java
index fb246ee6468d8..301126358e110 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestSegmentsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestSegmentsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
 import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
@@ -31,17 +31,17 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.index.engine.Segment;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 import java.util.Map;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestSegmentsAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestShardsAction.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestShardsAction.java
index b81ebe8d9b2e8..86b5e95ed96a4 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestShardsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
 import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
@@ -45,10 +45,10 @@
 import org.elasticsearch.index.shard.DocsStats;
 import org.elasticsearch.index.store.StoreStats;
 import org.elasticsearch.index.warmer.WarmerStats;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.search.suggest.completion.CompletionStats;
 
 import java.time.Instant;
@@ -58,7 +58,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestShardsAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestSnapshotAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestSnapshotAction.java
similarity index 96%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestSnapshotAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestSnapshotAction.java
index 746135bb03fb1..6483d04d573a3 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestSnapshotAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestSnapshotAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 
 import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest;
@@ -26,9 +26,9 @@
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.time.DateFormatter;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.snapshots.SnapshotInfo;
 import org.elasticsearch.snapshots.SnapshotState;
 
@@ -39,7 +39,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 /**
  * Cat API class to display information about snapshots
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTable.java b/server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestTable.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
index 00e56f3773cca..e37d9bc1eaf11 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTable.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.common.Booleans;
 import org.elasticsearch.common.Strings;
@@ -31,11 +31,11 @@
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTasksAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestTasksAction.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestTasksAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestTasksAction.java
index a384ce4d07033..6d30fea3469f7 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTasksAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestTasksAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest;
 import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
@@ -29,9 +29,9 @@
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.time.DateFormatter;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.tasks.TaskInfo;
 
@@ -46,8 +46,8 @@
 import java.util.function.Supplier;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.action.admin.cluster.RestListTasksAction.generateListTasksRequest;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.action.admin.cluster.RestListTasksAction.generateListTasksRequest;
 
 public class RestTasksAction extends AbstractCatAction {
     private final Supplier nodesInCluster;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTemplatesAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestTemplatesAction.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestTemplatesAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestTemplatesAction.java
index ced72e81d091a..ff9b0c67eae7e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestTemplatesAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestTemplatesAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
 import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
@@ -28,16 +28,16 @@
 import org.elasticsearch.cluster.metadata.Metadata;
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.regex.Regex;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 
 import java.util.List;
 import java.util.Map;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestTemplatesAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestThreadPoolAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestThreadPoolAction.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/RestThreadPoolAction.java
rename to server/src/main/java/org/opensearch/rest/action/cat/RestThreadPoolAction.java
index 834d34b8aab58..2df668d8b615b 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestThreadPoolAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/RestThreadPoolAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.cluster.node.info.NodeInfo;
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
@@ -33,10 +33,10 @@
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.regex.Regex;
 import org.elasticsearch.monitor.process.ProcessInfo;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActionListener;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActionListener;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.threadpool.ThreadPoolInfo;
 import org.elasticsearch.threadpool.ThreadPoolStats;
@@ -51,7 +51,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestThreadPoolAction extends AbstractCatAction {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/package-info.java b/server/src/main/java/org/opensearch/rest/action/cat/package-info.java
similarity index 85%
rename from server/src/main/java/org/elasticsearch/rest/action/cat/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/cat/package-info.java
index 334f717016c40..ba1d121dcfa9e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/cat/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/cat/package-info.java
@@ -18,6 +18,6 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s for actions that spit out tables of results.
+ * {@link org.opensearch.rest.RestHandler}s for actions that spit out tables of results.
  */
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestBulkAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestBulkAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestBulkAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestBulkAction.java
index ed1ee21890a30..b75d5ef42ce04 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestBulkAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestBulkAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.opensearch.action.DocWriteRequest;
 import org.elasticsearch.action.bulk.BulkRequest;
@@ -28,10 +28,10 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -39,8 +39,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 /**
  * 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestDeleteAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestDeleteAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java
index c609bb6c68b34..899bff14ed5f9 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestDeleteAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java
@@ -17,24 +17,24 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.action.delete.DeleteRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.VersionType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeleteAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestGetAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestGetAction.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestGetAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestGetAction.java
index ea8271c702dd8..bdb5cd655ad07 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestGetAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestGetAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.action.get.GetRequest;
 import org.elasticsearch.action.get.GetResponse;
@@ -25,11 +25,11 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.VersionType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -37,10 +37,10 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
 
 public class RestGetAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestGetSourceAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestGetSourceAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestGetSourceAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestGetSourceAction.java
index c66bbe8b503c6..7088e03a88e61 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestGetSourceAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestGetSourceAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.ResourceNotFoundException;
 import org.opensearch.action.ActionRequestValidationException;
@@ -28,12 +28,12 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestResponseListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestResponseListener;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -42,9 +42,9 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.HEAD;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.HEAD;
+import static org.opensearch.rest.RestStatus.OK;
 
 /**
  * The REST handler for get source and head source APIs.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java
index 1a66dc19086bf..0e744837b6808 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.Version;
 import org.opensearch.action.DocWriteRequest;
@@ -28,10 +28,10 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.VersionType;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
@@ -40,8 +40,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 public class RestIndexAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestMultiGetAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestMultiGetAction.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestMultiGetAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestMultiGetAction.java
index f7e88cf0084a6..f2b1bc248f693 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestMultiGetAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestMultiGetAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.action.get.MultiGetRequest;
 import org.elasticsearch.client.node.NodeClient;
@@ -25,9 +25,9 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -35,8 +35,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestMultiGetAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestMultiGetAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestMultiTermVectorsAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestMultiTermVectorsAction.java
index febba260c654f..3e9ee5c859199 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestMultiTermVectorsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.action.termvectors.MultiTermVectorsRequest;
 import org.elasticsearch.action.termvectors.TermVectorsRequest;
@@ -25,17 +25,17 @@
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestMultiTermVectorsAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestTermVectorsAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestTermVectorsAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestTermVectorsAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestTermVectorsAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestTermVectorsAction.java
index 7725583f79c19..029d6b38503a5 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestTermVectorsAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestTermVectorsAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.action.termvectors.TermVectorsRequest;
 import org.elasticsearch.client.node.NodeClient;
@@ -26,10 +26,10 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.index.VersionType;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.HashSet;
@@ -38,8 +38,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 /**
  * This class parses the json request and translates it into a
diff --git a/server/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestUpdateAction.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java
rename to server/src/main/java/org/opensearch/rest/action/document/RestUpdateAction.java
index 257518f8dc034..e49e075055919 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/document/RestUpdateAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.opensearch.action.ActionRequestValidationException;
 import org.opensearch.action.DocWriteRequest;
@@ -27,10 +27,10 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.VersionType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -38,7 +38,7 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestUpdateAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger =
diff --git a/server/src/main/java/org/opensearch/rest/action/document/package-info.java b/server/src/main/java/org/opensearch/rest/action/document/package-info.java
new file mode 100644
index 0000000000000..8b7d96cfae673
--- /dev/null
+++ b/server/src/main/java/org/opensearch/rest/action/document/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * {@link org.opensearch.rest.RestHandler}s for actions that can be taken on documents like index, update, get, and delete.
+ */
+package org.opensearch.rest.action.document;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestDeletePipelineAction.java b/server/src/main/java/org/opensearch/rest/action/ingest/RestDeletePipelineAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/ingest/RestDeletePipelineAction.java
rename to server/src/main/java/org/opensearch/rest/action/ingest/RestDeletePipelineAction.java
index 2956811e26fed..bd95f9b5705e8 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestDeletePipelineAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/ingest/RestDeletePipelineAction.java
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.ingest;
+package org.opensearch.rest.action.ingest;
 
 import org.elasticsearch.action.ingest.DeletePipelineRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestDeletePipelineAction extends BaseRestHandler {
     @Override
diff --git a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestGetPipelineAction.java b/server/src/main/java/org/opensearch/rest/action/ingest/RestGetPipelineAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/ingest/RestGetPipelineAction.java
rename to server/src/main/java/org/opensearch/rest/action/ingest/RestGetPipelineAction.java
index 1e4e016027b8e..028834a5e786f 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestGetPipelineAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/ingest/RestGetPipelineAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.ingest;
+package org.opensearch.rest.action.ingest;
 
 import org.elasticsearch.action.ingest.GetPipelineRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.GET;
 
 public class RestGetPipelineAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestPutPipelineAction.java b/server/src/main/java/org/opensearch/rest/action/ingest/RestPutPipelineAction.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/action/ingest/RestPutPipelineAction.java
rename to server/src/main/java/org/opensearch/rest/action/ingest/RestPutPipelineAction.java
index b1fb8086e0653..baddd2491387e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestPutPipelineAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/ingest/RestPutPipelineAction.java
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.ingest;
+package org.opensearch.rest.action.ingest;
 
 import org.elasticsearch.action.ingest.PutPipelineRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.collect.Tuple;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Collections.singletonList;
-import static org.elasticsearch.rest.RestRequest.Method.PUT;
+import static org.opensearch.rest.RestRequest.Method.PUT;
 
 
 public class RestPutPipelineAction extends BaseRestHandler {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestSimulatePipelineAction.java b/server/src/main/java/org/opensearch/rest/action/ingest/RestSimulatePipelineAction.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/rest/action/ingest/RestSimulatePipelineAction.java
rename to server/src/main/java/org/opensearch/rest/action/ingest/RestSimulatePipelineAction.java
index 1ac0bdd6fcd5a..62e731882a338 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/ingest/RestSimulatePipelineAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/ingest/RestSimulatePipelineAction.java
@@ -17,24 +17,24 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.ingest;
+package org.opensearch.rest.action.ingest;
 
 import org.elasticsearch.action.ingest.SimulatePipelineRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.collect.Tuple;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestSimulatePipelineAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/ingest/package-info.java b/server/src/main/java/org/opensearch/rest/action/ingest/package-info.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/rest/action/ingest/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/ingest/package-info.java
index 4bf1cfd404bd3..f85c0821c3a15 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/ingest/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/ingest/package-info.java
@@ -18,6 +18,6 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s that manage ingest pipelines.
+ * {@link org.opensearch.rest.RestHandler}s that manage ingest pipelines.
  */
-package org.elasticsearch.rest.action.ingest;
+package org.opensearch.rest.action.ingest;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/package-info.java b/server/src/main/java/org/opensearch/rest/action/package-info.java
similarity index 83%
rename from server/src/main/java/org/elasticsearch/rest/action/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/package-info.java
index d6f6b2886576f..a88f8fd3635b6 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/package-info.java
@@ -18,7 +18,7 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s that translate requests from REST into internal requests and start them then wait for them to
+ * {@link org.opensearch.rest.RestHandler}s that translate requests from REST into internal requests and start them then wait for them to
  * complete and then translate them back into REST. And some classes to support them.
  */
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestClearScrollAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestClearScrollAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestClearScrollAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestClearScrollAction.java
index 90e8f95227ceb..3f831ce6d48ab 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestClearScrollAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestClearScrollAction.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.action.search.ClearScrollRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.DELETE;
+import static org.opensearch.rest.RestRequest.Method.DELETE;
 
 public class RestClearScrollAction extends BaseRestHandler {
 
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestCountAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestCountAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestCountAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestCountAction.java
index 6f4f6c07b53f7..2494c2b6004fc 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestCountAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestCountAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.action.search.SearchRequest;
 import org.elasticsearch.action.search.SearchResponse;
@@ -27,12 +27,12 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestBuilderListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestBuilderListener;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 
 import java.io.IOException;
@@ -40,9 +40,9 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
-import static org.elasticsearch.rest.action.RestActions.buildBroadcastShardsHeader;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.action.RestActions.buildBroadcastShardsHeader;
 import static org.elasticsearch.search.internal.SearchContext.DEFAULT_TERMINATE_AFTER;
 
 public class RestCountAction extends BaseRestHandler {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestExplainAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestExplainAction.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestExplainAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestExplainAction.java
index ca5b16253f861..d8a8bc7a73411 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestExplainAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestExplainAction.java
@@ -17,17 +17,17 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.action.explain.ExplainRequest;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Strings;
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
 
 import java.io.IOException;
@@ -35,8 +35,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 /**
  * Rest action for computing a score explanation for specific documents.
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestMultiSearchAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestMultiSearchAction.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestMultiSearchAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestMultiSearchAction.java
index 4cea7a392c254..c90a97ef03617 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestMultiSearchAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestMultiSearchAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.action.search.MultiSearchAction;
 import org.elasticsearch.action.search.MultiSearchRequest;
@@ -34,10 +34,10 @@
 import org.elasticsearch.common.xcontent.XContent;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestCancellableNodeClient;
-import org.elasticsearch.rest.action.RestToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestCancellableNodeClient;
+import org.opensearch.rest.action.RestToXContentListener;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 
 import java.io.IOException;
@@ -49,8 +49,8 @@
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestMultiSearchAction extends BaseRestHandler {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestMultiSearchAction.class);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java
index 45ea3046da758..3f88907ef9e8e 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.ExceptionsHelper;
 import org.opensearch.action.ActionRequestValidationException;
@@ -32,11 +32,11 @@
 import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestActions;
-import org.elasticsearch.rest.action.RestCancellableNodeClient;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestActions;
+import org.opensearch.rest.action.RestCancellableNodeClient;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 import org.elasticsearch.search.Scroll;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.elasticsearch.search.fetch.StoredFieldsContext;
@@ -58,8 +58,8 @@
 import static java.util.Collections.unmodifiableList;
 import static org.opensearch.action.ValidateActions.addValidationError;
 import static org.elasticsearch.common.unit.TimeValue.parseTimeValue;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 import static org.elasticsearch.search.suggest.SuggestBuilders.termSuggestion;
 
 public class RestSearchAction extends BaseRestHandler {
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestSearchScrollAction.java b/server/src/main/java/org/opensearch/rest/action/search/RestSearchScrollAction.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/rest/action/search/RestSearchScrollAction.java
rename to server/src/main/java/org/opensearch/rest/action/search/RestSearchScrollAction.java
index 6060574a7dbc7..1bad96241f33c 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/RestSearchScrollAction.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/RestSearchScrollAction.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.action.search.SearchScrollRequest;
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.RestStatusToXContentListener;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.RestStatusToXContentListener;
 import org.elasticsearch.search.Scroll;
 
 import java.io.IOException;
@@ -34,8 +34,8 @@
 import static java.util.Arrays.asList;
 import static java.util.Collections.unmodifiableList;
 import static org.elasticsearch.common.unit.TimeValue.parseTimeValue;
-import static org.elasticsearch.rest.RestRequest.Method.GET;
-import static org.elasticsearch.rest.RestRequest.Method.POST;
+import static org.opensearch.rest.RestRequest.Method.GET;
+import static org.opensearch.rest.RestRequest.Method.POST;
 
 public class RestSearchScrollAction extends BaseRestHandler {
     private static final Set RESPONSE_PARAMS = Collections.singleton(RestSearchAction.TOTAL_HITS_AS_INT_PARAM);
diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/package-info.java b/server/src/main/java/org/opensearch/rest/action/search/package-info.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/rest/action/search/package-info.java
rename to server/src/main/java/org/opensearch/rest/action/search/package-info.java
index 6758eec2f768e..c484a6982cd21 100644
--- a/server/src/main/java/org/elasticsearch/rest/action/search/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/action/search/package-info.java
@@ -18,6 +18,6 @@
  */
 
 /**
- * {@link org.elasticsearch.rest.RestHandler}s for search actions like search, scroll, and suggest.
+ * {@link org.opensearch.rest.RestHandler}s for search actions like search, scroll, and suggest.
  */
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
diff --git a/server/src/main/java/org/elasticsearch/rest/package-info.java b/server/src/main/java/org/opensearch/rest/package-info.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/rest/package-info.java
rename to server/src/main/java/org/opensearch/rest/package-info.java
index 7e1f27d6df6db..8afd2cfc43116 100644
--- a/server/src/main/java/org/elasticsearch/rest/package-info.java
+++ b/server/src/main/java/org/opensearch/rest/package-info.java
@@ -18,6 +18,6 @@
  */
 
 /**
- * Exposes Elasticsearch functionality over RESTful HTTP.
+ * Exposes OpenSearch functionality over RESTful HTTP.
  */
-package org.elasticsearch.rest;
+package org.opensearch.rest;
diff --git a/server/src/test/java/org/elasticsearch/action/ActionModuleTests.java b/server/src/test/java/org/elasticsearch/action/ActionModuleTests.java
index eb72a9e09a19d..552822c83c56c 100644
--- a/server/src/test/java/org/elasticsearch/action/ActionModuleTests.java
+++ b/server/src/test/java/org/elasticsearch/action/ActionModuleTests.java
@@ -34,12 +34,12 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.plugins.ActionPlugin;
 import org.elasticsearch.plugins.ActionPlugin.ActionHandler;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestController;
-import org.elasticsearch.rest.RestHandler;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
-import org.elasticsearch.rest.action.RestMainAction;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestController;
+import org.opensearch.rest.RestHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
+import org.opensearch.rest.action.RestMainAction;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.tasks.TaskManager;
 import org.elasticsearch.test.ESTestCase;
diff --git a/server/src/test/java/org/elasticsearch/action/ShardOperationFailedExceptionTests.java b/server/src/test/java/org/elasticsearch/action/ShardOperationFailedExceptionTests.java
index 8fdf74a2cf062..daaa152da1ec8 100644
--- a/server/src/test/java/org/elasticsearch/action/ShardOperationFailedExceptionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/ShardOperationFailedExceptionTests.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.io.stream.StreamOutput;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.opensearch.action.ShardOperationFailedException;
 
diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponsesTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponsesTests.java
index 3b36f034d65c4..afc850cd39a5e 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponsesTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponsesTests.java
@@ -33,7 +33,7 @@
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.AbstractSerializingTestCase;
 import org.hamcrest.Matchers;
 import org.opensearch.action.admin.cluster.health.ClusterHealthRequest;
diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
index ec57bbe2f0d3b..0f9ebcd377012 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
@@ -34,7 +34,7 @@
 
 /**
  * Granular tests for the {@link NodesInfoRequest} class. Higher-level tests
- * can be found in {@link org.elasticsearch.rest.action.admin.cluster.RestNodesInfoActionTests}.
+ * can be found in {@link org.opensearch.rest.action.admin.cluster.RestNodesInfoActionTests}.
  */
 public class NodesInfoRequestTests extends ESTestCase {
 
diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestTests.java
index 4602ad509dc20..1d94f3242eb70 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestTests.java
@@ -38,8 +38,8 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.admin.cluster.RestClusterRerouteAction;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.admin.cluster.RestClusterRerouteAction;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest;
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushUnitTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushUnitTests.java
index 5ab4573e58f6d..7aca09b517bfe 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushUnitTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushUnitTests.java
@@ -31,7 +31,7 @@
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.indices.flush.ShardsSyncedFlushResult;
 import org.elasticsearch.indices.flush.SyncedFlushService;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 
 import java.io.IOException;
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/RestForceMergeActionTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/RestForceMergeActionTests.java
index 102dcbcfa11fc..b6ee0bbfde0cd 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/RestForceMergeActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/RestForceMergeActionTests.java
@@ -24,8 +24,8 @@
 import org.elasticsearch.common.xcontent.NamedXContentRegistry;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.admin.indices.RestForceMergeAction;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.admin.indices.RestForceMergeAction;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexResponseTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexResponseTests.java
index 43f71fd0382ba..23f3a33c465c1 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexResponseTests.java
@@ -31,7 +31,7 @@
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.index.RandomCreateIndexGenerator;
-import org.elasticsearch.rest.BaseRestHandler;
+import org.opensearch.rest.BaseRestHandler;
 import org.elasticsearch.test.AbstractSerializingTestCase;
 import org.opensearch.action.admin.indices.get.GetIndexResponse;
 
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsResponseTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsResponseTests.java
index 9c9b6637cf37c..933973dc90ce6 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsResponseTests.java
@@ -37,7 +37,7 @@
 import java.util.Map;
 import java.util.function.Predicate;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.hamcrest.CoreMatchers.equalTo;
 
 public class GetFieldMappingsResponseTests extends AbstractSerializingTestCase {
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsResponseTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsResponseTests.java
index ecd16a1b46962..1165cb8a89f04 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsResponseTests.java
@@ -27,7 +27,7 @@
 import org.elasticsearch.common.xcontent.ToXContent.Params;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.index.mapper.MapperService;
-import org.elasticsearch.rest.BaseRestHandler;
+import org.opensearch.rest.BaseRestHandler;
 import org.elasticsearch.test.AbstractSerializingTestCase;
 import org.elasticsearch.test.EqualsHashCodeTestUtils;
 import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse;
diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesResponseTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesResponseTests.java
index 9c8c409c33313..77dda4a036994 100644
--- a/server/src/test/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesResponseTests.java
@@ -37,7 +37,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.hamcrest.Matchers.equalTo;
 
 public class GetIndexTemplatesResponseTests extends AbstractXContentTestCase {
diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestParserTests.java b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestParserTests.java
index 75d52d3863bc2..ba786f98f0589 100644
--- a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestParserTests.java
+++ b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestParserTests.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.action.index.IndexRequest;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.document.RestBulkAction;
+import org.opensearch.rest.action.document.RestBulkAction;
 import org.elasticsearch.test.ESTestCase;
 import org.hamcrest.Matchers;
 
diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
index 67c6f6a71995f..1c3df8f9374c2 100644
--- a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
+++ b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
@@ -34,7 +34,7 @@
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.document.RestBulkAction;
+import org.opensearch.rest.action.document.RestBulkAction;
 import org.elasticsearch.script.Script;
 import org.elasticsearch.test.ESTestCase;
 
@@ -56,7 +56,7 @@
 
 public class BulkRequestTests extends ESTestCase {
     public void testSimpleBulk1() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk.json");
         BulkRequest bulkRequest = new BulkRequest();
         bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON);
         assertThat(bulkRequest.numberOfActions(), equalTo(3));
@@ -81,21 +81,21 @@ public void testSimpleBulkWithCarriageReturn() throws Exception {
     }
 
     public void testSimpleBulk2() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk2.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk2.json");
         BulkRequest bulkRequest = new BulkRequest();
         bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON);
         assertThat(bulkRequest.numberOfActions(), equalTo(3));
     }
 
     public void testSimpleBulk3() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk3.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk3.json");
         BulkRequest bulkRequest = new BulkRequest();
         bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON);
         assertThat(bulkRequest.numberOfActions(), equalTo(3));
     }
 
     public void testSimpleBulk4() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk4.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk4.json");
         BulkRequest bulkRequest = new BulkRequest();
         bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON);
         assertThat(bulkRequest.numberOfActions(), equalTo(4));
@@ -119,13 +119,13 @@ public void testSimpleBulk4() throws Exception {
     }
 
     public void testBulkAllowExplicitIndex() throws Exception {
-        String bulkAction1 = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk.json");
+        String bulkAction1 = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk.json");
         Exception ex = expectThrows(Exception.class,
             () -> new BulkRequest().add(
                 new BytesArray(bulkAction1.getBytes(StandardCharsets.UTF_8)), null, null, false, XContentType.JSON));
         assertEquals("explicit index in bulk is not allowed", ex.getMessage());
 
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk5.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk5.json");
         new BulkRequest().add(new BytesArray(bulkAction.getBytes(StandardCharsets.UTF_8)), "test", null, false, XContentType.JSON);
         //This test's JSON contains outdated references to types
         assertWarnings(RestBulkAction.TYPES_DEPRECATION_MESSAGE);
@@ -145,7 +145,7 @@ public void testBulkAddIterable() {
     }
 
     public void testSimpleBulk6() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk6.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk6.json");
         BulkRequest bulkRequest = new BulkRequest();
         ParsingException exc = expectThrows(ParsingException.class,
             () -> bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON));
@@ -155,7 +155,7 @@ public void testSimpleBulk6() throws Exception {
     }
 
     public void testSimpleBulk7() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk7.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk7.json");
         BulkRequest bulkRequest = new BulkRequest();
         IllegalArgumentException exc = expectThrows(IllegalArgumentException.class,
             () -> bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON));
@@ -166,7 +166,7 @@ public void testSimpleBulk7() throws Exception {
     }
 
     public void testSimpleBulk8() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk8.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk8.json");
         BulkRequest bulkRequest = new BulkRequest();
         IllegalArgumentException exc = expectThrows(IllegalArgumentException.class,
             () -> bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON));
@@ -176,7 +176,7 @@ public void testSimpleBulk8() throws Exception {
     }
 
     public void testSimpleBulk9() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk9.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk9.json");
         BulkRequest bulkRequest = new BulkRequest();
         IllegalArgumentException exc = expectThrows(IllegalArgumentException.class,
             () -> bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON));
@@ -185,7 +185,7 @@ public void testSimpleBulk9() throws Exception {
     }
 
     public void testSimpleBulk10() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk10.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk10.json");
         BulkRequest bulkRequest = new BulkRequest();
         bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON);
         assertThat(bulkRequest.numberOfActions(), equalTo(9));
@@ -349,7 +349,7 @@ public void testToValidateUpsertRequestAndCASInBulkRequest() throws IOException
     }
 
     public void testBulkTerminatedByNewline() throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk11.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk11.json");
         IllegalArgumentException expectThrows = expectThrows(IllegalArgumentException.class, () -> new BulkRequest()
                 .add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, XContentType.JSON));
         assertEquals("The bulk request must be terminated by a newline [\\n]", expectThrows.getMessage());
diff --git a/server/src/test/java/org/elasticsearch/action/bulk/TransportBulkActionTookTests.java b/server/src/test/java/org/elasticsearch/action/bulk/TransportBulkActionTookTests.java
index afc78b6aadadb..9da1f1c37cb93 100644
--- a/server/src/test/java/org/elasticsearch/action/bulk/TransportBulkActionTookTests.java
+++ b/server/src/test/java/org/elasticsearch/action/bulk/TransportBulkActionTookTests.java
@@ -42,7 +42,7 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.IndexNotFoundException;
-import org.elasticsearch.rest.action.document.RestBulkAction;
+import org.opensearch.rest.action.document.RestBulkAction;
 import org.elasticsearch.index.IndexingPressure;
 import org.elasticsearch.indices.SystemIndices;
 import org.elasticsearch.tasks.Task;
@@ -183,7 +183,7 @@ public void testTookWithRealClock() throws Exception {
     }
 
     private void runTestTook(boolean controlled) throws Exception {
-        String bulkAction = copyToStringFromClasspath("/org/elasticsearch/action/bulk/simple-bulk.json");
+        String bulkAction = copyToStringFromClasspath("/org/opensearch/action/bulk/simple-bulk.json");
         // translate Windows line endings (\r\n) to standard ones (\n)
         if (Constants.WINDOWS) {
             bulkAction = Strings.replace(bulkAction, "\r\n", "\n");
diff --git a/server/src/test/java/org/elasticsearch/action/bulk/TransportShardBulkActionTests.java b/server/src/test/java/org/elasticsearch/action/bulk/TransportShardBulkActionTests.java
index 56d14c3e69b66..f62b99dfbbd74 100644
--- a/server/src/test/java/org/elasticsearch/action/bulk/TransportShardBulkActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/bulk/TransportShardBulkActionTests.java
@@ -53,7 +53,7 @@
 import org.elasticsearch.index.shard.IndexShardTestCase;
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.index.translog.Translog;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.threadpool.TestThreadPool;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.threadpool.ThreadPool.Names;
diff --git a/server/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java b/server/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
index 75aa847df8cff..210bbf3fddafe 100644
--- a/server/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
+++ b/server/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
@@ -31,7 +31,7 @@
 import org.elasticsearch.index.VersionType;
 import org.elasticsearch.index.seqno.SequenceNumbers;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 
 import java.io.IOException;
diff --git a/server/src/test/java/org/elasticsearch/action/main/MainActionTests.java b/server/src/test/java/org/elasticsearch/action/main/MainActionTests.java
index ff3e2162de50a..8dd83869e398e 100644
--- a/server/src/test/java/org/elasticsearch/action/main/MainActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/main/MainActionTests.java
@@ -28,7 +28,7 @@
 import org.elasticsearch.cluster.block.ClusterBlocks;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.transport.Transport;
@@ -46,7 +46,7 @@ public class MainActionTests extends ESTestCase {
 
     public void testMainActionClusterAvailable() {
         final ClusterService clusterService = mock(ClusterService.class);
-        final ClusterName clusterName = new ClusterName("elasticsearch");
+        final ClusterName clusterName = new ClusterName("opensearch");
         final Settings settings = Settings.builder().put("node.name", "my-node").build();
         ClusterBlocks blocks;
         if (randomBoolean()) {
diff --git a/server/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java b/server/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
index 1a97435df0ecf..ba951df1f8485 100644
--- a/server/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
+++ b/server/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
@@ -35,8 +35,8 @@
 import org.elasticsearch.common.xcontent.json.JsonXContent;
 import org.elasticsearch.index.query.MatchAllQueryBuilder;
 import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.search.RestMultiSearchAction;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.search.RestMultiSearchAction;
 import org.elasticsearch.search.Scroll;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.elasticsearch.test.ESTestCase;
@@ -63,7 +63,7 @@ public class MultiSearchRequestTests extends ESTestCase {
     private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(MultiSearchRequestTests.class);
 
     public void testSimpleAdd() throws Exception {
-        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/elasticsearch/action/search/simple-msearch1.json");
+        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/opensearch/action/search/simple-msearch1.json");
         assertThat(request.requests().size(),
                 equalTo(8));
         assertThat(request.requests().get(0).indices()[0],
@@ -139,7 +139,7 @@ public void testDefaultIndicesOptions() throws IOException {
     }
 
     public void testSimpleAdd2() throws Exception {
-        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/elasticsearch/action/search/simple-msearch2.json");
+        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/opensearch/action/search/simple-msearch2.json");
         assertThat(request.requests().size(), equalTo(5));
         assertThat(request.requests().get(0).indices()[0], equalTo("test"));
         assertThat(request.requests().get(0).types().length, equalTo(0));
@@ -155,7 +155,7 @@ public void testSimpleAdd2() throws Exception {
     }
 
     public void testSimpleAdd3() throws Exception {
-        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/elasticsearch/action/search/simple-msearch3.json");
+        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/opensearch/action/search/simple-msearch3.json");
         assertThat(request.requests().size(), equalTo(4));
         assertThat(request.requests().get(0).indices()[0], equalTo("test0"));
         assertThat(request.requests().get(0).indices()[1], equalTo("test1"));
@@ -172,7 +172,7 @@ public void testSimpleAdd3() throws Exception {
     }
 
     public void testSimpleAdd4() throws Exception {
-        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/elasticsearch/action/search/simple-msearch4.json");
+        MultiSearchRequest request = parseMultiSearchRequestFromFile("/org/opensearch/action/search/simple-msearch4.json");
         assertThat(request.requests().size(), equalTo(3));
         assertThat(request.requests().get(0).indices()[0], equalTo("test0"));
         assertThat(request.requests().get(0).indices()[1], equalTo("test1"));
@@ -261,7 +261,7 @@ public void testMaxConcurrentSearchRequests() {
     }
 
     public void testMsearchTerminatedByNewline() throws Exception {
-        String mserchAction = StreamsUtils.copyToStringFromClasspath("/org/elasticsearch/action/search/simple-msearch5.json");
+        String mserchAction = StreamsUtils.copyToStringFromClasspath("/org/opensearch/action/search/simple-msearch5.json");
         RestRequest restRequest = new FakeRestRequest.Builder(xContentRegistry())
                 .withContent(new BytesArray(mserchAction.getBytes(StandardCharsets.UTF_8)), XContentType.JSON).build();
         IllegalArgumentException expectThrows = expectThrows(IllegalArgumentException.class,
diff --git a/server/src/test/java/org/elasticsearch/action/search/SearchPhaseExecutionExceptionTests.java b/server/src/test/java/org/elasticsearch/action/search/SearchPhaseExecutionExceptionTests.java
index 197427a468099..0c1a49c0c3f9f 100644
--- a/server/src/test/java/org/elasticsearch/action/search/SearchPhaseExecutionExceptionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/search/SearchPhaseExecutionExceptionTests.java
@@ -34,7 +34,7 @@
 import org.elasticsearch.index.shard.IndexShardClosedException;
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.indices.InvalidIndexTemplateException;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.search.SearchShardTarget;
 import org.elasticsearch.test.ESTestCase;
 
diff --git a/server/src/test/java/org/elasticsearch/action/search/SearchResponseTests.java b/server/src/test/java/org/elasticsearch/action/search/SearchResponseTests.java
index e9a85ac0d8832..43096c063c3e7 100644
--- a/server/src/test/java/org/elasticsearch/action/search/SearchResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/search/SearchResponseTests.java
@@ -33,7 +33,7 @@
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.SearchHit;
 import org.elasticsearch.search.SearchHits;
 import org.elasticsearch.search.SearchHitsTests;
@@ -173,7 +173,7 @@ private void doFromXContentTestWithRandomFields(SearchResponse response, boolean
 
     /**
      * The "_shard/total/failures" section makes if impossible to directly compare xContent, because
-     * the failures in the parsed SearchResponse are wrapped in an extra ElasticSearchException on the client side.
+     * the failures in the parsed SearchResponse are wrapped in an extra OpenSearchException on the client side.
      * Because of this, in this special test case we compare the "top level" fields for equality
      * and the subsections xContent equivalence independently
      */
@@ -196,11 +196,11 @@ public void testFromXContentWithFailures() throws IOException {
                 assertEquals(originalFailure.shard(), parsedFailure.shard());
                 assertEquals(originalFailure.shardId(), parsedFailure.shardId());
                 String originalMsg = originalFailure.getCause().getMessage();
-                assertEquals(parsedFailure.getCause().getMessage(), "Elasticsearch exception [type=parsing_exception, reason=" +
+                assertEquals(parsedFailure.getCause().getMessage(), "OpenSearch exception [type=parsing_exception, reason=" +
                         originalMsg + "]");
                 String nestedMsg = originalFailure.getCause().getCause().getMessage();
                 assertEquals(parsedFailure.getCause().getCause().getMessage(),
-                        "Elasticsearch exception [type=illegal_argument_exception, reason=" + nestedMsg + "]");
+                        "OpenSearch exception [type=illegal_argument_exception, reason=" + nestedMsg + "]");
             }
             assertEquals(XContentParser.Token.END_OBJECT, parser.currentToken());
             assertNull(parser.nextToken());
diff --git a/server/src/test/java/org/elasticsearch/action/search/TransportSearchActionTests.java b/server/src/test/java/org/elasticsearch/action/search/TransportSearchActionTests.java
index 5bb28245fec5c..f25ae53c09921 100644
--- a/server/src/test/java/org/elasticsearch/action/search/TransportSearchActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/search/TransportSearchActionTests.java
@@ -49,7 +49,7 @@
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.index.query.TermsQueryBuilder;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.search.Scroll;
 import org.elasticsearch.search.SearchHit;
 import org.elasticsearch.search.SearchHits;
diff --git a/server/src/test/java/org/elasticsearch/action/support/DefaultShardOperationFailedExceptionTests.java b/server/src/test/java/org/elasticsearch/action/support/DefaultShardOperationFailedExceptionTests.java
index f60eaf4ebe189..4647b48937521 100644
--- a/server/src/test/java/org/elasticsearch/action/support/DefaultShardOperationFailedExceptionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/DefaultShardOperationFailedExceptionTests.java
@@ -37,7 +37,7 @@
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.Index;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 
 import java.io.EOFException;
@@ -121,7 +121,7 @@ public void testFromXContent() throws IOException {
         assertEquals(parsed.shardId(), 1);
         assertEquals(parsed.index(), "test");
         assertEquals(parsed.status(), RestStatus.INTERNAL_SERVER_ERROR);
-        assertEquals(parsed.getCause().getMessage(), "Elasticsearch exception [type=exception, reason=foo]");
+        assertEquals(parsed.getCause().getMessage(), "OpenSearch exception [type=exception, reason=foo]");
     }
 
     public void testSerialization() throws Exception {
diff --git a/server/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java b/server/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java
index b04c865e7498e..b9b4b5b91bf25 100644
--- a/server/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java
@@ -53,7 +53,7 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.index.Index;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.transport.CapturingTransport;
 import org.elasticsearch.threadpool.TestThreadPool;
diff --git a/server/src/test/java/org/elasticsearch/action/support/master/TransportMasterNodeActionTests.java b/server/src/test/java/org/elasticsearch/action/support/master/TransportMasterNodeActionTests.java
index 387e64ecaf034..dd09a27a2ec54 100644
--- a/server/src/test/java/org/elasticsearch/action/support/master/TransportMasterNodeActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/master/TransportMasterNodeActionTests.java
@@ -47,7 +47,7 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.discovery.MasterNotDiscoveredException;
 import org.elasticsearch.node.NodeClosedException;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.transport.CapturingTransport;
diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/BroadcastReplicationTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/BroadcastReplicationTests.java
index a30bc9fdc3046..a10bd1fe6c51a 100644
--- a/server/src/test/java/org/elasticsearch/action/support/replication/BroadcastReplicationTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/replication/BroadcastReplicationTests.java
@@ -47,7 +47,7 @@
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.indices.breaker.CircuitBreakerService;
 import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.threadpool.TestThreadPool;
diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/ReplicationResponseTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/ReplicationResponseTests.java
index c9a9d077cd1a2..735cc3aa02203 100644
--- a/server/src/test/java/org/elasticsearch/action/support/replication/ReplicationResponseTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/replication/ReplicationResponseTests.java
@@ -30,7 +30,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.RandomObjects;
 
diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionTests.java
index 5035eef1289c5..37701ae44d53e 100644
--- a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionTests.java
@@ -72,7 +72,7 @@
 import org.elasticsearch.indices.IndicesService;
 import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
 import org.elasticsearch.indices.cluster.ClusterStateChanges;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.transport.CapturingTransport;
 import org.elasticsearch.test.transport.MockTransportService;
diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java
index 6ccfbb5e12c2f..641ab055944af 100644
--- a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java
@@ -51,7 +51,7 @@
 import org.elasticsearch.index.shard.IndexShardTestCase;
 import org.elasticsearch.index.shard.ShardId;
 import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.transport.MockTransport;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.transport.TransportException;
diff --git a/server/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java b/server/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java
index 1efbef3f9f404..d25d3b45ac3f5 100644
--- a/server/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java
+++ b/server/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java
@@ -43,7 +43,7 @@
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.transport.CapturingTransport;
 import org.elasticsearch.threadpool.TestThreadPool;
diff --git a/server/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java b/server/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
index 9ae9201a2aa51..4ab7d74379dde 100644
--- a/server/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
+++ b/server/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
@@ -44,7 +44,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.action.document.RestTermVectorsAction;
+import org.opensearch.rest.action.document.RestTermVectorsAction;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.StreamsUtils;
 import org.hamcrest.Matchers;
@@ -254,13 +254,13 @@ public void testStreamRequest() throws IOException {
     }
 
     public void testMultiParser() throws Exception {
-        byte[] bytes = StreamsUtils.copyToBytesFromClasspath("/org/elasticsearch/action/termvectors/multiRequest1.json");
+        byte[] bytes = StreamsUtils.copyToBytesFromClasspath("/org/opensearch/action/termvectors/multiRequest1.json");
         XContentParser data = createParser(JsonXContent.jsonXContent, bytes);
         MultiTermVectorsRequest request = new MultiTermVectorsRequest();
         request.add(new TermVectorsRequest(), data);
         checkParsedParameters(request);
 
-        bytes = StreamsUtils.copyToBytesFromClasspath("/org/elasticsearch/action/termvectors/multiRequest2.json");
+        bytes = StreamsUtils.copyToBytesFromClasspath("/org/opensearch/action/termvectors/multiRequest2.json");
         data = createParser(JsonXContent.jsonXContent, new BytesArray(bytes));
         request = new MultiTermVectorsRequest();
         request.add(new TermVectorsRequest(), data);
@@ -292,7 +292,7 @@ void checkParsedParameters(MultiTermVectorsRequest request) {
 
     // issue #12311
     public void testMultiParserFilter() throws Exception {
-        byte[] bytes = StreamsUtils.copyToBytesFromClasspath("/org/elasticsearch/action/termvectors/multiRequest3.json");
+        byte[] bytes = StreamsUtils.copyToBytesFromClasspath("/org/opensearch/action/termvectors/multiRequest3.json");
         XContentParser data = createParser(JsonXContent.jsonXContent, bytes);
         MultiTermVectorsRequest request = new MultiTermVectorsRequest();
         request.add(new TermVectorsRequest(), data);
diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java
index 995b99012a62d..839fd728db2f6 100644
--- a/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java
+++ b/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java
@@ -45,7 +45,7 @@
 import org.elasticsearch.common.xcontent.json.JsonXContent;
 import org.elasticsearch.index.Index;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.TestCustomMetadata;
 
diff --git a/server/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java b/server/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
index 235ad14efa9f0..d430b81b920f4 100644
--- a/server/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
+++ b/server/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
@@ -24,7 +24,7 @@
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
 import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 
 import java.util.Arrays;
diff --git a/server/src/test/java/org/elasticsearch/common/path/PathTrieTests.java b/server/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
index 4288607095868..5eb9514a28ab4 100644
--- a/server/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
+++ b/server/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.common.path;
 
 import org.elasticsearch.common.path.PathTrie.TrieMatchingMode;
-import org.elasticsearch.rest.RestUtils;
+import org.opensearch.rest.RestUtils;
 import org.elasticsearch.test.ESTestCase;
 
 import java.util.HashMap;
diff --git a/server/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java b/server/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
index 9c94bfab7acd6..a96f21c8571c1 100644
--- a/server/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
+++ b/server/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
@@ -26,7 +26,7 @@
 import org.elasticsearch.common.settings.Setting.Property;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.MockLogAppender;
 import org.elasticsearch.test.rest.FakeRestRequest;
@@ -115,9 +115,9 @@ public void testFilteredSettingIsNotLogged() throws Exception {
 
         Setting filteredSetting = Setting.simpleString("key", Property.Filtered);
         assertExpectedLogMessages((testLogger) -> Setting.logSettingUpdate(filteredSetting, newSettings, oldSettings, testLogger),
-            new MockLogAppender.SeenEventExpectation("secure logging", "org.elasticsearch.test", Level.INFO, "updating [key]"),
-            new MockLogAppender.UnseenEventExpectation("unwanted old setting name", "org.elasticsearch.test", Level.INFO, "*old*"),
-            new MockLogAppender.UnseenEventExpectation("unwanted new setting name", "org.elasticsearch.test", Level.INFO, "*new*")
+            new MockLogAppender.SeenEventExpectation("secure logging", "org.opensearch.test", Level.INFO, "updating [key]"),
+            new MockLogAppender.UnseenEventExpectation("unwanted old setting name", "org.opensearch.test", Level.INFO, "*old*"),
+            new MockLogAppender.UnseenEventExpectation("unwanted new setting name", "org.opensearch.test", Level.INFO, "*new*")
         );
     }
 
@@ -127,13 +127,13 @@ public void testRegularSettingUpdateIsFullyLogged() throws Exception {
 
         Setting regularSetting = Setting.simpleString("key");
         assertExpectedLogMessages((testLogger) -> Setting.logSettingUpdate(regularSetting, newSettings, oldSettings, testLogger),
-            new MockLogAppender.SeenEventExpectation("regular logging", "org.elasticsearch.test", Level.INFO,
+            new MockLogAppender.SeenEventExpectation("regular logging", "org.opensearch.test", Level.INFO,
             "updating [key] from [old] to [new]"));
     }
 
     private void assertExpectedLogMessages(Consumer consumer,
                                            MockLogAppender.LoggingExpectation ... expectations) throws IllegalAccessException {
-        Logger testLogger = LogManager.getLogger("org.elasticsearch.test");
+        Logger testLogger = LogManager.getLogger("org.opensearch.test");
         MockLogAppender appender = new MockLogAppender();
         Loggers.addAppender(testLogger, appender);
         try {
diff --git a/server/src/test/java/org/elasticsearch/http/AbstractHttpServerTransportTests.java b/server/src/test/java/org/elasticsearch/http/AbstractHttpServerTransportTests.java
index 348e8a83af731..075c42b2c5400 100644
--- a/server/src/test/java/org/elasticsearch/http/AbstractHttpServerTransportTests.java
+++ b/server/src/test/java/org/elasticsearch/http/AbstractHttpServerTransportTests.java
@@ -35,10 +35,10 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.xcontent.NamedXContentRegistry;
 import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.MockLogAppender;
@@ -174,7 +174,7 @@ public HttpStats stats() {
     }
 
     @TestLogging(
-        value = "org.elasticsearch.http.HttpTracer:trace",
+        value = "org.opensearch.http.HttpTracer:trace",
         reason = "to ensure we log REST requests on TRACE level")
     public void testTracerLog() throws Exception {
         final String includeSettings;
@@ -225,7 +225,7 @@ public HttpStats stats() {
                 .put(HttpTransportSettings.SETTING_HTTP_TRACE_LOG_EXCLUDE.getKey(), excludeSettings)
                 .build());
             MockLogAppender appender = new MockLogAppender();
-            final String traceLoggerName = "org.elasticsearch.http.HttpTracer";
+            final String traceLoggerName = "org.opensearch.http.HttpTracer";
             try {
                 appender.start();
                 Loggers.addAppender(LogManager.getLogger(traceLoggerName), appender);
diff --git a/server/src/test/java/org/elasticsearch/http/CorsHandlerTests.java b/server/src/test/java/org/elasticsearch/http/CorsHandlerTests.java
index 13c006bfd63b5..bbfdc05f804e6 100644
--- a/server/src/test/java/org/elasticsearch/http/CorsHandlerTests.java
+++ b/server/src/test/java/org/elasticsearch/http/CorsHandlerTests.java
@@ -23,8 +23,8 @@
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.SettingsException;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 
 import java.util.Arrays;
diff --git a/server/src/test/java/org/elasticsearch/http/DefaultRestChannelTests.java b/server/src/test/java/org/elasticsearch/http/DefaultRestChannelTests.java
index c6ae9413386c3..74af22ab10d6f 100644
--- a/server/src/test/java/org/elasticsearch/http/DefaultRestChannelTests.java
+++ b/server/src/test/java/org/elasticsearch/http/DefaultRestChannelTests.java
@@ -34,11 +34,11 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
 import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.threadpool.TestThreadPool;
diff --git a/server/src/test/java/org/elasticsearch/http/TestHttpRequest.java b/server/src/test/java/org/elasticsearch/http/TestHttpRequest.java
index 02921c1af108d..df3f6bef972eb 100644
--- a/server/src/test/java/org/elasticsearch/http/TestHttpRequest.java
+++ b/server/src/test/java/org/elasticsearch/http/TestHttpRequest.java
@@ -21,8 +21,8 @@
 
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.bytes.BytesReference;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 
 import java.util.Arrays;
 import java.util.HashMap;
diff --git a/server/src/test/java/org/elasticsearch/http/TestHttpResponse.java b/server/src/test/java/org/elasticsearch/http/TestHttpResponse.java
index e56ab0ef1df44..109e9b2114685 100644
--- a/server/src/test/java/org/elasticsearch/http/TestHttpResponse.java
+++ b/server/src/test/java/org/elasticsearch/http/TestHttpResponse.java
@@ -20,7 +20,7 @@
 package org.elasticsearch.http;
 
 import org.elasticsearch.common.bytes.BytesReference;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.util.ArrayList;
 import java.util.HashMap;
diff --git a/server/src/test/java/org/elasticsearch/index/fieldstats/FieldStatsProviderRefreshTests.java b/server/src/test/java/org/elasticsearch/index/fieldstats/FieldStatsProviderRefreshTests.java
index f0a8308319382..b215cf78b0dec 100644
--- a/server/src/test/java/org/elasticsearch/index/fieldstats/FieldStatsProviderRefreshTests.java
+++ b/server/src/test/java/org/elasticsearch/index/fieldstats/FieldStatsProviderRefreshTests.java
@@ -27,7 +27,7 @@
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.indices.IndicesRequestCache;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESSingleNodeTestCase;
 
 import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
diff --git a/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java b/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
index b664a3bf119c8..daa0580a6f4c2 100644
--- a/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
+++ b/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
@@ -65,7 +65,7 @@
 import org.elasticsearch.indices.settings.InternalOrPrivateSettingsPlugin;
 import org.elasticsearch.plugins.Plugin;
 import org.elasticsearch.plugins.SearchPlugin;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.script.MockScriptEngine;
 import org.elasticsearch.script.MockScriptPlugin;
 import org.elasticsearch.script.Script;
@@ -179,18 +179,18 @@ public void onIndexModule(IndexModule indexModule) {
                 @Override
                 public void onFetchPhase(SearchContext context, long tookInNanos) {
                     if ("throttled_threadpool_index".equals(context.indexShard().shardId().getIndex().getName())) {
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search_throttled]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search_throttled]"));
                     } else {
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search]"));
                     }
                 }
 
                 @Override
                 public void onQueryPhase(SearchContext context, long tookInNanos) {
                     if ("throttled_threadpool_index".equals(context.indexShard().shardId().getIndex().getName())) {
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search_throttled]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search_throttled]"));
                     } else {
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search]"));
                     }
                 }
             });
@@ -605,7 +605,7 @@ public void testOpenScrollContextsConcurrently() throws Exception {
                     throw new AssertionError(e);
                 }
             });
-            threads[i].setName("elasticsearch[node_s_0][search]");
+            threads[i].setName("opensearch[node_s_0][search]");
             threads[i].start();
         }
         for (Thread thread : threads) {
@@ -800,7 +800,7 @@ public void testSetSearchThrottled() {
         IllegalArgumentException iae = expectThrows(IllegalArgumentException.class, () ->
             client().admin().indices().prepareUpdateSettings("throttled_threadpool_index").setSettings(Settings.builder().put(IndexSettings
                 .INDEX_SEARCH_THROTTLED.getKey(), false)).get());
-        assertEquals("can not update private setting [index.search.throttled]; this setting is managed by Elasticsearch",
+        assertEquals("can not update private setting [index.search.throttled]; this setting is managed by OpenSearch",
             iae.getMessage());
         assertFalse(service.getIndicesService().indexServiceSafe(index).getIndexSettings().isSearchThrottled());
         SearchRequest searchRequest = new SearchRequest().allowPartialSearchResults(false);
@@ -925,7 +925,7 @@ public void testMatchNoDocsEmptyResponse() throws InterruptedException {
                 public void onResponse(SearchPhaseResult result) {
                     try {
                         assertNotSame(Thread.currentThread(), currentThread);
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search]"));
                         assertThat(result, instanceOf(QuerySearchResult.class));
                         assertFalse(result.queryResult().isNull());
                         assertNotNull(result.queryResult().topDocs());
@@ -955,7 +955,7 @@ public void onFailure(Exception exc) {
                 public void onResponse(SearchPhaseResult result) {
                     try {
                         assertNotSame(Thread.currentThread(), currentThread);
-                        assertThat(Thread.currentThread().getName(), startsWith("elasticsearch[node_s_0][search]"));
+                        assertThat(Thread.currentThread().getName(), startsWith("opensearch[node_s_0][search]"));
                         assertThat(result, instanceOf(QuerySearchResult.class));
                         assertFalse(result.queryResult().isNull());
                         assertNotNull(result.queryResult().topDocs());
diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/AggregationsTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/AggregationsTests.java
index eedb1fe890f22..d98963465d4d1 100644
--- a/server/src/test/java/org/elasticsearch/search/aggregations/AggregationsTests.java
+++ b/server/src/test/java/org/elasticsearch/search/aggregations/AggregationsTests.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.aggregations.Aggregation.CommonFields;
 import org.elasticsearch.search.aggregations.bucket.adjacency.InternalAdjacencyMatrixTests;
 import org.elasticsearch.search.aggregations.bucket.composite.InternalCompositeTests;
diff --git a/server/src/test/java/org/elasticsearch/search/scroll/RestClearScrollActionTests.java b/server/src/test/java/org/elasticsearch/search/scroll/RestClearScrollActionTests.java
index c7cc5f8c11145..27aa1a1707aaa 100644
--- a/server/src/test/java/org/elasticsearch/search/scroll/RestClearScrollActionTests.java
+++ b/server/src/test/java/org/elasticsearch/search/scroll/RestClearScrollActionTests.java
@@ -26,8 +26,8 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.search.RestClearScrollAction;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.search.RestClearScrollAction;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.client.NoOpNodeClient;
 import org.elasticsearch.test.rest.FakeRestChannel;
diff --git a/server/src/test/java/org/elasticsearch/search/scroll/RestSearchScrollActionTests.java b/server/src/test/java/org/elasticsearch/search/scroll/RestSearchScrollActionTests.java
index 2636b4a5c60e4..9c261449cba56 100644
--- a/server/src/test/java/org/elasticsearch/search/scroll/RestSearchScrollActionTests.java
+++ b/server/src/test/java/org/elasticsearch/search/scroll/RestSearchScrollActionTests.java
@@ -26,8 +26,8 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.search.RestSearchScrollAction;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.search.RestSearchScrollAction;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.client.NoOpNodeClient;
 import org.elasticsearch.test.rest.FakeRestChannel;
diff --git a/server/src/test/java/org/elasticsearch/search/suggest/SuggestTests.java b/server/src/test/java/org/elasticsearch/search/suggest/SuggestTests.java
index b79f6a114c9fa..8945a3774bf7f 100644
--- a/server/src/test/java/org/elasticsearch/search/suggest/SuggestTests.java
+++ b/server/src/test/java/org/elasticsearch/search/suggest/SuggestTests.java
@@ -34,7 +34,7 @@
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.SearchModule;
 import org.elasticsearch.search.suggest.Suggest.Suggestion;
 import org.elasticsearch.search.suggest.Suggest.Suggestion.Entry;
diff --git a/server/src/test/java/org/elasticsearch/search/suggest/SuggestionTests.java b/server/src/test/java/org/elasticsearch/search/suggest/SuggestionTests.java
index 5551b7ce9ac7a..0c64aa4e7ad46 100644
--- a/server/src/test/java/org/elasticsearch/search/suggest/SuggestionTests.java
+++ b/server/src/test/java/org/elasticsearch/search/suggest/SuggestionTests.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.suggest.Suggest.Suggestion;
 import org.elasticsearch.search.suggest.Suggest.Suggestion.Entry;
 import org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option;
diff --git a/server/src/test/java/org/elasticsearch/usage/UsageServiceTests.java b/server/src/test/java/org/elasticsearch/usage/UsageServiceTests.java
index 83b596b364ccc..99dc6376d68b1 100644
--- a/server/src/test/java/org/elasticsearch/usage/UsageServiceTests.java
+++ b/server/src/test/java/org/elasticsearch/usage/UsageServiceTests.java
@@ -20,8 +20,8 @@
 package org.elasticsearch.usage;
 
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.BaseRestHandler;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.BaseRestHandler;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.search.aggregations.support.AggregationUsageService;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.client.NoOpNodeClient;
@@ -39,7 +39,7 @@
 public class UsageServiceTests extends ESTestCase {
 
     /**
-     * Test that we can not add a null reference to a {@link org.elasticsearch.rest.RestHandler} to the {@link UsageService}.
+     * Test that we can not add a null reference to a {@link org.opensearch.rest.RestHandler} to the {@link UsageService}.
      */
     public void testHandlerCanNotBeNull() {
         final UsageService service = new UsageService();
@@ -47,7 +47,7 @@ public void testHandlerCanNotBeNull() {
     }
 
     /**
-     * Test that we can not add an instance of a {@link org.elasticsearch.rest.RestHandler} with no name to the {@link UsageService}.
+     * Test that we can not add an instance of a {@link org.opensearch.rest.RestHandler} with no name to the {@link UsageService}.
      */
     public void testAHandlerWithNoName() {
         final UsageService service = new UsageService();
@@ -55,11 +55,11 @@ public void testAHandlerWithNoName() {
         final IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> service.addRestHandler(horse));
         assertThat(
             e.getMessage(),
-            equalTo("handler of type [org.elasticsearch.usage.UsageServiceTests$MockRestHandler] does not have a name"));
+            equalTo("handler of type [org.opensearch.usage.UsageServiceTests$MockRestHandler] does not have a name"));
     }
 
     /**
-     * Test that we can add the same instance of a {@link org.elasticsearch.rest.RestHandler} to the {@link UsageService} multiple times.
+     * Test that we can add the same instance of a {@link org.opensearch.rest.RestHandler} to the {@link UsageService} multiple times.
      */
     public void testHandlerWithConflictingNamesButSameInstance() {
         final UsageService service = new UsageService();
@@ -71,7 +71,7 @@ public void testHandlerWithConflictingNamesButSameInstance() {
     }
 
     /**
-     * Test that we can not add different instances of {@link org.elasticsearch.rest.RestHandler} with the same name to the
+     * Test that we can not add different instances of {@link org.opensearch.rest.RestHandler} with the same name to the
      * {@link UsageService}.
      */
     public void testHandlersWithConflictingNamesButDifferentInstances() {
@@ -84,7 +84,7 @@ public void testHandlersWithConflictingNamesButDifferentInstances() {
         final String expected = String.format(
             Locale.ROOT,
             "handler of type [%s] conflicts with handler of type [%1$s] as they both have the same name [%s]",
-            "org.elasticsearch.usage.UsageServiceTests$MockRestHandler",
+            "org.opensearch.usage.UsageServiceTests$MockRestHandler",
             name
         );
         assertThat(e.getMessage(), equalTo(expected));
diff --git a/server/src/test/java/org/elasticsearch/rest/BaseRestHandlerTests.java b/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/BaseRestHandlerTests.java
rename to server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java
index f5a44e40c1057..e82c37fb39fbd 100644
--- a/server/src/test/java/org/elasticsearch/rest/BaseRestHandlerTests.java
+++ b/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.Table;
@@ -26,7 +26,7 @@
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.action.cat.AbstractCatAction;
+import org.opensearch.rest.action.cat.AbstractCatAction;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java b/server/src/test/java/org/opensearch/rest/BytesRestResponseTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java
rename to server/src/test/java/org/opensearch/rest/BytesRestResponseTests.java
index edde0fe64fc09..0af39bedf86f0 100644
--- a/server/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java
+++ b/server/src/test/java/org/opensearch/rest/BytesRestResponseTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.ExceptionsHelper;
 import org.elasticsearch.OpenSearchStatusException;
@@ -218,7 +218,7 @@ public void testErrorToAndFromXContent() throws IOException {
                     addHeadersOrMetadata = randomBoolean();
                     type = "exception";
                     reason = "OpenSearchException with a cause";
-                    cause = new OpenSearchException("Elasticsearch exception [type=file_not_found_exception, reason=missing]");
+                    cause = new OpenSearchException("OpenSearch exception [type=file_not_found_exception, reason=missing]");
                 } else {
                     reason = "OpenSearchException[OpenSearchException with a cause]";
                 }
@@ -272,7 +272,7 @@ public void testErrorToAndFromXContent() throws IOException {
                 throw new UnsupportedOperationException("Failed to generate random exception");
         }
 
-        String message = "Elasticsearch exception [type=" + type + ", reason=" + reason + "]";
+        String message = "OpenSearch exception [type=" + type + ", reason=" + reason + "]";
         OpenSearchStatusException expected = new OpenSearchStatusException(message, status, cause);
 
         if (addHeadersOrMetadata) {
@@ -327,7 +327,7 @@ public void testNoErrorFromXContent() throws IOException {
                 }
             }
         });
-        assertEquals("Failed to parse elasticsearch status exception: no exception was found", e.getMessage());
+        assertEquals("Failed to parse opensearch status exception: no exception was found", e.getMessage());
     }
 
     public static class WithHeadersException extends OpenSearchException {
diff --git a/server/src/test/java/org/elasticsearch/rest/DeprecationRestHandlerTests.java b/server/src/test/java/org/opensearch/rest/DeprecationRestHandlerTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/DeprecationRestHandlerTests.java
rename to server/src/test/java/org/opensearch/rest/DeprecationRestHandlerTests.java
index 399c3cfcd5453..a9e92d75a8b6b 100644
--- a/server/src/test/java/org/elasticsearch/rest/DeprecationRestHandlerTests.java
+++ b/server/src/test/java/org/opensearch/rest/DeprecationRestHandlerTests.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import com.carrotsearch.randomizedtesting.generators.CodepointSetGenerator;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/RestControllerTests.java b/server/src/test/java/org/opensearch/rest/RestControllerTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/RestControllerTests.java
rename to server/src/test/java/org/opensearch/rest/RestControllerTests.java
index 0e8191f38549d..3cabf37507204 100644
--- a/server/src/test/java/org/elasticsearch/rest/RestControllerTests.java
+++ b/server/src/test/java/org/opensearch/rest/RestControllerTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.breaker.CircuitBreaker;
diff --git a/server/src/test/java/org/elasticsearch/rest/RestHttpResponseHeadersTests.java b/server/src/test/java/org/opensearch/rest/RestHttpResponseHeadersTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/RestHttpResponseHeadersTests.java
rename to server/src/test/java/org/opensearch/rest/RestHttpResponseHeadersTests.java
index ce54b896ef36e..2496acb270d3c 100644
--- a/server/src/test/java/org/elasticsearch/rest/RestHttpResponseHeadersTests.java
+++ b/server/src/test/java/org/opensearch/rest/RestHttpResponseHeadersTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
diff --git a/server/src/test/java/org/elasticsearch/rest/RestRequestTests.java b/server/src/test/java/org/opensearch/rest/RestRequestTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/RestRequestTests.java
rename to server/src/test/java/org/opensearch/rest/RestRequestTests.java
index af6d610954a14..425c7ede22c20 100644
--- a/server/src/test/java/org/elasticsearch/rest/RestRequestTests.java
+++ b/server/src/test/java/org/opensearch/rest/RestRequestTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.OpenSearchParseException;
 import org.elasticsearch.common.CheckedConsumer;
diff --git a/server/src/test/java/org/elasticsearch/rest/RestUtilsTests.java b/server/src/test/java/org/opensearch/rest/RestUtilsTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/RestUtilsTests.java
rename to server/src/test/java/org/opensearch/rest/RestUtilsTests.java
index 578abb3a391f6..dd51eb11020c1 100644
--- a/server/src/test/java/org/elasticsearch/rest/RestUtilsTests.java
+++ b/server/src/test/java/org/opensearch/rest/RestUtilsTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest;
+package org.opensearch.rest;
 
 import org.elasticsearch.test.ESTestCase;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/RestActionsTests.java b/server/src/test/java/org/opensearch/rest/action/RestActionsTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/action/RestActionsTests.java
rename to server/src/test/java/org/opensearch/rest/action/RestActionsTests.java
index cb8886cafe8f5..594ba2ce312b5 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/RestActionsTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/RestActionsTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import com.fasterxml.jackson.core.io.JsonEOFException;
 import org.opensearch.action.OriginalIndices;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/RestBuilderListenerTests.java b/server/src/test/java/org/opensearch/rest/action/RestBuilderListenerTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/RestBuilderListenerTests.java
rename to server/src/test/java/org/opensearch/rest/action/RestBuilderListenerTests.java
index 2bc0d0bdc8157..2a96a023f9f2b 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/RestBuilderListenerTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/RestBuilderListenerTests.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/RestCancellableNodeClientTests.java b/server/src/test/java/org/opensearch/rest/action/RestCancellableNodeClientTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/action/RestCancellableNodeClientTests.java
rename to server/src/test/java/org/opensearch/rest/action/RestCancellableNodeClientTests.java
index dcfdd968234a4..be334c411f0c0 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/RestCancellableNodeClientTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/RestCancellableNodeClientTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.ActionRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/RestMainActionTests.java b/server/src/test/java/org/opensearch/rest/action/RestMainActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/RestMainActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/RestMainActionTests.java
index 668d1095c36ff..6a6642f61ff7b 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/RestMainActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/RestMainActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action;
+package org.opensearch.rest.action;
 
 import org.elasticsearch.Build;
 import org.elasticsearch.Version;
@@ -27,9 +27,9 @@
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.rest.BytesRestResponse;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.BytesRestResponse;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java
index 3f3d1c37266c8..ad854f89deea6 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestAddVotingConfigExclusionActionTests.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
 import org.elasticsearch.common.Strings;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java
index ea173e06e9245..d17ce88e35aec 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterGetSettingsActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.settings.ClusterGetSettingsResponse;
 import org.elasticsearch.cluster.ClusterState;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthActionTests.java
index 0c1cad8fd3f04..5dc181534e2d7 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestClusterHealthActionTests.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.health.ClusterHealthRequest;
 import org.elasticsearch.action.support.ActiveShardCount;
 import org.elasticsearch.cluster.health.ClusterHealthStatus;
 import org.elasticsearch.common.Priority;
 import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoActionTests.java
index c4025f3d93332..ac6b40f7d972e 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesInfoActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesInfoActionTests.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest;
 import org.elasticsearch.common.util.set.Sets;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
@@ -32,7 +32,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import static org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction.ALLOWED_METRICS;
+import static org.opensearch.rest.action.admin.cluster.RestNodesInfoAction.ALLOWED_METRICS;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasItem;
 import static org.hamcrest.Matchers.not;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsActionTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsActionTests.java
index aa4fe725e0e03..5c4a10d317d05 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java
index 2eedf53a15e8f..334e182804bc9 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/cluster/RestReloadSecureSettingsActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.cluster;
+package org.opensearch.rest.action.admin.cluster;
 
 import org.opensearch.action.admin.cluster.node.reload.NodesReloadSecureSettingsRequest;
 import org.elasticsearch.common.xcontent.DeprecationHandler;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestAnalyzeActionTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestAnalyzeActionTests.java
index 2df3f2fc8809a..d5f64fb1a4796 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestAnalyzeActionTests.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.analyze.AnalyzeAction;
 import org.elasticsearch.client.node.NodeClient;
@@ -25,7 +25,7 @@
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.analysis.NameOrDefinition;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.client.NoOpNodeClient;
 import org.elasticsearch.test.rest.FakeRestRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java
index 6ef1d102f74a9..0fd3b97acfef4 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestClearIndicesCacheActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestCreateIndexActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestCreateIndexActionTests.java
index eb15d0601b7bd..339a598e7eee4 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestCreateIndexActionTests.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
@@ -33,7 +33,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.mockito.Mockito.mock;
 
 public class RestCreateIndexActionTests extends RestActionTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetAliasesActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetAliasesActionTests.java
index 48c43035488a9..231534871c959 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetAliasesActionTests.java
@@ -17,21 +17,21 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.cluster.metadata.AliasMetadata;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestResponse;
+import org.opensearch.rest.RestResponse;
 import org.elasticsearch.test.ESTestCase;
 
 import java.util.Arrays;
 import java.util.List;
 
-import static org.elasticsearch.rest.RestStatus.OK;
-import static org.elasticsearch.rest.RestStatus.NOT_FOUND;
+import static org.opensearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestStatus.NOT_FOUND;
 import static org.hamcrest.Matchers.equalTo;
 
 public class RestGetAliasesActionTests extends ESTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java
index 29a26926d8c4c..356332cac2bae 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetFieldMappingActionTests.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
@@ -31,7 +31,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 
 public class RestGetFieldMappingActionTests extends RestActionTestCase {
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetIndicesActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetIndicesActionTests.java
index 271e1044237a8..5969864b1b7c1 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetIndicesActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 
@@ -28,7 +28,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.mockito.Mockito.mock;
 
 public class RestGetIndicesActionTests extends RestActionTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetMappingActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetMappingActionTests.java
index 3dc95d4c3c6c6..1bac2bba01d55 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestGetMappingActionTests.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
@@ -35,7 +35,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.mockito.Mockito.mock;
 
 public class RestGetMappingActionTests extends RestActionTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsActionTests.java
index 6c6e2c3d4b1f0..eea1c13eb0e3c 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestIndicesStatsActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java
index 8e18c78828a1f..5ac452f1be3e0 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutIndexTemplateActionTests.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
@@ -33,7 +33,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 import static org.mockito.Mockito.mock;
 
 public class RestPutIndexTemplateActionTests extends RestActionTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutMappingActionTests.java
similarity index 92%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutMappingActionTests.java
index 54492ac9c4892..cc8d23ceb9598 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestPutMappingActionTests.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestStatus;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
@@ -31,7 +31,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
+import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
 
 public class RestPutMappingActionTests extends RestActionTestCase {
 
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandlerTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestResizeHandlerTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandlerTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestResizeHandlerTests.java
index b277cb7d8fd72..89a8f1efb29b4 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandlerTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestResizeHandlerTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.xcontent.NamedXContentRegistry;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryActionTests.java b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestValidateQueryActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/admin/indices/RestValidateQueryActionTests.java
index 3ecc55cae1b43..2212f089701d5 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestValidateQueryActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/admin/indices/RestValidateQueryActionTests.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.rest.action.admin.indices;
+package org.opensearch.rest.action.admin.indices;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.ActionRequest;
@@ -31,9 +31,9 @@
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestController;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestController;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.search.AbstractSearchTestCase;
 import org.elasticsearch.tasks.Task;
 import org.elasticsearch.tasks.TaskManager;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestIndicesActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestIndicesActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java
index 0f388cd87f0c7..909e258a9b4f3 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestIndicesActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.Version;
 import org.opensearch.action.admin.indices.stats.CommonStats;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestNodesActionTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestNodesActionTests.java
index 16b0ba818817f..7b946d759f601 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestNodesActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.Version;
 import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestRecoveryActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestRecoveryActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java
index cc407d883efa4..971f65def6f07 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestRecoveryActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.admin.indices.recovery.RecoveryResponse;
 import org.elasticsearch.action.support.DefaultShardOperationFailedException;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestShardsActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java
similarity index 99%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestShardsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java
index deb87b1ea645e..f2ed876935ca1 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestShardsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.Version;
 import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestTableTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestTableTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestTableTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestTableTests.java
index 4f7bc1bedd9d6..af4c852c5237b 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestTableTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestTableTests.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.elasticsearch.common.Table;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.AbstractRestChannel;
-import org.elasticsearch.rest.RestResponse;
+import org.opensearch.rest.AbstractRestChannel;
+import org.opensearch.rest.RestResponse;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.junit.Before;
@@ -33,8 +33,8 @@
 import java.util.List;
 import java.util.Map;
 
-import static org.elasticsearch.rest.action.cat.RestTable.buildDisplayHeaders;
-import static org.elasticsearch.rest.action.cat.RestTable.buildResponse;
+import static org.opensearch.rest.action.cat.RestTable.buildDisplayHeaders;
+import static org.opensearch.rest.action.cat.RestTable.buildResponse;
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasItem;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestTasksActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestTasksActionTests.java
similarity index 98%
rename from server/src/test/java/org/elasticsearch/rest/action/cat/RestTasksActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/cat/RestTasksActionTests.java
index 891c70d767883..2c47350086717 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestTasksActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/cat/RestTasksActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.cat;
+package org.opensearch.rest.action.cat;
 
 import org.opensearch.action.ActionListener;
 import org.opensearch.action.ActionRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestBulkActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestBulkActionTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestBulkActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestBulkActionTests.java
index 06c6b52bb2ed6..00386158ea7f3 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestBulkActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestBulkActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.apache.lucene.util.SetOnce;
 import org.elasticsearch.Version;
@@ -28,8 +28,8 @@
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.client.NoOpNodeClient;
 import org.elasticsearch.test.rest.FakeRestRequest;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestDeleteActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestDeleteActionTests.java
similarity index 93%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestDeleteActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestDeleteActionTests.java
index bc86825e72951..b0c647167c13e 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestDeleteActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestDeleteActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestGetActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestGetActionTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestGetActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestGetActionTests.java
index 32152e4a94048..daa018b986e57 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestGetActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestGetActionTests.java
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestGetSourceActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestGetSourceActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestGetSourceActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestGetSourceActionTests.java
index d7e98cfc9264d..0d604fe91cba3 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestGetSourceActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestGetSourceActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.ResourceNotFoundException;
 import org.elasticsearch.action.get.GetResponse;
@@ -25,10 +25,10 @@
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.index.get.GetResult;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
-import org.elasticsearch.rest.RestResponse;
-import org.elasticsearch.rest.action.document.RestGetSourceAction.RestGetSourceResponseListener;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestResponse;
+import org.opensearch.rest.action.document.RestGetSourceAction.RestGetSourceResponseListener;
 import org.elasticsearch.test.rest.FakeRestChannel;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
@@ -41,7 +41,7 @@
 
 import static java.util.Collections.emptyMap;
 import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
-import static org.elasticsearch.rest.RestStatus.OK;
+import static org.opensearch.rest.RestStatus.OK;
 import static org.hamcrest.Matchers.equalTo;
 
 public class RestGetSourceActionTests extends RestActionTestCase {
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestIndexActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestIndexActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestIndexActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestIndexActionTests.java
index 96f392ad823b6..ae8c23977ccb6 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestIndexActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestIndexActionTests.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.apache.lucene.util.SetOnce;
 import org.elasticsearch.Version;
@@ -29,9 +29,9 @@
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.action.document.RestIndexAction.AutoIdHandler;
-import org.elasticsearch.rest.action.document.RestIndexAction.CreateHandler;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.action.document.RestIndexAction.AutoIdHandler;
+import org.opensearch.rest.action.document.RestIndexAction.CreateHandler;
 import org.elasticsearch.test.VersionUtils;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestMultiGetActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestMultiGetActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestMultiGetActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestMultiGetActionTests.java
index 9f7759df690b4..407a95fbb0a2e 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestMultiGetActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestMultiGetActionTests.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestMultiTermVectorsActionTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestMultiTermVectorsActionTests.java
index 59b52f143030e..8d73d861ca06e 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestMultiTermVectorsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestMultiTermVectorsActionTests.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestTermVectorsActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestTermVectorsActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestTermVectorsActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestTermVectorsActionTests.java
index 04c22c009ef03..34e642a3786c4 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestTermVectorsActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestTermVectorsActionTests.java
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/document/RestUpdateActionTests.java b/server/src/test/java/org/opensearch/rest/action/document/RestUpdateActionTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/document/RestUpdateActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/document/RestUpdateActionTests.java
index c041b533456ef..447875b3effc2 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/document/RestUpdateActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/document/RestUpdateActionTests.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.document;
+package org.opensearch.rest.action.document;
 
 import org.opensearch.action.ActionRequestValidationException;
 import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.VersionType;
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/search/RestCountActionTests.java b/server/src/test/java/org/opensearch/rest/action/search/RestCountActionTests.java
similarity index 94%
rename from server/src/test/java/org/elasticsearch/rest/action/search/RestCountActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/search/RestCountActionTests.java
index 2fbf275b80933..c9abb7bbd97ea 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/search/RestCountActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/search/RestCountActionTests.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
-import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.rest.RestRequest.Method;
+import org.opensearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest.Method;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/search/RestExplainActionTests.java b/server/src/test/java/org/opensearch/rest/action/search/RestExplainActionTests.java
similarity index 95%
rename from server/src/test/java/org/elasticsearch/rest/action/search/RestExplainActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/search/RestExplainActionTests.java
index a6840be4a0eb1..ff82f7158037a 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/search/RestExplainActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/search/RestExplainActionTests.java
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/search/RestMultiSearchActionTests.java b/server/src/test/java/org/opensearch/rest/action/search/RestMultiSearchActionTests.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/rest/action/search/RestMultiSearchActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/search/RestMultiSearchActionTests.java
index 05fde56724c42..c6cb1bba5bb03 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/search/RestMultiSearchActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/search/RestMultiSearchActionTests.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
 import org.elasticsearch.common.bytes.BytesArray;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/server/src/test/java/org/elasticsearch/rest/action/search/RestSearchActionTests.java b/server/src/test/java/org/opensearch/rest/action/search/RestSearchActionTests.java
similarity index 96%
rename from server/src/test/java/org/elasticsearch/rest/action/search/RestSearchActionTests.java
rename to server/src/test/java/org/opensearch/rest/action/search/RestSearchActionTests.java
index 9ef3800a8f26b..9a01a7873da3d 100644
--- a/server/src/test/java/org/elasticsearch/rest/action/search/RestSearchActionTests.java
+++ b/server/src/test/java/org/opensearch/rest/action/search/RestSearchActionTests.java
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-package org.elasticsearch.rest.action.search;
+package org.opensearch.rest.action.search;
 
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestRequest;
 import org.elasticsearch.test.rest.FakeRestRequest;
 import org.elasticsearch.test.rest.RestActionTestCase;
 import org.junit.Before;
diff --git a/test/fixtures/azure-fixture/src/main/java/fixture/azure/AzureHttpHandler.java b/test/fixtures/azure-fixture/src/main/java/fixture/azure/AzureHttpHandler.java
index 7a94a8c9f2e57..b585f161de918 100644
--- a/test/fixtures/azure-fixture/src/main/java/fixture/azure/AzureHttpHandler.java
+++ b/test/fixtures/azure-fixture/src/main/java/fixture/azure/AzureHttpHandler.java
@@ -26,8 +26,8 @@
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.io.Streams;
 import org.elasticsearch.common.regex.Regex;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.RestUtils;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.RestUtils;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
diff --git a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/FakeOAuth2HttpHandler.java b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/FakeOAuth2HttpHandler.java
index c49ae19dba0b5..21fcb28c732c6 100644
--- a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/FakeOAuth2HttpHandler.java
+++ b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/FakeOAuth2HttpHandler.java
@@ -21,7 +21,7 @@
 import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpHandler;
 import org.elasticsearch.common.SuppressForbidden;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 
diff --git a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java
index 5df9ce3d44335..3833e553179af 100644
--- a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java
+++ b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java
@@ -32,8 +32,8 @@
 import org.elasticsearch.common.collect.Tuple;
 import org.elasticsearch.common.io.Streams;
 import org.elasticsearch.common.regex.Regex;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.RestUtils;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.RestUtils;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixture.java b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixture.java
index b80e4a34e26a2..6e69de4768734 100644
--- a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixture.java
+++ b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixture.java
@@ -21,7 +21,7 @@
 import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpHandler;
 import com.sun.net.httpserver.HttpServer;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.net.InetAddress;
diff --git a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithEC2.java b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithEC2.java
index 796b53fa5aea4..1f0706c8c7a17 100644
--- a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithEC2.java
+++ b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithEC2.java
@@ -19,7 +19,7 @@
 package fixture.s3;
 
 import com.sun.net.httpserver.HttpHandler;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.nio.charset.StandardCharsets;
 import java.time.ZonedDateTime;
diff --git a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithECS.java b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithECS.java
index d5afb0adab344..5d4db74f3255c 100644
--- a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithECS.java
+++ b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithECS.java
@@ -19,7 +19,7 @@
 package fixture.s3;
 
 import com.sun.net.httpserver.HttpHandler;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.nio.charset.StandardCharsets;
 import java.util.Objects;
diff --git a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithSessionToken.java b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithSessionToken.java
index 8ab64b7a4c090..a5d83212b5d6e 100644
--- a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithSessionToken.java
+++ b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpFixtureWithSessionToken.java
@@ -19,7 +19,7 @@
 package fixture.s3;
 
 import com.sun.net.httpserver.HttpHandler;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.util.Objects;
 
diff --git a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpHandler.java b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpHandler.java
index 89f2f7196ff3d..d2346cf0a58e1 100644
--- a/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpHandler.java
+++ b/test/fixtures/s3-fixture/src/main/java/fixture/s3/S3HttpHandler.java
@@ -30,8 +30,8 @@
 import org.elasticsearch.common.hash.MessageDigests;
 import org.elasticsearch.common.io.Streams;
 import org.elasticsearch.common.regex.Regex;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.RestUtils;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.RestUtils;
 
 import java.io.BufferedInputStream;
 import java.io.ByteArrayOutputStream;
diff --git a/test/framework/src/main/java/org/elasticsearch/http/NullDispatcher.java b/test/framework/src/main/java/org/elasticsearch/http/NullDispatcher.java
index 837e6359337fe..4fc8ab2a81611 100644
--- a/test/framework/src/main/java/org/elasticsearch/http/NullDispatcher.java
+++ b/test/framework/src/main/java/org/elasticsearch/http/NullDispatcher.java
@@ -20,8 +20,8 @@
 package org.elasticsearch.http;
 
 import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.rest.RestChannel;
-import org.elasticsearch.rest.RestRequest;
+import org.opensearch.rest.RestChannel;
+import org.opensearch.rest.RestRequest;
 
 public class NullDispatcher implements HttpServerTransport.Dispatcher {
 
diff --git a/test/framework/src/main/java/org/elasticsearch/search/aggregations/InternalSingleBucketAggregationTestCase.java b/test/framework/src/main/java/org/elasticsearch/search/aggregations/InternalSingleBucketAggregationTestCase.java
index 4af7de4f61d08..18f6169670b45 100644
--- a/test/framework/src/main/java/org/elasticsearch/search/aggregations/InternalSingleBucketAggregationTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/search/aggregations/InternalSingleBucketAggregationTestCase.java
@@ -22,7 +22,7 @@
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.rest.action.search.RestSearchAction;
+import org.opensearch.rest.action.search.RestSearchAction;
 import org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation;
 import org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation;
 import org.elasticsearch.search.aggregations.metrics.InternalMax;
diff --git a/test/framework/src/main/java/org/elasticsearch/test/AbstractBroadcastResponseTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/AbstractBroadcastResponseTestCase.java
index 904e13f1aa114..0971b8b7c8383 100644
--- a/test/framework/src/main/java/org/elasticsearch/test/AbstractBroadcastResponseTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/test/AbstractBroadcastResponseTestCase.java
@@ -29,7 +29,7 @@
 import org.elasticsearch.common.xcontent.XContentType;
 import org.elasticsearch.index.Index;
 import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.rest.RestStatus;
+import org.opensearch.rest.RestStatus;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
index 9012897e9d971..64cb73bd58803 100644
--- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
@@ -134,8 +134,8 @@
 import org.elasticsearch.node.NodeMocksPlugin;
 import org.elasticsearch.plugins.NetworkPlugin;
 import org.elasticsearch.plugins.Plugin;
-import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.rest.action.RestCancellableNodeClient;
+import org.opensearch.rest.RestStatus;
+import org.opensearch.rest.action.RestCancellableNodeClient;
 import org.elasticsearch.script.MockScriptService;
 import org.elasticsearch.script.ScriptMetadata;
 import org.elasticsearch.search.MockSearchService;
@@ -214,7 +214,7 @@
 
 /**
  * {@link ESIntegTestCase} is an abstract base class to run integration
- * tests against a JVM private Elasticsearch Cluster. The test class supports 2 different
+ * tests against a JVM private OpenSearch Cluster. The test class supports 2 different
  * cluster scopes.
  * 
    *
  • {@link Scope#TEST} - uses a new cluster for each individual test method.
  • diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java index 7bfd859ac072a..a5d770f78b957 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java @@ -37,7 +37,7 @@ import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.rest.action.search.RestSearchAction; +import org.opensearch.rest.action.search.RestSearchAction; import org.elasticsearch.script.ScriptService; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.SearchModule; diff --git a/test/framework/src/main/java/org/elasticsearch/test/RandomObjects.java b/test/framework/src/main/java/org/elasticsearch/test/RandomObjects.java index a633a0fbd8c7d..2f287b3badc83 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/RandomObjects.java +++ b/test/framework/src/main/java/org/elasticsearch/test/RandomObjects.java @@ -42,7 +42,7 @@ import org.elasticsearch.index.shard.IndexShardRecoveringException; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardNotFoundException; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -314,24 +314,24 @@ private static Tuple randomShardInfoFailure(Random random) { switch (type) { case 0: actualException = new ClusterBlockException(singleton(NoMasterBlockService.NO_MASTER_BLOCK_WRITES)); - expectedException = new OpenSearchException("Elasticsearch exception [type=cluster_block_exception, " + + expectedException = new OpenSearchException("OpenSearch exception [type=cluster_block_exception, " + "reason=blocked by: [SERVICE_UNAVAILABLE/2/no master];]"); break; case 1: actualException = new ShardNotFoundException(shard); - expectedException = new OpenSearchException("Elasticsearch exception [type=shard_not_found_exception, " + + expectedException = new OpenSearchException("OpenSearch exception [type=shard_not_found_exception, " + "reason=no such shard]"); expectedException.setShard(shard); break; case 2: actualException = new IllegalArgumentException("Closed resource", new RuntimeException("Resource")); - expectedException = new OpenSearchException("Elasticsearch exception [type=illegal_argument_exception, " + + expectedException = new OpenSearchException("OpenSearch exception [type=illegal_argument_exception, " + "reason=Closed resource]", - new OpenSearchException("Elasticsearch exception [type=runtime_exception, reason=Resource]")); + new OpenSearchException("OpenSearch exception [type=runtime_exception, reason=Resource]")); break; case 3: actualException = new IndexShardRecoveringException(shard); - expectedException = new OpenSearchException("Elasticsearch exception [type=index_shard_recovering_exception, " + + expectedException = new OpenSearchException("OpenSearch exception [type=index_shard_recovering_exception, " + "reason=CurrentState[RECOVERING] Already recovering]"); expectedException.setShard(shard); break; diff --git a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index 8e04b9874fba4..adf866784940c 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -55,7 +55,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.suggest.Suggest; import org.elasticsearch.test.NotEqualMessageBuilder; @@ -577,7 +577,7 @@ public static void assertFutureThrows(ActionFuture futu * Run future.actionGet() and check that it throws an exception of the right type, optionally checking the exception's rest status * * @param exceptionClass expected exception class - * @param status {@link org.elasticsearch.rest.RestStatus} to check for. Can be null to disable the check + * @param status {@link org.opensearch.rest.RestStatus} to check for. Can be null to disable the check * @param extraInfo extra information to add to the failure message. Can be null. */ public static void assertFutureThrows(ActionFuture future, Class exceptionClass, diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index 99258efcb458b..ce12decff25fb 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -58,7 +58,7 @@ import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.seqno.ReplicationTracker; import org.elasticsearch.indices.flush.SyncedFlushService; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestStatus; import org.elasticsearch.snapshots.SnapshotState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.yaml.ObjectPath; @@ -105,7 +105,7 @@ import static org.hamcrest.Matchers.in; /** - * Superclass for tests that interact with an external test cluster using Elasticsearch's {@link RestClient}. + * Superclass for tests that interact with an external test cluster using OpenSearch's {@link RestClient}. */ public abstract class ESRestTestCase extends ESTestCase { public static final String TRUSTSTORE_PATH = "truststore.path"; @@ -141,11 +141,11 @@ public static List entityAsList(Response response) throws IOException { private static List clusterHosts; /** - * A client for the running Elasticsearch cluster + * A client for the running OpenSearch cluster */ private static RestClient client; /** - * A client for the running Elasticsearch cluster configured to take test administrative actions like remove all indexes after the test + * A client for the running OpenSearch cluster configured to take test administrative actions like remove all indexes after the test * completes */ private static RestClient adminClient; @@ -937,7 +937,7 @@ private static void updateIndexSettings(String index, Settings settings) throws protected static void expectSoftDeletesWarning(Request request, String indexName) { final List expectedWarnings = Collections.singletonList( - "Creating indices with soft-deletes disabled is deprecated and will be removed in future Elasticsearch versions. " + + "Creating indices with soft-deletes disabled is deprecated and will be removed in future OpenSearch versions. " + "Please do not specify value for setting [index.soft_deletes.enabled] of index [" + indexName + "]."); final Builder requestOptions = RequestOptions.DEFAULT.toBuilder(); if (nodeVersions.stream().allMatch(version -> version.onOrAfter(Version.V_7_6_0))) { diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestChannel.java b/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestChannel.java index ff6b99bdc4a51..da82ff83f8267 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestChannel.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestChannel.java @@ -18,10 +18,10 @@ */ package org.elasticsearch.test.rest; -import org.elasticsearch.rest.AbstractRestChannel; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestResponse; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.AbstractRestChannel; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestResponse; +import org.opensearch.rest.RestStatus; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; @@ -47,7 +47,7 @@ public void sendResponse(RestResponse response) { } latch.countDown(); } - + public RestResponse capturedResponse() { return capturedRestResponse; } diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java b/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java index 77aab5adb4aa5..f835531d0ba2f 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java @@ -27,8 +27,8 @@ import org.elasticsearch.http.HttpChannel; import org.elasticsearch.http.HttpRequest; import org.elasticsearch.http.HttpResponse; -import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.rest.RestStatus; +import org.opensearch.rest.RestRequest; +import org.opensearch.rest.RestStatus; import java.net.InetSocketAddress; import java.util.Collections; diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/RestActionTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/RestActionTestCase.java index accd84d9a4f89..f98af2e6c30fa 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/RestActionTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/RestActionTestCase.java @@ -26,8 +26,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.rest.RestController; -import org.elasticsearch.rest.RestRequest; +import org.opensearch.rest.RestController; +import org.opensearch.rest.RestRequest; import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskListener; import org.elasticsearch.test.ESTestCase; diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java index dbda656656f01..63ff1dc4002d4 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java @@ -40,11 +40,11 @@ import java.util.List; import java.util.Map; -import static org.elasticsearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; +import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER; /** * Execution context passed across the REST tests. - * Holds the REST client used to communicate with elasticsearch. + * Holds the REST client used to communicate with opensearch. * Caches the last obtained test response and allows to stash part of it within variables * that can be used as input values in following requests. */ @@ -67,7 +67,7 @@ public class ClientYamlTestExecutionContext { } /** - * Calls an elasticsearch api with the parameters and request body provided as arguments. + * Calls an opensearch api with the parameters and request body provided as arguments. * Saves the obtained response in the execution context. */ public ClientYamlTestResponse callApi(String apiName, Map params, List> bodies, @@ -76,7 +76,7 @@ public ClientYamlTestResponse callApi(String apiName, Map params } /** - * Calls an elasticsearch api with the parameters and request body provided as arguments. + * Calls an opensearch api with the parameters and request body provided as arguments. * Saves the obtained response in the execution context. */ public ClientYamlTestResponse callApi(String apiName, Map params, List> bodies,