diff --git a/.github/workflows/draft-release-notes-workflow.yml b/.github/workflows/draft-release-notes-workflow.yml index 1713f5c7..e321a271 100644 --- a/.github/workflows/draft-release-notes-workflow.yml +++ b/.github/workflows/draft-release-notes-workflow.yml @@ -16,6 +16,6 @@ jobs: with: config-name: draft-release-notes-config.yml tag: (None) - version: 2.9.0.0 + version: 2.10.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index cbd1ede8..954e0d0c 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { opensearch_group = "org.opensearch" isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.9.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.10.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -26,7 +26,7 @@ buildscript { common_utils_version = System.getProperty("common_utils.version", opensearch_build) job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.6.0") + kotlin_version = System.getProperty("kotlin.version", "1.8.21") jackson_version = "2.14.1" } @@ -42,7 +42,7 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0" - classpath "org.jacoco:org.jacoco.agent:0.8.5" + classpath "org.jacoco:org.jacoco.agent:0.8.8" } } diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt index 9ed1e493..3062d8d3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt @@ -11,12 +11,12 @@ import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.node.DiscoveryNodes import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.NamedWriteableRegistry import org.opensearch.common.settings.ClusterSettings import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.common.settings.Setting import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsFilter +import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.env.Environment import org.opensearch.env.NodeEnvironment diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt index 1b56c97a..ca4315fa 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt @@ -16,17 +16,17 @@ import org.opensearch.action.ActionResponse import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.client.Client -import org.opensearch.common.io.stream.Writeable import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.authuser.User +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.rest.RestStatus import org.opensearch.index.IndexNotFoundException import org.opensearch.index.engine.VersionConflictEngineException import org.opensearch.indices.InvalidIndexNameException import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt index a3c30a1d..c3812fe6 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.metrics.Metrics @@ -23,7 +24,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportDefinitionRequest import org.opensearch.reportsscheduler.model.UpdateReportDefinitionResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt index 37f32280..c2751ab0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.index.ReportInstancesIndex @@ -25,7 +26,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusRequest import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt index fbcc155c..2bc10fe9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt @@ -7,10 +7,10 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionResponse import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.rest.RestStatus /** * Base response which give REST status. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt index c41621b4..c3000dd0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt index 89ce2df5..2d0342aa 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt index d6676c78..6c50e501 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt index 77065e11..144fb1ca 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt index b247d13b..258b15ac 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt index a95ecdb7..1002022e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt @@ -5,9 +5,9 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt index 33c2e7f6..5863e368 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt index 34bc9444..c76ff856 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt @@ -5,9 +5,9 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt index 308cce23..07271272 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt index 9e5ef74d..6e361e66 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt index 877b8166..cc2282be 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt index 0a8714ad..293c022c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt index e95b9ea0..24031014 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt index 5ea88c6f..4aa9be58 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt index 9176ebde..b1402222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt index 1a4002b9..d4cd36f4 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt index bbfd4449..5aed866c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.jobscheduler.spi.schedule.ScheduleParser import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt index 8a88f111..352427d9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.ScheduledJobParameter import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt index 81c20bd5..1a9ef222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.ACCESS_LIST_FIELD import org.opensearch.reportsscheduler.model.RestTag.BEGIN_TIME_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt index b53b0acc..ecf74062 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt @@ -11,13 +11,13 @@ import org.apache.lucene.search.TotalHits.Relation.EQUAL_TO import org.apache.lucene.search.TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO import org.opensearch.action.search.SearchResponse import org.opensearch.common.xcontent.LoggingDeprecationHandler -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REST_OUTPUT_PARAMS import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt index 4f5fce20..fc6df23c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt index e10352b4..75d63203 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt index 83cb9615..47da69c3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt index ba358efc..a19d51bf 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt index 492aa346..483ff762 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.InContextReportCreateAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for creating on-demand report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt index 3ea8fcd4..6a813ddc 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportDefinitionsAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report definitions. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt index 0a8c9221..6a3abf4d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.CreateReportDefinitionAction @@ -28,7 +29,6 @@ import org.opensearch.rest.RestRequest.Method.DELETE import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for report definitions lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt index a3eaef1a..a5094bbe 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportInstancesAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt index 5f3a6d99..1400d7a3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetReportInstanceAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST -import org.opensearch.rest.RestStatus /** * Rest handler for report instances lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt index 1900c7b6..0a19975e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.metrics.Metrics @@ -15,7 +16,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting reporting backend stats diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt index 207487a7..a0cf270d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.resthandler +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.BaseResponse import org.opensearch.rest.BytesRestResponse import org.opensearch.rest.RestChannel import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus import org.opensearch.rest.action.RestToXContentListener /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt index a7ee17c9..9f25831f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt @@ -7,9 +7,9 @@ package org.opensearch.reportsscheduler.security import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.settings.PluginSettings -import org.opensearch.rest.RestStatus /** * Class for checking/filtering user access. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt index dd8f7634..08e35a89 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt @@ -7,9 +7,8 @@ package org.opensearch.reportsscheduler.util import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.DeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent @@ -17,6 +16,7 @@ import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.model.ReportInstance import org.opensearch.rest.RestRequest import java.net.URI diff --git a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt index e1eb7550..875ab509 100644 --- a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt @@ -7,12 +7,12 @@ package org.opensearch.integTest.bwc import org.junit.Assert import org.opensearch.common.settings.Settings +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class ReportsSchedulerBackwardsCompatibilityIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt index 07e8c243..f3956d41 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -13,7 +14,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class InContextMenuReportGenerationIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt index 399d144e..7decd12a 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -14,7 +15,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Duration import java.time.Instant diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt index 15385396..434580c7 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportDefinitionIT : PluginRestTestCase() { fun `test create, get, update, delete report definition`() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt index 926cd8ff..8ec9bfa0 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportInstanceIT : PluginRestTestCase() { fun `test update on-demand report definition status to success after creation`() {