diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 6801d17f7..050a4a26c 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -39,7 +39,6 @@ jobs: with: repository: 'opensearch-project/common-utils' path: common-utils - ref: '1.0.0-beta1' - name: Build common-utils working-directory: ./common-utils run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index cbcd9999f..0601ff630 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -46,7 +46,6 @@ jobs: with: repository: 'opensearch-project/common-utils' path: common-utils - ref: '1.0.0-beta1' - name: Build common-utils working-directory: ./common-utils run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 @@ -71,4 +70,4 @@ jobs: # path: alerting-artifacts # Publish to local maven - name: Publish to Maven Local - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 \ No newline at end of file + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 diff --git a/README.md b/README.md index 36ed4845c..ecc7cd8ac 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ When launching a cluster using one of the above commands, logs are placed in `al - `./gradlew :alerting:integTestRunner -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=es-integrationtest -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin` - - `./gradlew :alerting:integTestRunner -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=es-integrationtest -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin --tests "com.amazon.opendistroforelasticsearch.alerting.MonitorRunnerIT.test execute monitor returns search result"` + - `./gradlew :alerting:integTestRunner -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=es-integrationtest -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin --tests "org.opensearch.alerting.MonitorRunnerIT.test execute monitor returns search result"` ### Debugging diff --git a/alerting/build.gradle b/alerting/build.gradle index bca2924af..55f0b4c09 100644 --- a/alerting/build.gradle +++ b/alerting/build.gradle @@ -49,7 +49,7 @@ if (isSnapshot) { opensearchplugin { name 'opensearch-alerting' description 'Amazon OpenSearch alerting plugin' - classname 'com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin' + classname 'org.opensearch.alerting.AlertingPlugin' extendedPlugins = ['lang-painless'] } diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingPlugin.kt b/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt similarity index 64% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingPlugin.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt index 75e6dcaa7..340719456 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingPlugin.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt @@ -23,76 +23,76 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting +package org.opensearch.alerting -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.SearchMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.core.JobSweeper -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.action.node.ScheduledJobsStatsAction -import com.amazon.opendistroforelasticsearch.alerting.core.action.node.ScheduledJobsStatsTransportAction -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.core.resthandler.RestScheduledJobStatsHandler -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobScheduler -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestAcknowledgeAlertAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestDeleteDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestDeleteEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestDeleteEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestDeleteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestExecuteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestGetAlertsAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestGetDestinationsAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestGetEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestGetEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestGetMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestIndexDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestIndexEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestIndexEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestIndexMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestSearchEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestSearchEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.resthandler.RestSearchMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.script.TriggerScript -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportAcknowledgeAlertAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportDeleteDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportDeleteEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportDeleteEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportDeleteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportExecuteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportGetAlertsAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportGetDestinationsAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportGetEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportGetEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportGetMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportIndexDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportIndexEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportIndexEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportIndexMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportSearchEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportSearchEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.transport.TransportSearchMonitorAction +import org.opensearch.alerting.action.AcknowledgeAlertAction +import org.opensearch.alerting.action.DeleteDestinationAction +import org.opensearch.alerting.action.DeleteEmailAccountAction +import org.opensearch.alerting.action.DeleteEmailGroupAction +import org.opensearch.alerting.action.DeleteMonitorAction +import org.opensearch.alerting.action.ExecuteMonitorAction +import org.opensearch.alerting.action.GetAlertsAction +import org.opensearch.alerting.action.GetDestinationsAction +import org.opensearch.alerting.action.GetEmailAccountAction +import org.opensearch.alerting.action.GetEmailGroupAction +import org.opensearch.alerting.action.GetMonitorAction +import org.opensearch.alerting.action.IndexDestinationAction +import org.opensearch.alerting.action.IndexEmailAccountAction +import org.opensearch.alerting.action.IndexEmailGroupAction +import org.opensearch.alerting.action.IndexMonitorAction +import org.opensearch.alerting.action.SearchEmailAccountAction +import org.opensearch.alerting.action.SearchEmailGroupAction +import org.opensearch.alerting.action.SearchMonitorAction +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.core.JobSweeper +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.action.node.ScheduledJobsStatsAction +import org.opensearch.alerting.core.action.node.ScheduledJobsStatsTransportAction +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.core.resthandler.RestScheduledJobStatsHandler +import org.opensearch.alerting.core.schedule.JobScheduler +import org.opensearch.alerting.core.settings.ScheduledJobSettings +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.resthandler.RestAcknowledgeAlertAction +import org.opensearch.alerting.resthandler.RestDeleteDestinationAction +import org.opensearch.alerting.resthandler.RestDeleteEmailAccountAction +import org.opensearch.alerting.resthandler.RestDeleteEmailGroupAction +import org.opensearch.alerting.resthandler.RestDeleteMonitorAction +import org.opensearch.alerting.resthandler.RestExecuteMonitorAction +import org.opensearch.alerting.resthandler.RestGetAlertsAction +import org.opensearch.alerting.resthandler.RestGetDestinationsAction +import org.opensearch.alerting.resthandler.RestGetEmailAccountAction +import org.opensearch.alerting.resthandler.RestGetEmailGroupAction +import org.opensearch.alerting.resthandler.RestGetMonitorAction +import org.opensearch.alerting.resthandler.RestIndexDestinationAction +import org.opensearch.alerting.resthandler.RestIndexEmailAccountAction +import org.opensearch.alerting.resthandler.RestIndexEmailGroupAction +import org.opensearch.alerting.resthandler.RestIndexMonitorAction +import org.opensearch.alerting.resthandler.RestSearchEmailAccountAction +import org.opensearch.alerting.resthandler.RestSearchEmailGroupAction +import org.opensearch.alerting.resthandler.RestSearchMonitorAction +import org.opensearch.alerting.script.TriggerScript +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.settings.DestinationSettings +import org.opensearch.alerting.transport.TransportAcknowledgeAlertAction +import org.opensearch.alerting.transport.TransportDeleteDestinationAction +import org.opensearch.alerting.transport.TransportDeleteEmailAccountAction +import org.opensearch.alerting.transport.TransportDeleteEmailGroupAction +import org.opensearch.alerting.transport.TransportDeleteMonitorAction +import org.opensearch.alerting.transport.TransportExecuteMonitorAction +import org.opensearch.alerting.transport.TransportGetAlertsAction +import org.opensearch.alerting.transport.TransportGetDestinationsAction +import org.opensearch.alerting.transport.TransportGetEmailAccountAction +import org.opensearch.alerting.transport.TransportGetEmailGroupAction +import org.opensearch.alerting.transport.TransportGetMonitorAction +import org.opensearch.alerting.transport.TransportIndexDestinationAction +import org.opensearch.alerting.transport.TransportIndexEmailAccountAction +import org.opensearch.alerting.transport.TransportIndexEmailGroupAction +import org.opensearch.alerting.transport.TransportIndexMonitorAction +import org.opensearch.alerting.transport.TransportSearchEmailAccountAction +import org.opensearch.alerting.transport.TransportSearchEmailGroupAction +import org.opensearch.alerting.transport.TransportSearchMonitorAction import org.opensearch.action.ActionRequest import org.opensearch.action.ActionResponse import org.opensearch.client.Client @@ -134,7 +134,7 @@ import java.util.function.Supplier internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, ReloadablePlugin, Plugin() { override fun getContextWhitelists(): Map, List> { - val whitelist = WhitelistLoader.loadFromResourceFiles(javaClass, "com.amazon.opendistroforelasticsearch.alerting.txt") + val whitelist = WhitelistLoader.loadFromResourceFiles(javaClass, "org.opensearch.alerting.txt") return mapOf(TriggerScript.CONTEXT to listOf(whitelist)) } diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunner.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt index 36b47a439..d82c03a91 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt @@ -24,51 +24,51 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting - -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertError -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.alerts.moveAlerts -import com.amazon.opendistroforelasticsearch.alerting.core.JobRunner -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.InjectorContextElement -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.convertToMap -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.firstFailureOrNull -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.retry -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.suspendUntil -import com.amazon.opendistroforelasticsearch.alerting.model.ActionExecutionResult -import com.amazon.opendistroforelasticsearch.alerting.model.ActionRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ACKNOWLEDGED -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ACTIVE -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.COMPLETED -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.DELETED -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ERROR -import com.amazon.opendistroforelasticsearch.alerting.model.AlertingConfigAccessor -import com.amazon.opendistroforelasticsearch.alerting.model.InputRunResults -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.MonitorRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger -import com.amazon.opendistroforelasticsearch.alerting.model.TriggerRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action.Companion.MESSAGE -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action.Companion.MESSAGE_ID -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action.Companion.SUBJECT -import com.amazon.opendistroforelasticsearch.alerting.model.destination.DestinationContextFactory -import com.amazon.opendistroforelasticsearch.alerting.script.TriggerExecutionContext -import com.amazon.opendistroforelasticsearch.alerting.script.TriggerScript -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_BACKOFF_COUNT -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_BACKOFF_MILLIS -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.MOVE_ALERTS_BACKOFF_COUNT -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.MOVE_ALERTS_BACKOFF_MILLIS -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.HOST_DENY_LIST -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.loadDestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils -import com.amazon.opendistroforelasticsearch.alerting.util.addUserBackendRolesFilter -import com.amazon.opendistroforelasticsearch.alerting.util.isADMonitor -import com.amazon.opendistroforelasticsearch.alerting.util.isAllowed +package org.opensearch.alerting + +import org.opensearch.alerting.alerts.AlertError +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.alerts.moveAlerts +import org.opensearch.alerting.core.JobRunner +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.elasticapi.InjectorContextElement +import org.opensearch.alerting.elasticapi.convertToMap +import org.opensearch.alerting.elasticapi.firstFailureOrNull +import org.opensearch.alerting.elasticapi.retry +import org.opensearch.alerting.elasticapi.suspendUntil +import org.opensearch.alerting.model.ActionExecutionResult +import org.opensearch.alerting.model.ActionRunResult +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Alert.State.ACKNOWLEDGED +import org.opensearch.alerting.model.Alert.State.ACTIVE +import org.opensearch.alerting.model.Alert.State.COMPLETED +import org.opensearch.alerting.model.Alert.State.DELETED +import org.opensearch.alerting.model.Alert.State.ERROR +import org.opensearch.alerting.model.AlertingConfigAccessor +import org.opensearch.alerting.model.InputRunResults +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.MonitorRunResult +import org.opensearch.alerting.model.Trigger +import org.opensearch.alerting.model.TriggerRunResult +import org.opensearch.alerting.model.action.Action +import org.opensearch.alerting.model.action.Action.Companion.MESSAGE +import org.opensearch.alerting.model.action.Action.Companion.MESSAGE_ID +import org.opensearch.alerting.model.action.Action.Companion.SUBJECT +import org.opensearch.alerting.model.destination.DestinationContextFactory +import org.opensearch.alerting.script.TriggerExecutionContext +import org.opensearch.alerting.script.TriggerScript +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_BACKOFF_COUNT +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_BACKOFF_MILLIS +import org.opensearch.alerting.settings.AlertingSettings.Companion.MOVE_ALERTS_BACKOFF_COUNT +import org.opensearch.alerting.settings.AlertingSettings.Companion.MOVE_ALERTS_BACKOFF_MILLIS +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.settings.DestinationSettings.Companion.HOST_DENY_LIST +import org.opensearch.alerting.settings.DestinationSettings.Companion.loadDestinationSettings +import org.opensearch.alerting.util.IndexUtils +import org.opensearch.alerting.util.addUserBackendRolesFilter +import org.opensearch.alerting.util.isADMonitor +import org.opensearch.alerting.util.isAllowed import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertAction.kt index 9e5e16854..552f49c24 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequest.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequest.kt index 489c6c01b..a354a55db 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponse.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponse.kt index 8ebc0e707..67ae8c9a9 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponse.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Alert +import org.opensearch.alerting.model.Alert import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationAction.kt index b52dfac6f..b22663dc5 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.delete.DeleteResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationRequest.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationRequest.kt index 1a5ea5bd0..eb2182661 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteDestinationRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountAction.kt index 4bf02b031..3d18bd0a2 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.delete.DeleteResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequest.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequest.kt index 6f2a9bf5e..2c332c6dd 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupAction.kt index 3d3e69694..ad6758ec9 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.delete.DeleteResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequest.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequest.kt index d57be3069..bf2e79332 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorAction.kt index af1345a04..0a6389713 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.delete.DeleteResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorRequest.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorRequest.kt index 2f16f2f04..5c1f65076 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/DeleteMonitorRequest.kt @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorAction.kt index 553d5aff8..06aaca23b 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequest.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequest.kt index c018ed8cc..9075491b5 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor +import org.opensearch.alerting.model.Monitor import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponse.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponse.kt index bcd8772a9..171a1ba9a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponse.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.MonitorRunResult +import org.opensearch.alerting.model.MonitorRunResult import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsAction.kt index 469b1a8da..3dac58846 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsRequest.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsRequest.kt index 078b60cb4..44f3f5a6d 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Table +import org.opensearch.alerting.model.Table import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsResponse.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsResponse.kt index fdfcdb20d..f9cbb15db 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetAlertsResponse.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Alert +import org.opensearch.alerting.model.Alert import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsAction.kt index 8f4a7b7f0..916db936c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsRequest.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsRequest.kt index c1967dbf3..c2e2eb281 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Table +import org.opensearch.alerting.model.Table import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsResponse.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsResponse.kt index 4d2fe1173..a0646e85e 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetDestinationsResponse.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.Destination import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountAction.kt index a2c2eda12..50b757d38 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountRequest.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountRequest.kt index 41020c581..d612eec5a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountResponse.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountResponse.kt index f6d7bb371..b6f37af63 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailAccountResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupAction.kt index ce66daec5..d9db9b2ee 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupRequest.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupRequest.kt index ca05a2b0a..7b6f5146c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupResponse.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupResponse.kt index 04460fb5b..6acfb5884 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetEmailGroupResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorAction.kt index a91514e57..c9de8ba67 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorRequest.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorRequest.kt index ba0fd7d8a..a5c66c4c0 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorResponse.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorResponse.kt index 2a8d5ac0d..240552567 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationAction.kt index de927291b..94805204c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationRequest.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationRequest.kt index 4ebf56213..f11a4c224 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.Destination import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationResponse.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationResponse.kt index 58af8291a..709746468 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexDestinationResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountAction.kt index 9788c9cf3..3a7762c1f 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequest.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequest.kt index ffd8c7973..af1667830 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponse.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponse.kt index 8172427e8..f4046f01c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupAction.kt index 4d43f8d1f..8ab339880 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequest.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequest.kt index dd7e3bdf6..6a8e7e3ce 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.model.destination.email.EmailGroup import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponse.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponse.kt index a1ebfcb54..5972a955c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorAction.kt index 84e465ea5..0d1794c5a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorRequest.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorRequest.kt index 30f14244d..2e37347f4 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorRequest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor +import org.opensearch.alerting.model.Monitor import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponse.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorResponse.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponse.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorResponse.kt index 5b48fe3d2..83ac65375 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponse.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/IndexMonitorResponse.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util._SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._PRIMARY_TERM +import org.opensearch.alerting.util._SEQ_NO +import org.opensearch.alerting.util._VERSION import org.opensearch.action.ActionResponse import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailAccountAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailAccountAction.kt index 71781b171..89f67ce24 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailAccountAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.search.SearchResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailGroupAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailGroupAction.kt index 5951bc924..1d2846f55 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchEmailGroupAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.search.SearchResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorAction.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorAction.kt index 6bcebfa6b..e168d94c2 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionType import org.opensearch.action.search.SearchResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequest.kt b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorRequest.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequest.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorRequest.kt index 013822036..f7a8ced95 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequest.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertError.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertError.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertError.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertError.kt index f14903eef..436474d84 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertError.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertError.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.alerts +package org.opensearch.alerting.alerts -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.instant -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.elasticapi.instant +import org.opensearch.alerting.elasticapi.optionalTimeField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.io.stream.Writeable diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndices.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndices.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt index ac26239a4..b7e2a96e9 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndices.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.alerts - -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices.Companion.HISTORY_WRITE_INDEX -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_INDEX_MAX_AGE -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_MAX_DOCS -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_ROLLOVER_PERIOD -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT +package org.opensearch.alerting.alerts + +import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX +import org.opensearch.alerting.alerts.AlertIndices.Companion.HISTORY_WRITE_INDEX +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_INDEX_MAX_AGE +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_MAX_DOCS +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_ROLLOVER_PERIOD +import org.opensearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT import org.apache.logging.log4j.LogManager -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.suspendUntil -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_ENABLED -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils +import org.opensearch.alerting.elasticapi.suspendUntil +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERT_HISTORY_ENABLED +import org.opensearch.alerting.util.IndexUtils import org.apache.lucene.index.IndexNotFoundException import org.opensearch.ResourceAlreadyExistsException import org.opensearch.action.admin.cluster.state.ClusterStateRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertMover.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt similarity index 91% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertMover.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt index 42b4bf761..c9c072b67 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertMover.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.alerts +package org.opensearch.alerting.alerts -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices.Companion.HISTORY_WRITE_INDEX -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.suspendUntil +import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX +import org.opensearch.alerting.alerts.AlertIndices.Companion.HISTORY_WRITE_INDEX +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.elasticapi.suspendUntil import org.opensearch.action.bulk.BulkRequest import org.opensearch.action.bulk.BulkResponse import org.opensearch.action.delete.DeleteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/ActionExecutionResult.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/ActionExecutionResult.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/ActionExecutionResult.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/ActionExecutionResult.kt index 529473f2f..4ef3ab890 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/ActionExecutionResult.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/ActionExecutionResult.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.instant -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.elasticapi.instant +import org.opensearch.alerting.elasticapi.optionalTimeField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.io.stream.Writeable diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Alert.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/Alert.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Alert.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/Alert.kt index d6c91ead6..62ea65758 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Alert.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/Alert.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertError -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.instant -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalUserField -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.alerts.AlertError +import org.opensearch.alerting.elasticapi.instant +import org.opensearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.elasticapi.optionalUserField +import org.opensearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION +import org.opensearch.commons.authuser.User import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.io.stream.Writeable diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertingConfigAccessor.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertingConfigAccessor.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt index 999d5758d..bdd228334 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertingConfigAccessor.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.suspendUntil -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.elasticapi.suspendUntil +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailGroup import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.opensearch.action.get.GetRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Monitor.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/Monitor.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Monitor.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/Monitor.kt index 6a7c36b21..e06b4efea 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Monitor.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/Monitor.kt @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.core.model.CronSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.Input -import com.amazon.opendistroforelasticsearch.alerting.core.model.Schedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.instant -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalUserField -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.MONITOR_MAX_INPUTS -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.MONITOR_MAX_TRIGGERS -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION -import com.amazon.opendistroforelasticsearch.alerting.util._ID -import com.amazon.opendistroforelasticsearch.alerting.util._VERSION -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.core.model.CronSchedule +import org.opensearch.alerting.core.model.Input +import org.opensearch.alerting.core.model.Schedule +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.elasticapi.instant +import org.opensearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.elasticapi.optionalUserField +import org.opensearch.alerting.settings.AlertingSettings.Companion.MONITOR_MAX_INPUTS +import org.opensearch.alerting.settings.AlertingSettings.Companion.MONITOR_MAX_TRIGGERS +import org.opensearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION +import org.opensearch.alerting.util._ID +import org.opensearch.alerting.util._VERSION +import org.opensearch.commons.authuser.User import org.opensearch.common.CheckedFunction import org.opensearch.common.ParseField import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/MonitorRunResult.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/MonitorRunResult.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/MonitorRunResult.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/MonitorRunResult.kt index 5c371686c..e1909412c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/MonitorRunResult.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/MonitorRunResult.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertError -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.alerts.AlertError +import org.opensearch.alerting.elasticapi.optionalTimeField import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Table.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/Table.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Table.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/Table.kt index 3077c81a0..515d7a567 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Table.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/Table.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Trigger.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/Trigger.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Trigger.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/Trigger.kt index 285fdeb0b..6a2218554 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/Trigger.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/Trigger.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action +import org.opensearch.alerting.model.action.Action import org.opensearch.common.UUIDs import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Action.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/action/Action.kt similarity index 99% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Action.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/action/Action.kt index 73e6f58d2..f84b9d5bf 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Action.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/action/Action.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.action +package org.opensearch.alerting.model.action import org.opensearch.common.UUIDs import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Throttle.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/action/Throttle.kt similarity index 98% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Throttle.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/action/Throttle.kt index c0611ea4f..d84998696 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/action/Throttle.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/action/Throttle.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.action +package org.opensearch.alerting.model.action import org.apache.commons.codec.binary.StringUtils import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Chime.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Chime.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Chime.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Chime.kt index e6b38acf5..5a44c93ac 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Chime.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Chime.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string +import org.opensearch.alerting.elasticapi.string import org.opensearch.common.Strings import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/CustomWebhook.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/CustomWebhook.kt similarity index 98% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/CustomWebhook.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/CustomWebhook.kt index 6f63575a6..09c6e22d3 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/CustomWebhook.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/CustomWebhook.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination import org.opensearch.common.Strings import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Destination.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Destination.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Destination.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Destination.kt index 9868342a7..850ffa439 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Destination.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Destination.kt @@ -24,24 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination -import com.amazon.opendistroforelasticsearch.alerting.destination.Notification -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.message.ChimeMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.message.CustomWebhookMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.message.EmailMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.message.SlackMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.convertToMap -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.instant -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalUserField -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Email -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION -import com.amazon.opendistroforelasticsearch.alerting.util.isHostInDenylist -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.destination.Notification +import org.opensearch.alerting.destination.message.BaseMessage +import org.opensearch.alerting.destination.message.ChimeMessage +import org.opensearch.alerting.destination.message.CustomWebhookMessage +import org.opensearch.alerting.destination.message.EmailMessage +import org.opensearch.alerting.destination.message.SlackMessage +import org.opensearch.alerting.destination.response.DestinationResponse +import org.opensearch.alerting.elasticapi.convertToMap +import org.opensearch.alerting.elasticapi.instant +import org.opensearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.elasticapi.optionalUserField +import org.opensearch.alerting.model.destination.email.Email +import org.opensearch.alerting.util.DestinationType +import org.opensearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION +import org.opensearch.alerting.util.isHostInDenylist +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput @@ -305,7 +305,7 @@ data class Destination( } validateDestinationUri(destinationMessage, denyHostRanges) - val response = Notification.publish(destinationMessage) as DestinationResponse + val response = Notification.publish(destinationMessage) as org.opensearch.alerting.destination.response.DestinationResponse responseContent = response.responseContent responseStatusCode = response.statusCode diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContext.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContext.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContext.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContext.kt index c1f7652b8..a909f9eea 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContext.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContext.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailAccount /** * DestinationContext is a value object that contains additional context information needed at runtime to publish to a destination. diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContextFactory.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContextFactory.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt index a9fce0706..d82828380 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/DestinationContextFactory.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination - -import com.amazon.opendistroforelasticsearch.alerting.model.AlertingConfigAccessor -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Email -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Recipient -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.SecureDestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +package org.opensearch.alerting.model.destination + +import org.opensearch.alerting.model.AlertingConfigAccessor +import org.opensearch.alerting.model.destination.email.Email +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.Recipient +import org.opensearch.alerting.settings.DestinationSettings.Companion.SecureDestinationSettings +import org.opensearch.alerting.util.DestinationType import org.opensearch.client.Client import org.opensearch.common.settings.SecureString import org.opensearch.common.xcontent.NamedXContentRegistry diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/SNS.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/SNS.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/SNS.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/SNS.kt index d8be8927f..47d3a48a0 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/SNS.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/SNS.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination import org.opensearch.common.xcontent.ToXContent import org.opensearch.common.xcontent.XContentBuilder diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Slack.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Slack.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Slack.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Slack.kt index e5d0eb1b9..ad2928f68 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/Slack.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/Slack.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination +package org.opensearch.alerting.model.destination -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string +import org.opensearch.alerting.elasticapi.string import org.opensearch.common.Strings import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/Email.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/Email.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/Email.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/Email.kt index 039f89e09..6400bad74 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/Email.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/Email.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination.email +package org.opensearch.alerting.model.destination.email -import com.amazon.opendistroforelasticsearch.alerting.util.isValidEmail +import org.opensearch.alerting.util.isValidEmail import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.io.stream.Writeable diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailAccount.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailAccount.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailAccount.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailAccount.kt index b0f059a6d..8f921af74 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailAccount.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailAccount.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination.email +package org.opensearch.alerting.model.destination.email -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION -import com.amazon.opendistroforelasticsearch.alerting.util.isValidEmail +import org.opensearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION +import org.opensearch.alerting.util.isValidEmail import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.io.stream.Writeable diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailGroup.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailGroup.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailGroup.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailGroup.kt index 42cc65961..00c2474bd 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/destination/email/EmailGroup.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/email/EmailGroup.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model.destination.email +package org.opensearch.alerting.model.destination.email -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION -import com.amazon.opendistroforelasticsearch.alerting.util.isValidEmail +import org.opensearch.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION +import org.opensearch.alerting.util.isValidEmail import org.opensearch.common.Strings import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/AsyncActionHandler.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt similarity index 94% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/AsyncActionHandler.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt index 164679d0e..173b9ab9c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/AsyncActionHandler.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler import org.opensearch.client.node.NodeClient import org.opensearch.rest.BytesRestResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestAcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt similarity index 91% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestAcknowledgeAlertAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt index be01da627..dcbfc20d3 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestAcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertAction -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertRequest -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.AcknowledgeAlertAction +import org.opensearch.alerting.action.AcknowledgeAlertRequest +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest.RefreshPolicy diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteDestinationAction.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteDestinationAction.kt index 2920c77e1..c0c29ff04 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteDestinationAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteDestinationRequest -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.DeleteDestinationAction +import org.opensearch.alerting.action.DeleteDestinationRequest +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailAccountAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailAccountAction.kt index c796be1b3..16e13b7b6 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailAccountAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.DeleteEmailAccountAction +import org.opensearch.alerting.action.DeleteEmailAccountRequest +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailGroupAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailGroupAction.kt index c701e4a52..1666e2d12 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteEmailGroupAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.DeleteEmailGroupAction +import org.opensearch.alerting.action.DeleteEmailGroupRequest +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt index 314d2154b..2ac647c1d 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestDeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt @@ -23,13 +23,13 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.DeleteMonitorAction +import org.opensearch.alerting.action.DeleteMonitorRequest +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest.RefreshPolicy diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestExecuteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestExecuteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt index 6a894b3d5..b3f1b3e93 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestExecuteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.ExecuteMonitorAction +import org.opensearch.alerting.action.ExecuteMonitorRequest +import org.opensearch.alerting.model.Monitor import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient import org.opensearch.common.unit.TimeValue diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetAlertsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt index 27b3663e4..f8b0f6109 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Table +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.GetAlertsAction +import org.opensearch.alerting.action.GetAlertsRequest +import org.opensearch.alerting.model.Table import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetDestinationsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetDestinationsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt index 07fdc24a0..02a120e37 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetDestinationsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Table -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.GetDestinationsAction +import org.opensearch.alerting.action.GetDestinationsRequest +import org.opensearch.alerting.model.Table +import org.opensearch.alerting.util.context import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt index 0d47b964b..cea5bb8e7 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.GetEmailAccountAction +import org.opensearch.alerting.action.GetEmailAccountRequest +import org.opensearch.alerting.util.context import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler.Route diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt index 491768e31..f969d3e0b 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.GetEmailGroupAction +import org.opensearch.alerting.action.GetEmailGroupRequest +import org.opensearch.alerting.util.context import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler.Route diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt index b970a6402..3dca492d1 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestGetMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt @@ -23,12 +23,12 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.GetMonitorAction +import org.opensearch.alerting.action.GetMonitorRequest +import org.opensearch.alerting.util.context import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexDestinationAction.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexDestinationAction.kt index fefc98d55..6f5f16fc5 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexDestinationAction.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationResponse -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.util.IF_PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util.IF_SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.IndexDestinationAction +import org.opensearch.alerting.action.IndexDestinationRequest +import org.opensearch.alerting.action.IndexDestinationResponse +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.util.IF_PRIMARY_TERM +import org.opensearch.alerting.util.IF_SEQ_NO +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.opensearch.action.support.WriteRequest import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailAccountAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailAccountAction.kt index 645e592a4..405041cbf 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailAccountAction.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountResponse -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.util.IF_PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util.IF_SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.IndexEmailAccountAction +import org.opensearch.alerting.action.IndexEmailAccountRequest +import org.opensearch.alerting.action.IndexEmailAccountResponse +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.util.IF_PRIMARY_TERM +import org.opensearch.alerting.util.IF_SEQ_NO +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.opensearch.action.support.WriteRequest import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailGroupAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailGroupAction.kt index 694e74104..73fabbf79 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexEmailGroupAction.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupResponse -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.util.IF_PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util.IF_SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.IndexEmailGroupAction +import org.opensearch.alerting.action.IndexEmailGroupRequest +import org.opensearch.alerting.action.IndexEmailGroupResponse +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.util.IF_PRIMARY_TERM +import org.opensearch.alerting.util.IF_SEQ_NO +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.opensearch.action.support.WriteRequest import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt similarity index 87% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt index a166503a2..875c11e38 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestIndexMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt @@ -23,16 +23,16 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorResponse -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.util.IF_PRIMARY_TERM -import com.amazon.opendistroforelasticsearch.alerting.util.IF_SEQ_NO -import com.amazon.opendistroforelasticsearch.alerting.util.REFRESH +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.IndexMonitorAction +import org.opensearch.alerting.action.IndexMonitorRequest +import org.opensearch.alerting.action.IndexMonitorResponse +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.util.IF_PRIMARY_TERM +import org.opensearch.alerting.util.IF_SEQ_NO +import org.opensearch.alerting.util.REFRESH import org.apache.logging.log4j.LogManager import org.opensearch.action.support.WriteRequest import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt index 305aa54bc..3e135509d 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.SearchEmailAccountAction +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.util.context import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt index e59843e6b..3468792ec 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.SearchEmailGroupAction +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.util.context import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.client.node.NodeClient diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt index ddbe6b428..4f839e884 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/RestSearchMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt @@ -23,15 +23,15 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin -import com.amazon.opendistroforelasticsearch.alerting.action.SearchMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.SearchMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.context +import org.opensearch.alerting.AlertingPlugin +import org.opensearch.alerting.action.SearchMonitorAction +import org.opensearch.alerting.action.SearchMonitorRequest +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.context import org.apache.logging.log4j.LogManager import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerExecutionContext.kt b/alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerExecutionContext.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerExecutionContext.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerExecutionContext.kt index cef7bdf1f..779183d61 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerExecutionContext.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerExecutionContext.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.script +package org.opensearch.alerting.script -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.MonitorRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.MonitorRunResult +import org.opensearch.alerting.model.Trigger import java.time.Instant data class TriggerExecutionContext( diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerScript.kt b/alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerScript.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerScript.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerScript.kt index dca6abaee..722f8c9a0 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/script/TriggerScript.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/script/TriggerScript.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.script +package org.opensearch.alerting.script import org.opensearch.script.Script import org.opensearch.script.ScriptContext diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/AlertingSettings.kt b/alerting/src/main/kotlin/org/opensearch/alerting/settings/AlertingSettings.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/AlertingSettings.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/settings/AlertingSettings.kt index ca5adff05..190243241 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/AlertingSettings.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/settings/AlertingSettings.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.settings +package org.opensearch.alerting.settings -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin +import org.opensearch.alerting.AlertingPlugin import org.opensearch.common.settings.Setting import org.opensearch.common.unit.TimeValue import java.util.concurrent.TimeUnit diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/DestinationSettings.kt b/alerting/src/main/kotlin/org/opensearch/alerting/settings/DestinationSettings.kt similarity index 97% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/DestinationSettings.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/settings/DestinationSettings.kt index 609e8b131..18ab6f2d4 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/DestinationSettings.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/settings/DestinationSettings.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.settings +package org.opensearch.alerting.settings -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.util.DestinationType import org.opensearch.common.settings.SecureSetting import org.opensearch.common.settings.SecureString import org.opensearch.common.settings.Setting diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportAcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportAcknowledgeAlertAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt index 9c459446e..a49b6b753 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportAcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt @@ -9,15 +9,15 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertAction -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertRequest -import com.amazon.opendistroforelasticsearch.alerting.action.AcknowledgeAlertResponse -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.optionalTimeField -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException +import org.opensearch.alerting.action.AcknowledgeAlertAction +import org.opensearch.alerting.action.AcknowledgeAlertRequest +import org.opensearch.alerting.action.AcknowledgeAlertResponse +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.elasticapi.optionalTimeField +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.util.AlertingException import org.apache.logging.log4j.LogManager import org.opensearch.action.ActionListener import org.opensearch.action.bulk.BulkRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteDestinationAction.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteDestinationAction.kt index bf72d022a..3b8a10703 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteDestinationAction.kt @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteDestinationRequest -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.checkFilterByUserBackendRoles -import com.amazon.opendistroforelasticsearch.alerting.util.checkUserFilterByPermissions -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.action.DeleteDestinationAction +import org.opensearch.alerting.action.DeleteDestinationRequest +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.checkFilterByUserBackendRoles +import org.opensearch.alerting.util.checkUserFilterByPermissions +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener @@ -80,7 +80,7 @@ class TransportDeleteDestinationAction @Inject constructor( } override fun doExecute(task: Task, request: DeleteDestinationRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) val deleteRequest = DeleteRequest(ScheduledJob.SCHEDULED_JOBS_INDEX, request.destinationId) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailAccountAction.kt similarity index 84% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailAccountAction.kt index 2501a9235..649650506 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailAccountAction.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.DeleteEmailAccountAction +import org.opensearch.alerting.action.DeleteEmailAccountRequest +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener import org.opensearch.action.delete.DeleteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailGroupAction.kt similarity index 84% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailGroupAction.kt index 109fd6b36..5b3219fb4 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteEmailGroupAction.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.DeleteEmailGroupAction +import org.opensearch.alerting.action.DeleteEmailGroupRequest +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener import org.opensearch.action.delete.DeleteRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt index 20dc9e3a5..7505ce940 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportDeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.DeleteMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.checkFilterByUserBackendRoles -import com.amazon.opendistroforelasticsearch.alerting.util.checkUserFilterByPermissions -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.action.DeleteMonitorAction +import org.opensearch.alerting.action.DeleteMonitorRequest +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.checkFilterByUserBackendRoles +import org.opensearch.alerting.util.checkUserFilterByPermissions +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener @@ -78,7 +78,7 @@ class TransportDeleteMonitorAction @Inject constructor( } override fun doExecute(task: Task, request: DeleteMonitorRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) val deleteRequest = DeleteRequest(ScheduledJob.SCHEDULED_JOBS_INDEX, request.monitorId) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportExecuteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt similarity index 86% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportExecuteMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt index 52c51b961..6e928c8c0 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportExecuteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt @@ -9,17 +9,17 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.MonitorRunner -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.action.ExecuteMonitorResponse -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.MonitorRunner +import org.opensearch.alerting.action.ExecuteMonitorAction +import org.opensearch.alerting.action.ExecuteMonitorRequest +import org.opensearch.alerting.action.ExecuteMonitorResponse +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.util.AlertingException +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext @@ -54,7 +54,7 @@ class TransportExecuteMonitorAction @Inject constructor( override fun doExecute(task: Task, execMonitorRequest: ExecuteMonitorRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetAlertsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt index a90002949..fc38c0f2a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport - -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsRequest -import com.amazon.opendistroforelasticsearch.alerting.action.GetAlertsResponse -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.addFilter -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting.transport + +import org.opensearch.alerting.action.GetAlertsAction +import org.opensearch.alerting.action.GetAlertsRequest +import org.opensearch.alerting.action.GetAlertsResponse +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.elasticapi.addFilter +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.action.ActionListener import org.opensearch.action.search.SearchRequest @@ -86,7 +86,7 @@ class TransportGetAlertsAction @Inject constructor( actionListener: ActionListener ) { val userStr = client.threadPool().threadContext.getTransient( - ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT + ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT ) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetDestinationsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt similarity index 89% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetDestinationsAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt index be3959f28..3cd910e7f 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetDestinationsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport - -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsRequest -import com.amazon.opendistroforelasticsearch.alerting.action.GetDestinationsResponse -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.addFilter -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting.transport + +import org.opensearch.alerting.action.GetDestinationsAction +import org.opensearch.alerting.action.GetDestinationsRequest +import org.opensearch.alerting.action.GetDestinationsResponse +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.elasticapi.addFilter +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.action.ActionListener import org.opensearch.action.search.SearchRequest @@ -89,7 +89,7 @@ class TransportGetDestinationsAction @Inject constructor( actionListener: ActionListener ) { val userStr = client.threadPool().threadContext.getTransient( - ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT + ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT ) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt similarity index 85% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt index 284d9b4b4..af8b4f47e 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailAccountResponse -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.GetEmailAccountAction +import org.opensearch.alerting.action.GetEmailAccountRequest +import org.opensearch.alerting.action.GetEmailAccountResponse +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt similarity index 85% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt index 416dd83f2..0caf30b04 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.action.GetEmailGroupResponse -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.GetEmailGroupAction +import org.opensearch.alerting.action.GetEmailGroupRequest +import org.opensearch.alerting.action.GetEmailGroupResponse +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt similarity index 84% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt index 9514e62d1..c6ff3517e 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportGetMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.action.GetMonitorResponse -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.checkFilterByUserBackendRoles -import com.amazon.opendistroforelasticsearch.alerting.util.checkUserFilterByPermissions -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.action.GetMonitorAction +import org.opensearch.alerting.action.GetMonitorRequest +import org.opensearch.alerting.action.GetMonitorResponse +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.checkFilterByUserBackendRoles +import org.opensearch.alerting.util.checkUserFilterByPermissions +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener @@ -76,7 +76,7 @@ class TransportGetMonitorAction @Inject constructor( } override fun doExecute(task: Task, getMonitorRequest: GetMonitorRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexDestinationAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexDestinationAction.kt similarity index 91% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexDestinationAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexDestinationAction.kt index 784baef0e..27d7395fb 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexDestinationAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexDestinationAction.kt @@ -9,22 +9,22 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexDestinationResponse -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils -import com.amazon.opendistroforelasticsearch.alerting.util.checkFilterByUserBackendRoles -import com.amazon.opendistroforelasticsearch.alerting.util.checkUserFilterByPermissions -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.action.IndexDestinationAction +import org.opensearch.alerting.action.IndexDestinationRequest +import org.opensearch.alerting.action.IndexDestinationResponse +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.settings.DestinationSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.IndexUtils +import org.opensearch.alerting.util.checkFilterByUserBackendRoles +import org.opensearch.alerting.util.checkUserFilterByPermissions +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener @@ -79,7 +79,7 @@ class TransportIndexDestinationAction @Inject constructor( } override fun doExecute(task: Task, request: IndexDestinationRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailAccountAction.kt similarity index 91% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailAccountAction.kt index 772ca73ef..ad41c0b41 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailAccountAction.kt @@ -24,21 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailAccountResponse -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils +import org.opensearch.alerting.action.IndexEmailAccountAction +import org.opensearch.alerting.action.IndexEmailAccountRequest +import org.opensearch.alerting.action.IndexEmailAccountResponse +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT +import org.opensearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType +import org.opensearch.alerting.util.IndexUtils import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailGroupAction.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailGroupAction.kt index 9ef8f3209..dd2b03c1a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexEmailGroupAction.kt @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport - -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexEmailGroupResponse -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils +package org.opensearch.alerting.transport + +import org.opensearch.alerting.action.IndexEmailGroupAction +import org.opensearch.alerting.action.IndexEmailGroupRequest +import org.opensearch.alerting.action.IndexEmailGroupResponse +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE +import org.opensearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType +import org.opensearch.alerting.util.IndexUtils import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt similarity index 90% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt index 461ea20b9..d8d855a7c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt @@ -24,32 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport - -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.action.IndexMonitorResponse -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.ALERTING_MAX_MONITORS -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.FILTER_BY_BACKEND_ROLES -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.MAX_ACTION_THROTTLE_VALUE -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.IndexUtils -import com.amazon.opendistroforelasticsearch.alerting.util.addUserBackendRolesFilter -import com.amazon.opendistroforelasticsearch.alerting.util.checkFilterByUserBackendRoles -import com.amazon.opendistroforelasticsearch.alerting.util.checkUserFilterByPermissions -import com.amazon.opendistroforelasticsearch.alerting.util.isADMonitor -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting.transport + +import org.opensearch.alerting.action.IndexMonitorAction +import org.opensearch.alerting.action.IndexMonitorRequest +import org.opensearch.alerting.action.IndexMonitorResponse +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOB_TYPE +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.settings.AlertingSettings.Companion.ALERTING_MAX_MONITORS +import org.opensearch.alerting.settings.AlertingSettings.Companion.FILTER_BY_BACKEND_ROLES +import org.opensearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT +import org.opensearch.alerting.settings.AlertingSettings.Companion.MAX_ACTION_THROTTLE_VALUE +import org.opensearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.IndexUtils +import org.opensearch.alerting.util.addUserBackendRolesFilter +import org.opensearch.alerting.util.checkFilterByUserBackendRoles +import org.opensearch.alerting.util.checkUserFilterByPermissions +import org.opensearch.alerting.util.isADMonitor +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchSecurityException import org.opensearch.OpenSearchStatusException @@ -116,7 +116,7 @@ class TransportIndexMonitorAction @Inject constructor( override fun doExecute(task: Task, request: IndexMonitorRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailAccountAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt index 4e12e9d34..f3c6cfc4a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailAccountAction -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.SearchEmailAccountAction +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener import org.opensearch.action.search.SearchRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt similarity index 88% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailGroupAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt index 1cb0c6bf1..26e5dc22a 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.SearchEmailGroupAction -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.action.SearchEmailGroupAction +import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST +import org.opensearch.alerting.util.AlertingException +import org.opensearch.alerting.util.DestinationType import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener import org.opensearch.action.search.SearchRequest diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt similarity index 85% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchMonitorAction.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt index 3d4d70b85..a939a9d6c 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportSearchMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.transport +package org.opensearch.alerting.transport -import com.amazon.opendistroforelasticsearch.alerting.action.SearchMonitorAction -import com.amazon.opendistroforelasticsearch.alerting.action.SearchMonitorRequest -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.addFilter -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.util.AlertingException -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.action.SearchMonitorAction +import org.opensearch.alerting.action.SearchMonitorRequest +import org.opensearch.alerting.elasticapi.addFilter +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.util.AlertingException +import org.opensearch.commons.ConfigConstants +import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.action.ActionListener import org.opensearch.action.search.SearchRequest @@ -64,7 +64,7 @@ class TransportSearchMonitorAction @Inject constructor( } override fun doExecute(task: Task, searchMonitorRequest: SearchMonitorRequest, actionListener: ActionListener) { - val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER_INFO_THREAD_CONTEXT) + val userStr = client.threadPool().threadContext.getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT) log.debug("User and roles string from thread context: $userStr") val user: User? = User.parse(userStr) diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingException.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingException.kt similarity index 98% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingException.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingException.kt index 24896f43b..78c85ace8 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingException.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingException.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingUtils.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtils.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingUtils.kt index 9b7b14731..d98007376 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/AlertingUtils.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.destination.message.BaseMessage +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.settings.DestinationSettings +import org.opensearch.commons.authuser.User import org.opensearch.OpenSearchStatusException import org.opensearch.action.ActionListener import org.opensearch.rest.RestStatus diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtils.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtils.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtils.kt index a889eb76b..d045b5c6e 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtils.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.model.Monitor +import org.opensearch.commons.authuser.User import org.apache.lucene.search.join.ScoreMode import org.opensearch.index.query.BoolQueryBuilder import org.opensearch.index.query.NestedQueryBuilder diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/DestinationType.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/DestinationType.kt similarity index 95% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/DestinationType.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/DestinationType.kt index d57e2a7b1..7ed604040 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/DestinationType.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/DestinationType.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util enum class DestinationType(val value: String) { CHIME("chime"), diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt similarity index 96% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtils.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt index f6f457b3f..94e7b4f9b 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.core.ScheduledJobIndices import org.opensearch.action.ActionListener import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest import org.opensearch.action.support.master.AcknowledgedResponse diff --git a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/RestHandlerUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/RestHandlerUtils.kt similarity index 93% rename from alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/RestHandlerUtils.kt rename to alerting/src/main/kotlin/org/opensearch/alerting/util/RestHandlerUtils.kt index 9e24247ac..d230011e1 100644 --- a/alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/RestHandlerUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/RestHandlerUtils.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin +import org.opensearch.alerting.AlertingPlugin import org.opensearch.common.Strings import org.opensearch.rest.RestRequest import org.opensearch.search.fetch.subphase.FetchSourceContext diff --git a/alerting/src/main/resources/META-INF/services/org.opensearch.painless.spi.PainlessExtension b/alerting/src/main/resources/META-INF/services/org.opensearch.painless.spi.PainlessExtension index b1f6fad82..ebb14f607 100644 --- a/alerting/src/main/resources/META-INF/services/org.opensearch.painless.spi.PainlessExtension +++ b/alerting/src/main/resources/META-INF/services/org.opensearch.painless.spi.PainlessExtension @@ -13,4 +13,4 @@ # permissions and limitations under the License. # -com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin \ No newline at end of file +org.opensearch.alerting.AlertingPlugin \ No newline at end of file diff --git a/alerting/src/main/resources/com/amazon/opendistroforelasticsearch/alerting/alerts/alert_mapping.json b/alerting/src/main/resources/org/opensearch/alerting/alerts/alert_mapping.json similarity index 100% rename from alerting/src/main/resources/com/amazon/opendistroforelasticsearch/alerting/alerts/alert_mapping.json rename to alerting/src/main/resources/org/opensearch/alerting/alerts/alert_mapping.json diff --git a/alerting/src/main/resources/com/amazon/opendistroforelasticsearch/alerting/com.amazon.opendistroforelasticsearch.alerting.txt b/alerting/src/main/resources/org/opensearch/alerting/org.opensearch.alerting.txt similarity index 58% rename from alerting/src/main/resources/com/amazon/opendistroforelasticsearch/alerting/com.amazon.opendistroforelasticsearch.alerting.txt rename to alerting/src/main/resources/org/opensearch/alerting/org.opensearch.alerting.txt index b548ad53f..a5d7b9cea 100644 --- a/alerting/src/main/resources/com/amazon/opendistroforelasticsearch/alerting/com.amazon.opendistroforelasticsearch.alerting.txt +++ b/alerting/src/main/resources/org/opensearch/alerting/org.opensearch.alerting.txt @@ -2,17 +2,17 @@ # Painless definition of classes used by alerting plugin -class com.amazon.opendistroforelasticsearch.alerting.script.TriggerScript { +class org.opensearch.alerting.script.TriggerScript { Map getParams() boolean execute(TriggerExecutionContext) String[] PARAMETERS } -class com.amazon.opendistroforelasticsearch.alerting.script.TriggerScript$Factory { +class org.opensearch.alerting.script.TriggerScript$Factory { TriggerScript newInstance(Map) } -class com.amazon.opendistroforelasticsearch.alerting.script.TriggerExecutionContext { +class org.opensearch.alerting.script.TriggerExecutionContext { Monitor getMonitor() Trigger getTrigger() List getResults() @@ -22,25 +22,25 @@ class com.amazon.opendistroforelasticsearch.alerting.script.TriggerExecutionCont Exception getError() } -class com.amazon.opendistroforelasticsearch.alerting.model.Monitor { +class org.opensearch.alerting.model.Monitor { String getId() long getVersion() String getName() boolean getEnabled() } -class com.amazon.opendistroforelasticsearch.alerting.model.Trigger { +class org.opensearch.alerting.model.Trigger { String getId() String getName() String getSeverity() List getActions() } -class com.amazon.opendistroforelasticsearch.alerting.model.action.Action { +class org.opensearch.alerting.model.action.Action { String getName() } -class com.amazon.opendistroforelasticsearch.alerting.model.Alert { +class org.opensearch.alerting.model.Alert { String getId() long getVersion() boolean isAcknowledged() diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ADTestHelpers.kt b/alerting/src/test/kotlin/org/opensearch/alerting/ADTestHelpers.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ADTestHelpers.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/ADTestHelpers.kt index 8c667f64f..57cac2843 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ADTestHelpers.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/ADTestHelpers.kt @@ -23,15 +23,15 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting +package org.opensearch.alerting -import com.amazon.opendistroforelasticsearch.alerting.core.model.Input -import com.amazon.opendistroforelasticsearch.alerting.core.model.IntervalSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.Schedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.core.model.Input +import org.opensearch.alerting.core.model.IntervalSchedule +import org.opensearch.alerting.core.model.Schedule +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.Trigger +import org.opensearch.commons.authuser.User import org.opensearch.index.query.BoolQueryBuilder import org.opensearch.index.query.QueryBuilders import org.opensearch.script.Script diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingRestTestCase.kt b/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingRestTestCase.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt index a604154a2..ecc67b0e4 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/AlertingRestTestCase.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting - -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin.Companion.EMAIL_ACCOUNT_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin.Companion.EMAIL_GROUP_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +package org.opensearch.alerting + +import org.opensearch.alerting.AlertingPlugin.Companion.EMAIL_ACCOUNT_BASE_URI +import org.opensearch.alerting.AlertingPlugin.Companion.EMAIL_GROUP_BASE_URI +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.core.settings.ScheduledJobSettings +import org.opensearch.alerting.elasticapi.string +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.settings.DestinationSettings +import org.opensearch.alerting.util.DestinationType import org.apache.http.HttpEntity import org.apache.http.HttpHeaders import org.apache.http.entity.ContentType diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunnerIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorRunnerIT.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunnerIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/MonitorRunnerIT.kt index 05fd90a82..e9154cb17 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorRunnerIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorRunnerIT.kt @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting - -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertError -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.core.model.IntervalSchedule -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ACKNOWLEDGED -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ACTIVE -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.COMPLETED -import com.amazon.opendistroforelasticsearch.alerting.model.Alert.State.ERROR -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.model.ActionExecutionResult -import com.amazon.opendistroforelasticsearch.alerting.model.action.Throttle -import com.amazon.opendistroforelasticsearch.alerting.model.destination.CustomWebhook -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Email -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Recipient -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting + +import org.opensearch.alerting.alerts.AlertError +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.core.model.IntervalSchedule +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Alert.State.ACKNOWLEDGED +import org.opensearch.alerting.model.Alert.State.ACTIVE +import org.opensearch.alerting.model.Alert.State.COMPLETED +import org.opensearch.alerting.model.Alert.State.ERROR +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.model.ActionExecutionResult +import org.opensearch.alerting.model.action.Throttle +import org.opensearch.alerting.model.destination.CustomWebhook +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.email.Email +import org.opensearch.alerting.model.destination.email.Recipient +import org.opensearch.alerting.util.DestinationType +import org.opensearch.commons.authuser.User import org.opensearch.client.ResponseException import org.opensearch.client.WarningFailureException import org.opensearch.common.settings.Settings diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/MonitorTests.kt index 26650329f..46c0bde8e 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/MonitorTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting +package org.opensearch.alerting -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger +import org.opensearch.alerting.model.Trigger import org.opensearch.test.OpenSearchTestCase import java.lang.IllegalArgumentException import java.time.Instant diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ODFERestTestCase.kt b/alerting/src/test/kotlin/org/opensearch/alerting/ODFERestTestCase.kt similarity index 82% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ODFERestTestCase.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/ODFERestTestCase.kt index 462699c72..77694afcc 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/ODFERestTestCase.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/ODFERestTestCase.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting +package org.opensearch.alerting -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants.OPENDISTRO_SECURITY_SSL_HTTP_ENABLED -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants.OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants.OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_KEYPASSWORD -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants.OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_PASSWORD -import com.amazon.opendistroforelasticsearch.commons.ConfigConstants.OPENDISTRO_SECURITY_SSL_HTTP_PEMCERT_FILEPATH -import com.amazon.opendistroforelasticsearch.commons.rest.SecureRestClientBuilder +import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_ENABLED +import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH +import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_KEYPASSWORD +import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_PASSWORD +import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_PEMCERT_FILEPATH +import org.opensearch.commons.rest.SecureRestClientBuilder import org.apache.http.HttpHost import org.opensearch.client.Request import org.opensearch.client.RequestOptions @@ -110,18 +110,18 @@ abstract class ODFERestTestCase : OpenSearchRestTestCase() { return Settings .builder() .put("http.port", 9200) - .put(OPENDISTRO_SECURITY_SSL_HTTP_ENABLED, isHttps()) - .put(OPENDISTRO_SECURITY_SSL_HTTP_PEMCERT_FILEPATH, "sample.pem") - .put(OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH, "test-kirk.jks") - .put(OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_PASSWORD, "changeit") - .put(OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_KEYPASSWORD, "changeit") + .put(OPENSEARCH_SECURITY_SSL_HTTP_ENABLED, isHttps()) + .put(OPENSEARCH_SECURITY_SSL_HTTP_PEMCERT_FILEPATH, "sample.pem") + .put(OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH, "test-kirk.jks") + .put(OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_PASSWORD, "changeit") + .put(OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_KEYPASSWORD, "changeit") .build() } @Throws(IOException::class) override fun buildClient(settings: Settings, hosts: Array): RestClient { if (securityEnabled()) { - val keystore = settings.get(OPENDISTRO_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH) + val keystore = settings.get(OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH) return when (keystore != null) { true -> { // create adminDN (super-admin) client diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/TestHelpers.kt b/alerting/src/test/kotlin/org/opensearch/alerting/TestHelpers.kt similarity index 88% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/TestHelpers.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/TestHelpers.kt index 944532348..bbeda2cd5 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/TestHelpers.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/TestHelpers.kt @@ -23,27 +23,27 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting +package org.opensearch.alerting -import com.amazon.opendistroforelasticsearch.alerting.core.model.Input -import com.amazon.opendistroforelasticsearch.alerting.core.model.IntervalSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.Schedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string -import com.amazon.opendistroforelasticsearch.alerting.model.ActionExecutionResult -import com.amazon.opendistroforelasticsearch.alerting.model.ActionRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.InputRunResults -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.MonitorRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger -import com.amazon.opendistroforelasticsearch.alerting.model.TriggerRunResult -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action -import com.amazon.opendistroforelasticsearch.alerting.model.action.Throttle -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailEntry -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.core.model.Input +import org.opensearch.alerting.core.model.IntervalSchedule +import org.opensearch.alerting.core.model.Schedule +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.elasticapi.string +import org.opensearch.alerting.model.ActionExecutionResult +import org.opensearch.alerting.model.ActionRunResult +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.InputRunResults +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.MonitorRunResult +import org.opensearch.alerting.model.Trigger +import org.opensearch.alerting.model.TriggerRunResult +import org.opensearch.alerting.model.action.Action +import org.opensearch.alerting.model.action.Throttle +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailEntry +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.commons.authuser.User import org.apache.http.Header import org.apache.http.HttpEntity import org.opensearch.client.Request diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertActionTests.kt index def97a5c1..3f243dc0e 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase import org.junit.Assert diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequestTests.kt index 9aaff7523..d2612afdf 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponseTests.kt similarity index 87% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponseTests.kt index 5971aa750..fee045250 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/AcknowledgeAlertResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/AcknowledgeAlertResponseTests.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertError -import com.amazon.opendistroforelasticsearch.alerting.model.ActionExecutionResult -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.randomUser +import org.opensearch.alerting.alerts.AlertError +import org.opensearch.alerting.model.ActionExecutionResult +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.randomUser import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationActionTests.kt index b1eec6f53..236486f00 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase import org.junit.Assert diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationRequestTests.kt index bd02f1f7e..8ad7e715b 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteDestinationRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteDestinationRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountActionTests.kt index aa57f0c71..b83cf524d 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequestTests.kt index 4416bcac0..307986dc7 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailAccountRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailAccountRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupActionTests.kt index 6c995e63d..6224e5595 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequestTests.kt index dee63e164..c65c21c94 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteEmailGroupRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteEmailGroupRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorActionTests.kt index e8b3d4dec..834265434 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase import org.junit.Assert diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorRequestTests.kt index 37458f46a..0600f9f54 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/DeleteMonitorRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/DeleteMonitorRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorActionTests.kt index f3252b46f..36b338c96 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequestTests.kt similarity index 92% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequestTests.kt index 2fd5e6b8e..ebd2373f8 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorRequestTests.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.randomMonitor import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.unit.TimeValue diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponseTests.kt similarity index 92% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponseTests.kt index 0de6753ca..ba4c05e81 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/ExecuteMonitorResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/ExecuteMonitorResponseTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomMonitorRunResult +import org.opensearch.alerting.randomMonitorRunResult import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsActionTests.kt index d51bf6602..70edda9ee 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsRequestTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsRequestTests.kt index b924c596f..3fbc89045 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsRequestTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Table +import org.opensearch.alerting.model.Table import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsResponseTests.kt similarity index 91% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsResponseTests.kt index 44f0dd893..99960cfb5 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetAlertsResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetAlertsResponseTests.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.builder -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.builder +import org.opensearch.alerting.elasticapi.string +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.randomUser +import org.opensearch.commons.authuser.User import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.xcontent.ToXContent diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsActionTests.kt index a97696526..5f2dcf1dd 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsRequestTests.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsRequestTests.kt index 8e8534861..acd3eccca 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsRequestTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.Table +import org.opensearch.alerting.model.Table import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.search.fetch.subphase.FetchSourceContext diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsResponseTests.kt similarity index 89% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsResponseTests.kt index bd3c873c6..ac42b1758 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetDestinationsResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetDestinationsResponseTests.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Slack -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.Slack +import org.opensearch.alerting.util.DestinationType import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountActionTests.kt index 1509bd8e4..3b5fa1e80 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountRequestTests.kt similarity index 97% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountRequestTests.kt index 3953d7772..45557dd55 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountResponseTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountResponseTests.kt index 9c9baa6fb..1d1de40cc 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailAccountResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailAccountResponseTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount +import org.opensearch.alerting.randomEmailAccount import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupActionTests.kt index 88bcc0ddb..1f74f2bc7 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupRequestTests.kt similarity index 97% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupRequestTests.kt index 09f26d2af..31924a54a 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupResponseTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupResponseTests.kt index 7b9f64d21..8d29dd87c 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetEmailGroupResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetEmailGroupResponseTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup +import org.opensearch.alerting.randomEmailGroup import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorActionTests.kt index 58eebc6eb..8bcb6416d 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorRequestTests.kt similarity index 97% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorRequestTests.kt index dc679e951..c79e1b916 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorResponseTests.kt similarity index 90% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorResponseTests.kt index 137ee7bb6..a4c54a252 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/GetMonitorResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/GetMonitorResponseTests.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.core.model.CronSchedule -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.randomUser +import org.opensearch.alerting.core.model.CronSchedule +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.randomUser import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationActionTests.kt index f6b36bdaa..abbe02994 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase import org.junit.Assert diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationRequestTests.kt similarity index 91% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationRequestTests.kt index c6d6d6be6..23eba7fe5 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationRequestTests.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Chime -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.model.destination.Chime +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.util.DestinationType import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationResponseTests.kt similarity index 84% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationResponseTests.kt index bf322071b..37963471e 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexDestinationResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexDestinationResponseTests.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Chime -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +import org.opensearch.alerting.model.destination.Chime +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.util.DestinationType import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountActionTests.kt index 98f403831..d901527a0 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequestTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequestTests.kt index fba20ca0c..5d5a9bf29 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountRequestTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount +import org.opensearch.alerting.randomEmailAccount import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponseTests.kt similarity index 93% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponseTests.kt index b22258f37..bcdc055ef 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailAccountResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailAccountResponseTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount +import org.opensearch.alerting.randomEmailAccount import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupActionTests.kt index acad4deb1..fbcd1ff17 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequestTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequestTests.kt index 2be81d90c..40509d2ec 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupRequestTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup +import org.opensearch.alerting.randomEmailGroup import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponseTests.kt similarity index 93% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponseTests.kt index 9759b688e..ba3d519b2 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexEmailGroupResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexEmailGroupResponseTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup +import org.opensearch.alerting.randomEmailGroup import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorActionTests.kt index d7abda456..9c6c5d08a 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorRequestTests.kt similarity index 92% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorRequestTests.kt index 902c0a160..03bc39e80 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorRequestTests.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.randomMonitor import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponseTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorResponseTests.kt similarity index 88% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponseTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorResponseTests.kt index 612a1357d..9771c837c 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/IndexMonitorResponseTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/IndexMonitorResponseTests.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action -import com.amazon.opendistroforelasticsearch.alerting.core.model.CronSchedule -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.randomUser +import org.opensearch.alerting.core.model.CronSchedule +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.randomUser import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.rest.RestStatus diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailAccountActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailAccountActionTests.kt index dd20553fe..071bc6114 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailAccountActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailAccountActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailGroupActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailGroupActionTests.kt index 40d843460..0ed1e5716 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchEmailGroupActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchEmailGroupActionTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorActionTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorActionTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorActionTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorActionTests.kt index fbaa6adde..7a6b2d9b1 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorActionTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorActionTests.kt @@ -23,7 +23,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.test.OpenSearchTestCase import org.junit.Assert diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequestTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorRequestTests.kt similarity index 97% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequestTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorRequestTests.kt index 91ecb68e2..64c650a83 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/action/SearchMonitorRequestTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/action/SearchMonitorRequestTests.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.action +package org.opensearch.alerting.action import org.opensearch.action.search.SearchRequest import org.opensearch.common.io.stream.BytesStreamOutput diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndicesIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/alerts/AlertIndicesIT.kt similarity index 93% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndicesIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/alerts/AlertIndicesIT.kt index 69822d935..440433355 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/alerts/AlertIndicesIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/alerts/AlertIndicesIT.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.alerts - -import com.amazon.opendistroforelasticsearch.alerting.ALWAYS_RUN -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.NEVER_RUN -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomTrigger -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings -import com.amazon.opendistroforelasticsearch.alerting.makeRequest +package org.opensearch.alerting.alerts + +import org.opensearch.alerting.ALWAYS_RUN +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.NEVER_RUN +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.randomMonitor +import org.opensearch.alerting.randomTrigger +import org.opensearch.alerting.settings.AlertingSettings +import org.opensearch.alerting.makeRequest import org.apache.http.entity.ContentType.APPLICATION_JSON import org.apache.http.entity.StringEntity import org.opensearch.action.search.SearchResponse diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/AlertTests.kt similarity index 95% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/AlertTests.kt index 93e7b529c..77e1dbef6 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/AlertTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/AlertTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.randomAlert +import org.opensearch.alerting.randomAlert import org.opensearch.test.OpenSearchTestCase class AlertTests : OpenSearchTestCase() { diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/DestinationTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/DestinationTests.kt similarity index 93% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/DestinationTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/DestinationTests.kt index 054df24b4..8266487ec 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/DestinationTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/DestinationTests.kt @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model - -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Chime -import com.amazon.opendistroforelasticsearch.alerting.model.destination.CustomWebhook -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Email -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Slack -import com.amazon.opendistroforelasticsearch.alerting.parser -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Recipient -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +package org.opensearch.alerting.model + +import org.opensearch.alerting.model.destination.Chime +import org.opensearch.alerting.model.destination.CustomWebhook +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.email.Email +import org.opensearch.alerting.model.destination.Slack +import org.opensearch.alerting.parser +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.model.destination.email.Recipient +import org.opensearch.alerting.util.DestinationType import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.test.OpenSearchTestCase diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailAccountTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/EmailAccountTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailAccountTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/EmailAccountTests.kt index 35eba00ab..67e050294 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailAccountTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/EmailAccountTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.test.OpenSearchTestCase class EmailAccountTests : OpenSearchTestCase() { diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailGroupTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/EmailGroupTests.kt similarity index 91% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailGroupTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/EmailGroupTests.kt index c78622d96..c6df7c2ad 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/EmailGroupTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/EmailGroupTests.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model +package org.opensearch.alerting.model -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailEntry -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.model.destination.email.EmailEntry +import org.opensearch.alerting.model.destination.email.EmailGroup import org.opensearch.test.OpenSearchTestCase class EmailGroupTests : OpenSearchTestCase() { diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/WriteableTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/WriteableTests.kt similarity index 83% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/WriteableTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/WriteableTests.kt index d314f9b50..f8b72bc50 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/WriteableTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/WriteableTests.kt @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model - -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action -import com.amazon.opendistroforelasticsearch.alerting.model.action.Throttle -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.randomAction -import com.amazon.opendistroforelasticsearch.alerting.randomActionRunResult -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup -import com.amazon.opendistroforelasticsearch.alerting.randomInputRunResults -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomMonitorRunResult -import com.amazon.opendistroforelasticsearch.alerting.randomThrottle -import com.amazon.opendistroforelasticsearch.alerting.randomTrigger -import com.amazon.opendistroforelasticsearch.alerting.randomTriggerRunResult -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.randomUserEmpty -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting.model + +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.model.action.Action +import org.opensearch.alerting.model.action.Throttle +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.randomAction +import org.opensearch.alerting.randomActionRunResult +import org.opensearch.alerting.randomEmailAccount +import org.opensearch.alerting.randomEmailGroup +import org.opensearch.alerting.randomInputRunResults +import org.opensearch.alerting.randomMonitor +import org.opensearch.alerting.randomMonitorRunResult +import org.opensearch.alerting.randomThrottle +import org.opensearch.alerting.randomTrigger +import org.opensearch.alerting.randomTriggerRunResult +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.randomUserEmpty +import org.opensearch.commons.authuser.User import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.search.builder.SearchSourceBuilder diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/XContentTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/model/XContentTests.kt similarity index 85% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/XContentTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/model/XContentTests.kt index aeadcc217..0cc599fa2 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/model/XContentTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/model/XContentTests.kt @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.model - -import com.amazon.opendistroforelasticsearch.alerting.builder -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string -import com.amazon.opendistroforelasticsearch.alerting.model.action.Action -import com.amazon.opendistroforelasticsearch.alerting.model.action.Throttle -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.parser -import com.amazon.opendistroforelasticsearch.alerting.randomAction -import com.amazon.opendistroforelasticsearch.alerting.randomActionExecutionResult -import com.amazon.opendistroforelasticsearch.alerting.randomAlert -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomMonitorWithoutUser -import com.amazon.opendistroforelasticsearch.alerting.randomThrottle -import com.amazon.opendistroforelasticsearch.alerting.randomTrigger -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.randomUserEmpty -import com.amazon.opendistroforelasticsearch.alerting.toJsonString -import com.amazon.opendistroforelasticsearch.commons.authuser.User +package org.opensearch.alerting.model + +import org.opensearch.alerting.builder +import org.opensearch.alerting.elasticapi.string +import org.opensearch.alerting.model.action.Action +import org.opensearch.alerting.model.action.Throttle +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.parser +import org.opensearch.alerting.randomAction +import org.opensearch.alerting.randomActionExecutionResult +import org.opensearch.alerting.randomAlert +import org.opensearch.alerting.randomEmailAccount +import org.opensearch.alerting.randomEmailGroup +import org.opensearch.alerting.randomMonitor +import org.opensearch.alerting.randomMonitorWithoutUser +import org.opensearch.alerting.randomThrottle +import org.opensearch.alerting.randomTrigger +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.randomUserEmpty +import org.opensearch.alerting.toJsonString +import org.opensearch.commons.authuser.User import org.opensearch.common.xcontent.ToXContent import org.opensearch.test.OpenSearchTestCase import kotlin.test.assertFailsWith diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/DestinationRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/DestinationRestApiIT.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/DestinationRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/DestinationRestApiIT.kt index 2455e05be..1390da28c 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/DestinationRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/DestinationRestApiIT.kt @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler - -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.DESTINATION_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Chime -import com.amazon.opendistroforelasticsearch.alerting.model.destination.CustomWebhook -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Email -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.Recipient -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Slack -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.settings.DestinationSettings -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +package org.opensearch.alerting.resthandler + +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.DESTINATION_BASE_URI +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.destination.Chime +import org.opensearch.alerting.model.destination.CustomWebhook +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.email.Email +import org.opensearch.alerting.model.destination.email.Recipient +import org.opensearch.alerting.model.destination.Slack +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.settings.DestinationSettings +import org.opensearch.alerting.util.DestinationType import org.opensearch.client.ResponseException import org.opensearch.rest.RestStatus import org.opensearch.test.junit.annotations.TestLogging diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailAccountRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailAccountRestApiIT.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailAccountRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailAccountRestApiIT.kt index 881168151..c3210bc54 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailAccountRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailAccountRestApiIT.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler +package org.opensearch.alerting.resthandler -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin.Companion.EMAIL_ACCOUNT_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailAccount -import com.amazon.opendistroforelasticsearch.alerting.randomEmailAccount +import org.opensearch.alerting.AlertingPlugin.Companion.EMAIL_ACCOUNT_BASE_URI +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.destination.email.EmailAccount +import org.opensearch.alerting.randomEmailAccount import org.apache.http.entity.ContentType import org.apache.http.nio.entity.NStringEntity import org.opensearch.client.ResponseException diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailGroupRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailGroupRestApiIT.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailGroupRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailGroupRestApiIT.kt index 58b9f6f69..ca008739a 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/EmailGroupRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/EmailGroupRestApiIT.kt @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler - -import com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin.Companion.EMAIL_GROUP_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailEntry -import com.amazon.opendistroforelasticsearch.alerting.model.destination.email.EmailGroup -import com.amazon.opendistroforelasticsearch.alerting.randomEmailGroup +package org.opensearch.alerting.resthandler + +import org.opensearch.alerting.AlertingPlugin.Companion.EMAIL_GROUP_BASE_URI +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.destination.email.EmailEntry +import org.opensearch.alerting.model.destination.email.EmailGroup +import org.opensearch.alerting.randomEmailGroup import org.apache.http.entity.ContentType import org.apache.http.nio.entity.NStringEntity import org.opensearch.client.ResponseException diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/MonitorRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/MonitorRestApiIT.kt similarity index 96% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/MonitorRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/MonitorRestApiIT.kt index d12f2b09f..5409a7902 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/MonitorRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/MonitorRestApiIT.kt @@ -23,30 +23,30 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler - -import com.amazon.opendistroforelasticsearch.alerting.ALERTING_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.ANOMALY_DETECTOR_INDEX -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.alerts.AlertIndices -import com.amazon.opendistroforelasticsearch.alerting.anomalyDetectorIndexMapping -import com.amazon.opendistroforelasticsearch.alerting.core.model.CronSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.model.Monitor -import com.amazon.opendistroforelasticsearch.alerting.model.Trigger -import com.amazon.opendistroforelasticsearch.alerting.randomADMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomAction -import com.amazon.opendistroforelasticsearch.alerting.randomAlert -import com.amazon.opendistroforelasticsearch.alerting.randomAnomalyDetector -import com.amazon.opendistroforelasticsearch.alerting.randomAnomalyDetectorWithUser -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomThrottle -import com.amazon.opendistroforelasticsearch.alerting.randomTrigger -import com.amazon.opendistroforelasticsearch.alerting.settings.AlertingSettings +package org.opensearch.alerting.resthandler + +import org.opensearch.alerting.ALERTING_BASE_URI +import org.opensearch.alerting.ANOMALY_DETECTOR_INDEX +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.alerts.AlertIndices +import org.opensearch.alerting.anomalyDetectorIndexMapping +import org.opensearch.alerting.core.model.CronSchedule +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.core.settings.ScheduledJobSettings +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.model.Monitor +import org.opensearch.alerting.model.Trigger +import org.opensearch.alerting.randomADMonitor +import org.opensearch.alerting.randomAction +import org.opensearch.alerting.randomAlert +import org.opensearch.alerting.randomAnomalyDetector +import org.opensearch.alerting.randomAnomalyDetectorWithUser +import org.opensearch.alerting.randomMonitor +import org.opensearch.alerting.randomThrottle +import org.opensearch.alerting.randomTrigger +import org.opensearch.alerting.settings.AlertingSettings import org.apache.http.HttpHeaders import org.apache.http.entity.ContentType import org.apache.http.message.BasicHeader diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureDestinationRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt similarity index 93% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureDestinationRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt index 494bdd3bf..289f5ac60 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureDestinationRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler - -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.DESTINATION_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Chime -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Destination -import com.amazon.opendistroforelasticsearch.alerting.model.destination.Slack -import com.amazon.opendistroforelasticsearch.alerting.randomUser -import com.amazon.opendistroforelasticsearch.alerting.util.DestinationType +package org.opensearch.alerting.resthandler + +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.DESTINATION_BASE_URI +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.destination.Chime +import org.opensearch.alerting.model.destination.Destination +import org.opensearch.alerting.model.destination.Slack +import org.opensearch.alerting.randomUser +import org.opensearch.alerting.util.DestinationType import org.opensearch.client.ResponseException import org.opensearch.rest.RestStatus import org.opensearch.test.junit.annotations.TestLogging diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureMonitorRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureMonitorRestApiIT.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt index bea1ea5b8..c4ca197f0 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/resthandler/SecureMonitorRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt @@ -9,22 +9,22 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.alerting.resthandler - -import com.amazon.opendistroforelasticsearch.alerting.ALERTING_BASE_URI -import com.amazon.opendistroforelasticsearch.alerting.ALWAYS_RUN -import com.amazon.opendistroforelasticsearch.alerting.AlertingRestTestCase -import com.amazon.opendistroforelasticsearch.alerting.DRYRUN_MONITOR -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.makeRequest -import com.amazon.opendistroforelasticsearch.alerting.model.Alert -import com.amazon.opendistroforelasticsearch.alerting.randomAction -import com.amazon.opendistroforelasticsearch.alerting.randomAlert -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.alerting.randomTemplateScript -import com.amazon.opendistroforelasticsearch.alerting.randomTrigger -import com.amazon.opendistroforelasticsearch.commons.authuser.User -import com.amazon.opendistroforelasticsearch.commons.rest.SecureRestClientBuilder +package org.opensearch.alerting.resthandler + +import org.opensearch.alerting.ALERTING_BASE_URI +import org.opensearch.alerting.ALWAYS_RUN +import org.opensearch.alerting.AlertingRestTestCase +import org.opensearch.alerting.DRYRUN_MONITOR +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.makeRequest +import org.opensearch.alerting.model.Alert +import org.opensearch.alerting.randomAction +import org.opensearch.alerting.randomAlert +import org.opensearch.alerting.randomMonitor +import org.opensearch.alerting.randomTemplateScript +import org.opensearch.alerting.randomTrigger +import org.opensearch.commons.authuser.User +import org.opensearch.commons.rest.SecureRestClientBuilder import org.apache.http.entity.ContentType import org.apache.http.nio.entity.NStringEntity import org.opensearch.client.Response diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtilsTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/util/AlertingUtilsTests.kt similarity index 92% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtilsTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/util/AlertingUtilsTests.kt index e6b7bdc44..7dc852ca2 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AlertingUtilsTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/util/AlertingUtilsTests.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage -import com.amazon.opendistroforelasticsearch.alerting.destination.message.CustomWebhookMessage +import org.opensearch.alerting.destination.message.BaseMessage +import org.opensearch.alerting.destination.message.CustomWebhookMessage import org.opensearch.test.OpenSearchTestCase import java.util.HashMap diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtilsTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtilsTests.kt similarity index 94% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtilsTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtilsTests.kt index 9475d74e1..9f4a1c539 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/AnomalyDetectionUtilsTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/util/AnomalyDetectionUtilsTests.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.ANOMALY_RESULT_INDEX -import com.amazon.opendistroforelasticsearch.alerting.core.model.Input -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.randomMonitor -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.alerting.ANOMALY_RESULT_INDEX +import org.opensearch.alerting.core.model.Input +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.randomMonitor +import org.opensearch.commons.authuser.User import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.ToXContent import org.opensearch.common.xcontent.XContentBuilder diff --git a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtilsTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/util/IndexUtilsTests.kt similarity index 97% rename from alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtilsTests.kt rename to alerting/src/test/kotlin/org/opensearch/alerting/util/IndexUtilsTests.kt index 1471df43a..df1aa7e99 100644 --- a/alerting/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/util/IndexUtilsTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/util/IndexUtilsTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.util +package org.opensearch.alerting.util -import com.amazon.opendistroforelasticsearch.alerting.parser +import org.opensearch.alerting.parser import org.opensearch.cluster.metadata.IndexMetadata import org.opensearch.test.OpenSearchTestCase import java.lang.NumberFormatException diff --git a/build.gradle b/build.gradle index b9f648e20..1afb5c6b1 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ ext { } allprojects { - group = "com.amazon.opendistroforelasticsearch" + group = "org.opensearch" // Increment the final digit when there's a new plugin versions for the same opendistro version // Reset the final digit to 0 when upgrading to a new opendistro version version = "${opendistroVersion}.0-beta1" diff --git a/core/build.gradle b/core/build.gradle index a7aaac4da..2a3891089 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -36,7 +36,7 @@ dependencies { compile "com.cronutils:cron-utils:9.1.3" compile "org.opensearch.client:opensearch-rest-client:${opensearch_version}" compile 'com.google.googlejavaformat:google-java-format:1.3' - compile "com.amazon.opendistroforelasticsearch:common-utils:${common_utils_version}" + compile "org.opensearch:common-utils:${common_utils_version}" testImplementation "org.opensearch.test:framework:${opensearch_version}" testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}" diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobRunner.kt b/core/src/main/kotlin/org/opensearch/alerting/core/JobRunner.kt similarity index 88% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobRunner.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/JobRunner.kt index dbd6e99cb..fdc6f3c06 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobRunner.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/JobRunner.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core +package org.opensearch.alerting.core -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.ScheduledJob import java.time.Instant interface JobRunner { diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeper.kt b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt similarity index 95% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeper.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt index c083de17f..07e7bf2ad 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeper.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core - -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobScheduler -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.REQUEST_TIMEOUT -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEPER_ENABLED -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_BACKOFF_MILLIS -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_BACKOFF_RETRY_COUNT -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_PAGE_SIZE -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_PERIOD -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.firstFailureOrNull -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.retry +package org.opensearch.alerting.core + +import org.opensearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.schedule.JobScheduler +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.REQUEST_TIMEOUT +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEPER_ENABLED +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_BACKOFF_MILLIS +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_BACKOFF_RETRY_COUNT +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_PAGE_SIZE +import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_PERIOD +import org.opensearch.alerting.elasticapi.firstFailureOrNull +import org.opensearch.alerting.elasticapi.retry import org.apache.logging.log4j.LogManager import org.opensearch.action.bulk.BackoffPolicy import org.opensearch.action.search.SearchRequest diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeperMetrics.kt b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeperMetrics.kt similarity index 96% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeperMetrics.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/JobSweeperMetrics.kt index 392dd9765..f2b947e30 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/JobSweeperMetrics.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeperMetrics.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core +package org.opensearch.alerting.core import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/ScheduledJobIndices.kt b/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt similarity index 96% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/ScheduledJobIndices.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt index b076edc05..bce88914a 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/ScheduledJobIndices.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core +package org.opensearch.alerting.core -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.ScheduledJob import org.opensearch.action.ActionListener import org.opensearch.action.admin.indices.create.CreateIndexRequest import org.opensearch.action.admin.indices.create.CreateIndexResponse diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobStats.kt b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobStats.kt similarity index 91% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobStats.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobStats.kt index 6981faf10..ab18f2a2a 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobStats.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobStats.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.action.node +package org.opensearch.alerting.core.action.node -import com.amazon.opendistroforelasticsearch.alerting.core.JobSweeperMetrics -import com.amazon.opendistroforelasticsearch.alerting.core.resthandler.RestScheduledJobStatsHandler -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobSchedulerMetrics +import org.opensearch.alerting.core.JobSweeperMetrics +import org.opensearch.alerting.core.resthandler.RestScheduledJobStatsHandler +import org.opensearch.alerting.core.schedule.JobSchedulerMetrics import org.opensearch.action.support.nodes.BaseNodeResponse import org.opensearch.cluster.node.DiscoveryNode import org.opensearch.common.io.stream.StreamInput diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsAction.kt b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsAction.kt similarity index 95% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsAction.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsAction.kt index eaa81b111..f06941576 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsAction.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsAction.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.action.node +package org.opensearch.alerting.core.action.node import org.opensearch.action.ActionType import org.opensearch.common.io.stream.Writeable diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt similarity index 96% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt index 886c6041a..45d72753a 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsRequest.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.action.node +package org.opensearch.alerting.core.action.node import org.opensearch.action.support.nodes.BaseNodesRequest import org.opensearch.common.io.stream.StreamInput diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt similarity index 95% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt index a9e9c0254..5f3e9b427 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.action.node +package org.opensearch.alerting.core.action.node -import com.amazon.opendistroforelasticsearch.alerting.core.settings.ScheduledJobSettings +import org.opensearch.alerting.core.settings.ScheduledJobSettings import org.opensearch.action.FailedNodeException import org.opensearch.action.support.nodes.BaseNodesResponse import org.opensearch.cluster.ClusterName diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt similarity index 92% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt index c6544ece1..a009efea1 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsTransportAction.kt @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.action.node +package org.opensearch.alerting.core.action.node -import com.amazon.opendistroforelasticsearch.alerting.core.JobSweeper -import com.amazon.opendistroforelasticsearch.alerting.core.JobSweeperMetrics -import com.amazon.opendistroforelasticsearch.alerting.core.ScheduledJobIndices -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobScheduler -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobSchedulerMetrics +import org.opensearch.alerting.core.JobSweeper +import org.opensearch.alerting.core.JobSweeperMetrics +import org.opensearch.alerting.core.ScheduledJobIndices +import org.opensearch.alerting.core.schedule.JobScheduler +import org.opensearch.alerting.core.schedule.JobSchedulerMetrics import org.apache.logging.log4j.LogManager import org.opensearch.action.FailedNodeException import org.opensearch.action.support.ActionFilters diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Input.kt b/core/src/main/kotlin/org/opensearch/alerting/core/model/Input.kt similarity index 96% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Input.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/model/Input.kt index 8561956ce..46b6db56c 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Input.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/model/Input.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model import org.opensearch.common.io.stream.Writeable import org.opensearch.common.xcontent.ToXContentObject diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Schedule.kt b/core/src/main/kotlin/org/opensearch/alerting/core/model/Schedule.kt similarity index 99% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Schedule.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/model/Schedule.kt index ce049e1c1..405876912 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/Schedule.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/model/Schedule.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model import com.cronutils.model.CronType import com.cronutils.model.definition.CronDefinitionBuilder diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduledJob.kt b/core/src/main/kotlin/org/opensearch/alerting/core/model/ScheduledJob.kt similarity index 93% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduledJob.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/model/ScheduledJob.kt index 628b83ec4..735005693 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduledJob.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/model/ScheduledJob.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.NO_ID -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.NO_VERSION -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX +import org.opensearch.alerting.core.model.ScheduledJob.Companion.NO_ID +import org.opensearch.alerting.core.model.ScheduledJob.Companion.NO_VERSION +import org.opensearch.alerting.core.model.ScheduledJob.Companion.SCHEDULED_JOBS_INDEX import org.opensearch.common.io.stream.Writeable import org.opensearch.common.xcontent.ToXContent import org.opensearch.common.xcontent.ToXContentObject diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/SearchInput.kt b/core/src/main/kotlin/org/opensearch/alerting/core/model/SearchInput.kt similarity index 98% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/SearchInput.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/model/SearchInput.kt index ccbfb421c..ba5700f81 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/SearchInput.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/model/SearchInput.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model import org.opensearch.common.CheckedFunction import org.opensearch.common.ParseField diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt b/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt similarity index 94% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt index 1af00bbb1..f1421313f 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.resthandler +package org.opensearch.alerting.core.resthandler -import com.amazon.opendistroforelasticsearch.alerting.core.action.node.ScheduledJobsStatsAction -import com.amazon.opendistroforelasticsearch.alerting.core.action.node.ScheduledJobsStatsRequest +import org.opensearch.alerting.core.action.node.ScheduledJobsStatsAction +import org.opensearch.alerting.core.action.node.ScheduledJobsStatsRequest import org.opensearch.client.node.NodeClient import org.opensearch.common.Strings import org.opensearch.rest.BaseRestHandler diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobScheduler.kt b/core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobScheduler.kt similarity index 97% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobScheduler.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobScheduler.kt index 3ed59056f..75cee11b4 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobScheduler.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobScheduler.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.schedule +package org.opensearch.alerting.core.schedule -import com.amazon.opendistroforelasticsearch.alerting.core.JobRunner -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.JobRunner +import org.opensearch.alerting.core.model.ScheduledJob import org.apache.logging.log4j.LogManager import org.opensearch.common.unit.TimeValue import org.opensearch.threadpool.Scheduler diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerMetrics.kt b/core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerMetrics.kt similarity index 97% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerMetrics.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerMetrics.kt index bac23c8be..8494ef820 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerMetrics.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerMetrics.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.schedule +package org.opensearch.alerting.core.schedule import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/settings/ScheduledJobSettings.kt b/core/src/main/kotlin/org/opensearch/alerting/core/settings/ScheduledJobSettings.kt similarity index 94% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/settings/ScheduledJobSettings.kt rename to core/src/main/kotlin/org/opensearch/alerting/core/settings/ScheduledJobSettings.kt index f63292333..88e03da63 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/settings/ScheduledJobSettings.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/settings/ScheduledJobSettings.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.settings +package org.opensearch.alerting.core.settings -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.model.ScheduledJob import org.opensearch.common.settings.Setting import org.opensearch.common.unit.TimeValue diff --git a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/elasticapi/ElasticExtensions.kt b/core/src/main/kotlin/org/opensearch/alerting/elasticapi/ElasticExtensions.kt similarity index 97% rename from core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/elasticapi/ElasticExtensions.kt rename to core/src/main/kotlin/org/opensearch/alerting/elasticapi/ElasticExtensions.kt index 45fb6b5b5..f04f37392 100644 --- a/core/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/elasticapi/ElasticExtensions.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/elasticapi/ElasticExtensions.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.elasticapi +package org.opensearch.alerting.elasticapi -import com.amazon.opendistroforelasticsearch.commons.InjectSecurity -import com.amazon.opendistroforelasticsearch.commons.authuser.User +import org.opensearch.commons.InjectSecurity +import org.opensearch.commons.authuser.User import kotlinx.coroutines.ThreadContextElement import kotlinx.coroutines.delay import org.apache.logging.log4j.Logger diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/WriteableTests.kt b/core/src/test/kotlin/org/opensearch/alerting/core/WriteableTests.kt similarity index 91% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/WriteableTests.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/WriteableTests.kt index d4c76df6a..ef37c00c7 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/WriteableTests.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/WriteableTests.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core +package org.opensearch.alerting.core -import com.amazon.opendistroforelasticsearch.alerting.core.schedule.JobSchedulerMetrics +import org.opensearch.alerting.core.schedule.JobSchedulerMetrics import org.opensearch.common.io.stream.BytesStreamOutput import org.opensearch.common.io.stream.StreamInput import org.opensearch.test.OpenSearchTestCase.assertEquals diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/XContentTests.kt b/core/src/test/kotlin/org/opensearch/alerting/core/XContentTests.kt similarity index 82% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/XContentTests.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/XContentTests.kt index 64dfd575d..ff86cebb0 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/XContentTests.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/XContentTests.kt @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core +package org.opensearch.alerting.core -import com.amazon.opendistroforelasticsearch.alerting.core.model.Input -import com.amazon.opendistroforelasticsearch.alerting.core.model.SearchInput -import com.amazon.opendistroforelasticsearch.alerting.core.model.XContentTestBase -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string +import org.opensearch.alerting.core.model.Input +import org.opensearch.alerting.core.model.SearchInput +import org.opensearch.alerting.core.model.XContentTestBase +import org.opensearch.alerting.elasticapi.string import org.opensearch.common.xcontent.ToXContent import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/MockScheduledJob.kt b/core/src/test/kotlin/org/opensearch/alerting/core/model/MockScheduledJob.kt similarity index 96% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/MockScheduledJob.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/model/MockScheduledJob.kt index 96d6c8530..11faac4c7 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/MockScheduledJob.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/model/MockScheduledJob.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.ToXContent diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduleTest.kt b/core/src/test/kotlin/org/opensearch/alerting/core/model/ScheduleTest.kt similarity index 99% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduleTest.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/model/ScheduleTest.kt index 9cfd2ed77..617831dd0 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/ScheduleTest.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/model/ScheduleTest.kt @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model -import com.amazon.opendistroforelasticsearch.alerting.elasticapi.string +import org.opensearch.alerting.elasticapi.string import org.opensearch.common.xcontent.ToXContent import java.time.Instant import java.time.ZoneId diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/XContentTestBase.kt b/core/src/test/kotlin/org/opensearch/alerting/core/model/XContentTestBase.kt similarity index 96% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/XContentTestBase.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/model/XContentTestBase.kt index bdf6fdca9..f7da943a4 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/model/XContentTestBase.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/model/XContentTestBase.kt @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.model +package org.opensearch.alerting.core.model import org.opensearch.common.settings.Settings import org.opensearch.common.xcontent.LoggingDeprecationHandler diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerTest.kt b/core/src/test/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerTest.kt similarity index 95% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerTest.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerTest.kt index cdb572035..755310f2b 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/JobSchedulerTest.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/schedule/JobSchedulerTest.kt @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.schedule +package org.opensearch.alerting.core.schedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.CronSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.IntervalSchedule -import com.amazon.opendistroforelasticsearch.alerting.core.model.MockScheduledJob +import org.opensearch.alerting.core.model.CronSchedule +import org.opensearch.alerting.core.model.IntervalSchedule +import org.opensearch.alerting.core.model.MockScheduledJob import org.opensearch.common.settings.Settings import org.opensearch.threadpool.ThreadPool import org.junit.Before diff --git a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/MockJobRunner.kt b/core/src/test/kotlin/org/opensearch/alerting/core/schedule/MockJobRunner.kt similarity index 86% rename from core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/MockJobRunner.kt rename to core/src/test/kotlin/org/opensearch/alerting/core/schedule/MockJobRunner.kt index 818e414ec..622e14124 100644 --- a/core/src/test/kotlin/com/amazon/opendistroforelasticsearch/alerting/core/schedule/MockJobRunner.kt +++ b/core/src/test/kotlin/org/opensearch/alerting/core/schedule/MockJobRunner.kt @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.core.schedule +package org.opensearch.alerting.core.schedule -import com.amazon.opendistroforelasticsearch.alerting.core.JobRunner -import com.amazon.opendistroforelasticsearch.alerting.core.model.ScheduledJob +import org.opensearch.alerting.core.JobRunner +import org.opensearch.alerting.core.model.ScheduledJob import java.time.Instant class MockJobRunner : JobRunner { diff --git a/notification/build.gradle b/notification/build.gradle index 4d02fad6b..6d2ed60c4 100644 --- a/notification/build.gradle +++ b/notification/build.gradle @@ -41,9 +41,9 @@ dependencies { } shadowJar { - relocate 'org.apache.http', 'com.amazon.opendistroforelasticsearch.notification.repackage.org.apache.http' - relocate 'org.apache.commons.logging', 'com.amazon.opendistroforelasticsearch.notification.repackage.org.apache.commons.logging' - relocate 'org.apache.commons.codec', 'com.amazon.opendistroforelasticsearch.notification.repackage.org.apache.commons.codec' + relocate 'org.apache.http', 'org.opensearch.notification.repackage.org.apache.http' + relocate 'org.apache.commons.logging', 'org.opensearch.notification.repackage.org.apache.commons.logging' + relocate 'org.apache.commons.codec', 'org.opensearch.notification.repackage.org.apache.commons.codec' classifier = null } @@ -61,7 +61,7 @@ publishing { publications { shadow(MavenPublication) { project.shadow.component(it) - groupId = 'com.amazon.opendistroforelasticsearch' + groupId = 'org.opensearch' artifactId = 'notification' artifact sourcesJar diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/Notification.java b/notification/src/main/java/org/opensearch/alerting/destination/Notification.java similarity index 80% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/Notification.java rename to notification/src/main/java/org/opensearch/alerting/destination/Notification.java index 6f953267e..15c9e5c29 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/Notification.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/Notification.java @@ -24,16 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination; +package org.opensearch.alerting.destination; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactory; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactoryProvider; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.BaseResponse; +import org.opensearch.alerting.destination.factory.DestinationFactory; +import org.opensearch.alerting.destination.factory.DestinationFactoryProvider; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.response.BaseResponse; import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; +import org.opensearch.alerting.destination.response.BaseResponse; /** * This is a client facing Notification class to publish the messages diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClient.java b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClient.java similarity index 93% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClient.java rename to notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClient.java index faca1dbb7..db504722f 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClient.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClient.java @@ -24,12 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.client; +package org.opensearch.alerting.destination.client; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.EmailMessage; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.EmailMessage; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.EmailMessage; import java.util.ArrayList; import java.util.List; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClientPool.java b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClientPool.java similarity index 94% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClientPool.java rename to notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClientPool.java index 7d1acef97..4b36e0859 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationEmailClientPool.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationEmailClientPool.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.client; +package org.opensearch.alerting.destination.client; /** * This class provides Client to the relevant destinations diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClient.java similarity index 95% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java rename to notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClient.java index 063cec6a9..8df374e9e 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClient.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.client; +package org.opensearch.alerting.destination.client; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.CustomWebhookMessage; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.CustomWebhookMessage; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.config.RequestConfig; @@ -46,6 +46,8 @@ import org.apache.http.util.EntityUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.CustomWebhookMessage; import org.opensearch.common.Strings; import org.opensearch.common.unit.TimeValue; import org.opensearch.rest.RestStatus; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClientPool.java b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClientPool.java similarity index 94% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClientPool.java rename to notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClientPool.java index 99a64092c..d74351367 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClientPool.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/client/DestinationHttpClientPool.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.client; +package org.opensearch.alerting.destination.client; /** * This class provides Client to the relevant destinations diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/ChimeDestinationFactory.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/ChimeDestinationFactory.java similarity index 83% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/ChimeDestinationFactory.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/ChimeDestinationFactory.java index 8580d2b98..45ecdcea4 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/ChimeDestinationFactory.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/ChimeDestinationFactory.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClientPool; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.ChimeMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.client.DestinationHttpClientPool; +import org.opensearch.alerting.destination.message.ChimeMessage; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.rest.RestStatus; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/CustomWebhookDestinationFactory.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/CustomWebhookDestinationFactory.java similarity index 83% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/CustomWebhookDestinationFactory.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/CustomWebhookDestinationFactory.java index 7013a668f..641d85683 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/CustomWebhookDestinationFactory.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/CustomWebhookDestinationFactory.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClientPool; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.CustomWebhookMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.client.DestinationHttpClientPool; +import org.opensearch.alerting.destination.message.CustomWebhookMessage; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.rest.RestStatus; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactory.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactory.java similarity index 78% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactory.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactory.java index 3c74a856f..09efc1848 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactory.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactory.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.BaseResponse; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.response.BaseResponse; /** * Interface which enables to plug in multiple notification Channel Factories. diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactoryProvider.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactoryProvider.java similarity index 93% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactoryProvider.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactoryProvider.java index 2f17551d1..bff1ce695 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/DestinationFactoryProvider.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/DestinationFactoryProvider.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.message.DestinationType; import java.util.HashMap; import java.util.Map; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/EmailDestinationFactory.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/EmailDestinationFactory.java similarity index 83% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/EmailDestinationFactory.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/EmailDestinationFactory.java index 612ce5029..c483933eb 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/EmailDestinationFactory.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/EmailDestinationFactory.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationEmailClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationEmailClientPool; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.EmailMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +import org.opensearch.alerting.destination.client.DestinationEmailClient; +import org.opensearch.alerting.destination.client.DestinationEmailClientPool; +import org.opensearch.alerting.destination.message.EmailMessage; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/SlackDestinationFactory.java b/notification/src/main/java/org/opensearch/alerting/destination/factory/SlackDestinationFactory.java similarity index 83% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/SlackDestinationFactory.java rename to notification/src/main/java/org/opensearch/alerting/destination/factory/SlackDestinationFactory.java index 0fe736155..f0d90c71c 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/factory/SlackDestinationFactory.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/factory/SlackDestinationFactory.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.factory; +package org.opensearch.alerting.destination.factory; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClientPool; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.SlackMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.client.DestinationHttpClientPool; +import org.opensearch.alerting.destination.message.SlackMessage; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.rest.RestStatus; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/BaseMessage.java b/notification/src/main/java/org/opensearch/alerting/destination/message/BaseMessage.java similarity index 97% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/BaseMessage.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/BaseMessage.java index 376140f0b..84633ef7a 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/BaseMessage.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/BaseMessage.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; import org.apache.http.client.utils.URIBuilder; import org.opensearch.common.Strings; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/ChimeMessage.java b/notification/src/main/java/org/opensearch/alerting/destination/message/ChimeMessage.java similarity index 97% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/ChimeMessage.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/ChimeMessage.java index 8a1c54bc7..3203e4169 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/ChimeMessage.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/ChimeMessage.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; import org.opensearch.common.Strings; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/CustomWebhookMessage.java b/notification/src/main/java/org/opensearch/alerting/destination/message/CustomWebhookMessage.java similarity index 99% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/CustomWebhookMessage.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/CustomWebhookMessage.java index 90863ac42..2247c25d5 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/CustomWebhookMessage.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/CustomWebhookMessage.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; import org.apache.http.client.methods.HttpPatch; import org.apache.http.client.methods.HttpPost; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/DestinationType.java b/notification/src/main/java/org/opensearch/alerting/destination/message/DestinationType.java similarity index 93% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/DestinationType.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/DestinationType.java index d5e58a553..cd8c8d241 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/DestinationType.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/DestinationType.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; /** * Supported notification destinations diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/EmailMessage.java b/notification/src/main/java/org/opensearch/alerting/destination/message/EmailMessage.java similarity index 98% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/EmailMessage.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/EmailMessage.java index 3efa33223..b8308ba11 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/EmailMessage.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/EmailMessage.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; import org.opensearch.common.Strings; import org.opensearch.common.settings.SecureString; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/SlackMessage.java b/notification/src/main/java/org/opensearch/alerting/destination/message/SlackMessage.java similarity index 97% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/SlackMessage.java rename to notification/src/main/java/org/opensearch/alerting/destination/message/SlackMessage.java index db150d4b2..79e466beb 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/message/SlackMessage.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/message/SlackMessage.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.message; +package org.opensearch.alerting.destination.message; import org.opensearch.common.Strings; diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/BaseResponse.java b/notification/src/main/java/org/opensearch/alerting/destination/response/BaseResponse.java similarity index 94% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/BaseResponse.java rename to notification/src/main/java/org/opensearch/alerting/destination/response/BaseResponse.java index 116a7b048..8cbd1aacd 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/BaseResponse.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/response/BaseResponse.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.response; +package org.opensearch.alerting.destination.response; /** * This class holds the generic response attributes diff --git a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/DestinationResponse.java b/notification/src/main/java/org/opensearch/alerting/destination/response/DestinationResponse.java similarity index 96% rename from notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/DestinationResponse.java rename to notification/src/main/java/org/opensearch/alerting/destination/response/DestinationResponse.java index 8ffc16118..218e721b8 100644 --- a/notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/response/DestinationResponse.java +++ b/notification/src/main/java/org/opensearch/alerting/destination/response/DestinationResponse.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination.response; +package org.opensearch.alerting.destination.response; /** * This class is a place holder for destination response metadata diff --git a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/ChimeDestinationTest.java b/notification/src/test/java/org/opensearch/alerting/destination/ChimeDestinationTest.java similarity index 92% rename from notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/ChimeDestinationTest.java rename to notification/src/test/java/org/opensearch/alerting/destination/ChimeDestinationTest.java index fe8605cc1..24f9d7031 100644 --- a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/ChimeDestinationTest.java +++ b/notification/src/test/java/org/opensearch/alerting/destination/ChimeDestinationTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination; - -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.ChimeDestinationFactory; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactoryProvider; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.ChimeMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +package org.opensearch.alerting.destination; + +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.factory.ChimeDestinationFactory; +import org.opensearch.alerting.destination.factory.DestinationFactoryProvider; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.ChimeMessage; +import org.opensearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; diff --git a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/CustomWebhookMessageTest.java b/notification/src/test/java/org/opensearch/alerting/destination/CustomWebhookMessageTest.java similarity index 93% rename from notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/CustomWebhookMessageTest.java rename to notification/src/test/java/org/opensearch/alerting/destination/CustomWebhookMessageTest.java index d5602f668..6913462dd 100644 --- a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/CustomWebhookMessageTest.java +++ b/notification/src/test/java/org/opensearch/alerting/destination/CustomWebhookMessageTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination; - -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.CustomWebhookDestinationFactory; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactoryProvider; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.CustomWebhookMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +package org.opensearch.alerting.destination; + +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.factory.CustomWebhookDestinationFactory; +import org.opensearch.alerting.destination.factory.DestinationFactoryProvider; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.CustomWebhookMessage; +import org.opensearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPatch; import org.apache.http.client.methods.HttpPost; diff --git a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/EmailDestinationTest.java b/notification/src/test/java/org/opensearch/alerting/destination/EmailDestinationTest.java similarity index 92% rename from notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/EmailDestinationTest.java rename to notification/src/test/java/org/opensearch/alerting/destination/EmailDestinationTest.java index 2b2790985..b020455a6 100644 --- a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/EmailDestinationTest.java +++ b/notification/src/test/java/org/opensearch/alerting/destination/EmailDestinationTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination; - -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactoryProvider; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.EmailDestinationFactory; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.EmailMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationEmailClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +package org.opensearch.alerting.destination; + +import org.opensearch.alerting.destination.factory.DestinationFactoryProvider; +import org.opensearch.alerting.destination.factory.EmailDestinationFactory; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.message.EmailMessage; +import org.opensearch.alerting.destination.client.DestinationEmailClient; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.easymock.EasyMock; import org.opensearch.common.settings.SecureString; import org.junit.Assert; diff --git a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/SlackDestinationTest.java b/notification/src/test/java/org/opensearch/alerting/destination/SlackDestinationTest.java similarity index 92% rename from notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/SlackDestinationTest.java rename to notification/src/test/java/org/opensearch/alerting/destination/SlackDestinationTest.java index dd5cfbcad..4c8f46ef4 100644 --- a/notification/src/test/java/com/amazon/opendistroforelasticsearch/alerting/destination/SlackDestinationTest.java +++ b/notification/src/test/java/org/opensearch/alerting/destination/SlackDestinationTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.alerting.destination; - -import com.amazon.opendistroforelasticsearch.alerting.destination.client.DestinationHttpClient; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.DestinationFactoryProvider; -import com.amazon.opendistroforelasticsearch.alerting.destination.factory.SlackDestinationFactory; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.BaseMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.DestinationType; -import com.amazon.opendistroforelasticsearch.alerting.destination.message.SlackMessage; -import com.amazon.opendistroforelasticsearch.alerting.destination.response.DestinationResponse; +package org.opensearch.alerting.destination; + +import org.opensearch.alerting.destination.client.DestinationHttpClient; +import org.opensearch.alerting.destination.factory.DestinationFactoryProvider; +import org.opensearch.alerting.destination.factory.SlackDestinationFactory; +import org.opensearch.alerting.destination.message.BaseMessage; +import org.opensearch.alerting.destination.message.DestinationType; +import org.opensearch.alerting.destination.message.SlackMessage; +import org.opensearch.alerting.destination.response.DestinationResponse; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity;