-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add a "cluster curl" tool #1046
Add a "cluster curl" tool #1046
Conversation
Signed-off-by: Mikayla Thompson <[email protected]>
Signed-off-by: Mikayla Thompson <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1046 +/- ##
============================================
+ Coverage 80.57% 80.60% +0.03%
Complexity 2736 2736
============================================
Files 365 365
Lines 13611 13653 +42
Branches 941 941
============================================
+ Hits 10967 11005 +38
- Misses 2067 2071 +4
Partials 577 577
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Mikayla Thompson <[email protected]>
TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/cluster_curl/Pipfile
Outdated
Show resolved
Hide resolved
"--config-file", default="/etc/migration_services.yaml", help="Path to config file" | ||
) | ||
@click.option('-v', '--verbose', count=True, help="Verbosity level. Default is warn, -v is info, -vv is debug.") | ||
@click.option('-X', '--request', default='GET', help="HTTP method to use", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--request is a bit confusing. Is that what curl (or anything else) uses? 'Verb' or 'method' are common labels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what curl uses
install_requires=["console_link", "Click"], | ||
entry_points={ | ||
"console_scripts": [ | ||
"ccurl = cli:cli", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd choose another name other than curl as the root name. With curl, a user might think that they can use --verbose to trace activity, append a binary file, set cookies, etc. This is useful by itself. It doesn't need to try to replace or compete with curl.
Signed-off-by: Mikayla Thompson <[email protected]>
Signed-off-by: Mikayla Thompson <[email protected]>
Signed-off-by: Mikayla Thompson <[email protected]>
Signed-off-by: Mikayla Thompson <[email protected]>
Signed-off-by: Mikayla Thompson <[email protected]>
bd8fa79
to
8d0e534
Compare
Description
This adds a curl-like command to our cli, called
clusters rest-call
. The user specifies which cluster and then a path, and it makes a call and returns the result.Issues Resolved
https://opensearch.atlassian.net/browse/MIGRATIONS-2047
Testing
Adding now.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.