Skip to content

Allow --help without needing a connection to OpenSearch #4

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

Open
TibsAtWork opened this issue Jun 17, 2022 · 0 comments · May be fixed by #5
Open

Allow --help without needing a connection to OpenSearch #4

TibsAtWork opened this issue Jun 17, 2022 · 0 comments · May be fixed by #5

Comments

@TibsAtWork
Copy link
Contributor

If I install all the requirements and run:

python ./search.py --help

without setting SERVICE_URI , I get

Update SERVICE_URI to your cluster uri. Current value for SERVICE_URI=https://user:pass@hostname:port

It's a nice error message, but I'd like to be able to find out the CLI syntax before deciding that I want to start a service.

At the moment, the module config.py ends with

client = OpenSearch(SERVICE_URI, use_ssl=True)

which tries to make the connection to OpenSearch immediately on import. I think it would be simpler to wrap that in a function and get the user to call it when needed.

@laysauchoa laysauchoa linked a pull request Jun 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant