diff --git a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt index 3ce81671..3ed49ff1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt @@ -5,7 +5,6 @@ package org.opensearch.commons.alerting import org.opensearch.action.search.SearchResponse -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse import org.opensearch.commons.alerting.action.AcknowledgeChainedAlertRequest @@ -37,6 +36,7 @@ import org.opensearch.core.action.ActionListener import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.transport.client.node.NodeClient /** * All the transport action plugin interfaces for the Alerting plugin diff --git a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt index 38359f32..40822303 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt @@ -4,7 +4,6 @@ */ package org.opensearch.commons.notifications -import org.opensearch.client.node.NodeClient import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.commons.notifications.action.CreateNotificationConfigRequest @@ -38,6 +37,7 @@ import org.opensearch.commons.utils.recreateObject import org.opensearch.core.action.ActionListener import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.transport.client.node.NodeClient /** * All the transport action plugin interfaces for the Notification plugin diff --git a/src/main/kotlin/org/opensearch/commons/utils/SecureClientWrapper.kt b/src/main/kotlin/org/opensearch/commons/utils/SecureClientWrapper.kt index ffdb1676..4179b54b 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/SecureClientWrapper.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/SecureClientWrapper.kt @@ -34,11 +34,11 @@ import org.opensearch.action.termvectors.TermVectorsRequest import org.opensearch.action.termvectors.TermVectorsResponse import org.opensearch.action.update.UpdateRequest import org.opensearch.action.update.UpdateResponse -import org.opensearch.client.Client import org.opensearch.common.action.ActionFuture import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.core.action.ActionListener import org.opensearch.core.action.ActionResponse +import org.opensearch.transport.client.Client /** * Wrapper class on [Client] with security context removed. diff --git a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt index 3c0e252c..cb526f60 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt @@ -11,7 +11,6 @@ import org.mockito.Mockito.mock import org.mockito.junit.jupiter.MockitoExtension import org.opensearch.action.ActionType import org.opensearch.action.search.SearchResponse -import org.opensearch.client.node.NodeClient import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse @@ -46,6 +45,7 @@ import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.rest.RestStatus import org.opensearch.index.seqno.SequenceNumbers import org.opensearch.search.SearchModule +import org.opensearch.transport.client.node.NodeClient @Suppress("UNCHECKED_CAST") @ExtendWith(MockitoExtension::class) diff --git a/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt b/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt index dd97cfda..eeecb7f9 100644 --- a/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt +++ b/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt @@ -18,7 +18,6 @@ import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.junit.jupiter.MockitoExtension import org.opensearch.action.ActionType -import org.opensearch.client.node.NodeClient import org.opensearch.commons.destination.response.LegacyDestinationResponse import org.opensearch.commons.notifications.action.CreateNotificationConfigRequest import org.opensearch.commons.notifications.action.CreateNotificationConfigResponse @@ -50,6 +49,7 @@ import org.opensearch.commons.notifications.model.SeverityType import org.opensearch.commons.notifications.model.Slack import org.opensearch.core.action.ActionListener import org.opensearch.core.rest.RestStatus +import org.opensearch.transport.client.node.NodeClient import java.time.Instant @Suppress("UNCHECKED_CAST")