-
Notifications
You must be signed in to change notification settings - Fork 26
feat: add support for common v2 endpoints (ping/metrics/version/config) #413
feat: add support for common v2 endpoints (ping/metrics/version/config) #413
Conversation
76247c6
to
47cc250
Compare
47cc250
to
3965f6b
Compare
65177ad
to
6f5e1c7
Compare
8e20155
to
add7721
Compare
Thank you very much @lenny-intel for the helpful comments. I have responded to them inline, updated the code, force-pushed an update and marked the comments as resolved. |
add7721
to
634b022
Compare
634b022
to
9898a9c
Compare
Hi @lenny-intel - thanks again for your review. I have responded to all your comments and made some changes - I removed the format package and also for |
9898a9c
to
feebb32
Compare
This commit adds v2 (Ireland/Jakarta) support for four common endpoints: - version - metrics - ping - config For information about the available commands, use `edgex-cli -h` There are a number of ways to use the commands: 1. `edgex-cli version` displays version of each active microservice. The version commands just shows the version string. The other commands use a pretty-printed JSON structure. 2. `edgex-cli version -d` shows debug output - the URL used and the result 3. `edgex-cli version -j` gets the raw JSON output for one service (by default core-data) It's also possible to specify the service to use. : `-m/--metadata`, `-c/--command`, `-n/--notification`, `-s/--scheduler` or `--data` (which is the default). This can also be combined with `-j` or `-d` Example: - `$ edgex-cli metrics -j -m` - `$ edgex-cli ping -d --command` Help is available with ``` $ edgex-cli help $ edgex-cli version --help $ edgex-cli version --h ``` Signed-off-by: Siggi Skulason <siggi.skulason@canonical.com>
feebb32
to
1b3752f
Compare
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.
LGTM
feat: add support for common v2 endpoints (ping/metrics/version/config)
This commit adds v2 (Ireland/Jakarta) support for four common endpoints:
For information about the available commands, use
edgex-cli -h
There are a number of ways to use the commands:
edgex-cli version
displays version of each active microservice.The version commands just shows the version string. The other commands
use a pretty-printed JSON structure (config) or a table (metrics).
edgex-cli version -d
shows debug output - the URL used and the resultedgex-cli version -j
gets the raw JSON output for one service (by default core-data)It's possible to specify the service to use:
-m/--metadata
,-c/--command
,-n/--notification
,-s/--scheduler
or--data
(which is the default). This can also be combined with-j
or-d
Help is available with
PR Checklist
Please check if your PR fulfills the following requirements:
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-cli/blob/master/.github/Contributing.md.
What is the current behavior?
edgex-cli does not currently support the V2 API.
Issue Number:
What is the new behavior?
This PR adds support in edgex-cli for the common V2 endpoints.
Does this PR introduce a breaking change?
New Imports
Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
Other information