Skip to content

Commit

Permalink
Move OPENSEARCH_DISTRIBUTION_OPTION.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Aug 14, 2024
1 parent 1696f4a commit 090a038
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 0 additions & 6 deletions tools/src/OpenSearchHttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export const OPENSEARCH_URL_OPTION = new Option('--opensearch-url <url>', 'URL a
.default(DEFAULT_URL)
.env('OPENSEARCH_URL')

export const OPENSEARCH_DISTRIBUTION_OPTION = new Option('--opensearch-distribution <key>', 'OpenSearch distribution')
.default('opensearch.org')
.env('OPENSEARCH_DISTRIBUTION')

export const OPENSEARCH_USERNAME_OPTION = new Option('--opensearch-username <username>', 'username to use when authenticating with OpenSearch')
.default(DEFAULT_USER)
.env('OPENSEARCH_USERNAME')
Expand Down Expand Up @@ -68,7 +64,6 @@ export interface AwsAuth {

export interface OpenSearchHttpClientOptions {
url?: string
distribution?: string,
insecure?: boolean
responseType?: ResponseType
logger?: Logger,
Expand All @@ -94,7 +89,6 @@ export type OpenSearchHttpClientCliOptions = {
export function get_opensearch_opts_from_cli (opts: OpenSearchHttpClientCliOptions): OpenSearchHttpClientOptions {
return {
url: opts.opensearchUrl,
distribution: opts.opensearchDistribution,
insecure: opts.opensearchInsecure,
basic_auth: opts.opensearchUsername !== undefined && opts.opensearchPassword !== undefined ? {
username: opts.opensearchUsername,
Expand Down
5 changes: 3 additions & 2 deletions tools/src/tester/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
AWS_SERVICE_OPTION,
AWS_SESSION_TOKEN_OPTION,
get_opensearch_opts_from_cli,
OPENSEARCH_DISTRIBUTION_OPTION,
OPENSEARCH_INSECURE_OPTION,
OPENSEARCH_PASSWORD_OPTION,
OPENSEARCH_URL_OPTION,
Expand Down Expand Up @@ -48,8 +47,10 @@ const command = new Command()
.addOption(new Option('--verbose', 'whether to print the full stack trace of errors').default(false))
.addOption(new Option('--dry-run', 'dry run only, do not make HTTP requests').default(false))
.addOption(new Option('--opensearch-version <number>', 'target OpenSearch schema version').default(undefined))
.addOption(new Option('--opensearch-distribution <key>', 'OpenSearch distribution')
.default('opensearch.org')
.env('OPENSEARCH_DISTRIBUTION'))
.addOption(OPENSEARCH_URL_OPTION)
.addOption(OPENSEARCH_DISTRIBUTION_OPTION)
.addOption(OPENSEARCH_USERNAME_OPTION)
.addOption(OPENSEARCH_PASSWORD_OPTION)
.addOption(OPENSEARCH_INSECURE_OPTION)
Expand Down

0 comments on commit 090a038

Please sign in to comment.