Skip to content

Commit

Permalink
Pulled extensions REST request in extensions directory
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
  • Loading branch information
owaiskazi19 committed Jun 12, 2023
1 parent 4266f4e commit 2c7fdb2
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 23 deletions.
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/action/ActionModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
import org.opensearch.extensions.ExtensionsManager;
import org.opensearch.extensions.action.ExtensionProxyAction;
import org.opensearch.extensions.action.ExtensionProxyTransportAction;
import org.opensearch.rest.extensions.RestInitializeExtensionAction;
import org.opensearch.extensions.rest.RestInitializeExtensionAction;
import org.opensearch.index.seqno.RetentionLeaseActions;
import org.opensearch.identity.IdentityService;
import org.opensearch.indices.SystemIndices;
Expand Down Expand Up @@ -455,7 +455,7 @@
import org.opensearch.rest.action.search.RestPutSearchPipelineAction;
import org.opensearch.rest.action.search.RestSearchAction;
import org.opensearch.rest.action.search.RestSearchScrollAction;
import org.opensearch.rest.extensions.RestSendToExtensionAction;
import org.opensearch.extensions.rest.RestSendToExtensionAction;
import org.opensearch.tasks.Task;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.usage.UsageService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.opensearch.extensions.DiscoveryExtensionNode;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler;
import org.opensearch.rest.extensions.RestSendToExtensionAction;
import org.opensearch.transport.TransportResponse;
import org.opensearch.transport.TransportService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* compatible open source license.
*/

package org.opensearch.rest.extensions;
package org.opensearch.extensions.rest;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* compatible open source license.
*/

package org.opensearch.rest.extensions;
package org.opensearch.extensions.rest;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -17,9 +17,6 @@
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.extensions.DiscoveryExtensionNode;
import org.opensearch.extensions.ExtensionsManager;
import org.opensearch.extensions.rest.ExtensionRestRequest;
import org.opensearch.extensions.rest.RegisterRestActionsRequest;
import org.opensearch.extensions.rest.RestExecuteOnExtensionResponse;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.NamedRoute;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.opensearch.extensions.action.ExtensionTransportAction;
import org.opensearch.rest.NamedRoute;
import org.opensearch.rest.RestRequest;
import org.opensearch.rest.extensions.RestSendToExtensionAction;
import org.opensearch.extensions.rest.RestSendToExtensionAction;
import org.opensearch.tasks.Task;
import org.opensearch.tasks.TaskManager;
import org.opensearch.test.OpenSearchTestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.opensearch.extensions.ExtensionsManager;
import org.opensearch.indices.breaker.NoneCircuitBreakerService;
import org.opensearch.rest.RestRequest;
import org.opensearch.rest.extensions.RestInitializeExtensionAction;
import org.opensearch.test.MockLogAppender;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.test.rest.FakeRestChannel;
Expand Down Expand Up @@ -116,7 +115,7 @@ public void testRestInitializeExtensionAction() throws Exception {
mockLogAppender.addExpectation(
new MockLogAppender.SeenEventExpectation(
"Extension has been initialized",
"org.opensearch.rest.extensions.RestInitializeExtensionAction",
"org.opensearch.extensions.rest.RestInitializeExtensionAction",
Level.INFO,
"Extension has been initialized"
)
Expand Down Expand Up @@ -144,7 +143,7 @@ public void testRestInitializeExtensionActionFailure() throws Exception {
mockLogAppender.addExpectation(
new MockLogAppender.SeenEventExpectation(
"Required field is missing in the request",
"org.opensearch.rest.extensions.RestInitializeExtensionAction",
"org.opensearch.extensions.rest.RestInitializeExtensionAction",
Level.ERROR,
"Required field [uniqueId] is missing in the request"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.opensearch.rest.NamedRoute;
import org.opensearch.rest.RestHandler.Route;
import org.opensearch.rest.RestRequest.Method;
import org.opensearch.rest.extensions.RestSendToExtensionAction;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.test.transport.MockTransportService;
import org.opensearch.threadpool.TestThreadPool;
Expand Down

0 comments on commit 2c7fdb2

Please sign in to comment.