Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added attributes to identify plugin #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions src/main/java/transportservice/ExtensionSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ public class ExtensionSettings {
private String extensionname;
private String hostaddress;
private String hostport;
private String description;
private String version;
private String opensearchversion;

// Change the location to extension.yml file of the extension
static final String EXTENSION_DESCRIPTOR = "src/test/resources/extension.yml";

Expand Down Expand Up @@ -32,9 +36,27 @@ public void setHostport(String hostport) {
this.hostport = hostport;
}

@Override
public String toString() {
return "\nnodename: " + extensionname + "\nhostaddress: " + hostaddress + "\nhostPort: " + hostport + "\n";
public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public String getVersion() {
return version;
}

public void setVersion(String version) {
this.version = version;
}

public String getOpensearchversion() {
return opensearchversion;
}

public void setOpensearchversion(String opensearchversion) {
this.opensearchversion = opensearchversion;
}
}
19 changes: 19 additions & 0 deletions src/test/resources/extension.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
#

description: 'Example Extension File'

version: 'Version of plugin'

opensearchversion: 'OpenSearch Version'

extensionname: extension

hostaddress: 127.0.0.1

hostport: 4532