From 4c5806d282e00646cf6d2e8951ca927a5cc3be85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Walter?= Date: Mon, 30 Sep 2024 12:49:48 +0200 Subject: [PATCH] Revert "Update to plugins ISM API" This reverts commit 3fd61af58662bbdd978f05531219880079690c1c. --- .../dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java | 3 ++- .../plugins/sink/opensearch/index/IsmPolicyManagement.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java b/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java index 0b312621e0..d97feb30ba 100644 --- a/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java +++ b/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java @@ -1829,7 +1829,8 @@ private JsonNode getIndexSettings(final String index) throws IOException { } private String getIndexPolicyId(final String index) throws IOException { - final Request request = new Request(HttpMethod.GET, "/_plugins/_ism/explain/" + index); + // TODO: replace with new _opensearch API + final Request request = new Request(HttpMethod.GET, "/_opendistro/_ism/explain/" + index); final Response response = client.performRequest(request); final String responseBody = EntityUtils.toString(response.getEntity()); diff --git a/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IsmPolicyManagement.java b/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IsmPolicyManagement.java index 7e4de8fef0..988d00b2e5 100644 --- a/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IsmPolicyManagement.java +++ b/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IsmPolicyManagement.java @@ -44,7 +44,8 @@ class IsmPolicyManagement implements IsmPolicyManagementStrategy { private static final Logger LOG = LoggerFactory.getLogger(IsmPolicyManagement.class); - private static final String POLICY_MANAGEMENT_ENDPOINT = "/_plugins/_ism/policies/"; + // TODO: replace with new _opensearch API + private static final String POLICY_MANAGEMENT_ENDPOINT = "/_opendistro/_ism/policies/"; public static final String DEFAULT_INDEX_SUFFIX = "-000001"; private static final String POLICY_FILE_ROOT_KEY = "policy"; private static final String POLICY_FILE_ISM_TEMPLATE_KEY = "ism_template";