Skip to content

Commit

Permalink
s/Setting/CustomSetting/g
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis committed Sep 19, 2022
1 parent 0d49b29 commit aa3fb6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.opensearch.extensions.rest.RegisterRestActionsRequest;
import org.opensearch.extensions.rest.RestExecuteOnExtensionRequest;
import org.opensearch.extensions.rest.RestExecuteOnExtensionResponse;
import org.opensearch.extensions.settings.RegisterSettingsRequest;
import org.opensearch.extensions.settings.RegisterCustomSettingsRequest;
import org.opensearch.common.network.NetworkModule;
import org.opensearch.common.network.NetworkService;
import org.opensearch.common.settings.Setting;
Expand Down Expand Up @@ -183,7 +183,7 @@ InitializeExtensionsResponse handleExtensionInitRequest(InitializeExtensionsRequ
setOpensearchNode(opensearchNode);
extensionTransportService.connectToNode(opensearchNode);
sendRegisterRestActionsRequest(extensionTransportService);
sendRegisterSettingsRequest(extensionTransportService);
sendRegisterCustomSettingsRequest(extensionTransportService);
transportActions.sendRegisterTransportActionsRequest(extensionTransportService, opensearchNode);
}
}
Expand Down Expand Up @@ -430,15 +430,15 @@ public void sendRegisterRestActionsRequest(TransportService transportService) {
*
* @param transportService The TransportService defining the connection to OpenSearch.
*/
public void sendRegisterSettingsRequest(TransportService transportService) {
public void sendRegisterCustomSettingsRequest(TransportService transportService) {
logger.info("Sending Settings request to OpenSearch");
ExtensionStringResponseHandler registerSettingsResponseHandler = new ExtensionStringResponseHandler();
ExtensionStringResponseHandler registerCustomSettingsResponseHandler = new ExtensionStringResponseHandler();
try {
transportService.sendRequest(
opensearchNode,
ExtensionsOrchestrator.REQUEST_EXTENSION_REGISTER_SETTINGS,
new RegisterSettingsRequest(getUniqueId(), customSettings),
registerSettingsResponseHandler
ExtensionsOrchestrator.REQUEST_EXTENSION_REGISTER_CUSTOM_SETTINGS,
new RegisterCustomSettingsRequest(getUniqueId(), customSettings),
registerCustomSettingsResponseHandler
);
} catch (Exception e) {
logger.info("Failed to send Register Settings request to OpenSearch", e);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/opensearch/sdk/TestExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ public void testRegisterRestActionsRequest() {
}

@Test
public void testRegisterSettingsRequest() {
public void testRegisterCustomSettingsRequest() {

extensionsRunner.sendRegisterSettingsRequest(transportService);
extensionsRunner.sendRegisterCustomSettingsRequest(transportService);

verify(transportService, times(1)).sendRequest(any(), anyString(), any(), any(ExtensionStringResponseHandler.class));
}
Expand Down

0 comments on commit aa3fb6e

Please sign in to comment.