-
Notifications
You must be signed in to change notification settings - Fork 938
Add topology tags command #942
Add topology tags command #942
Conversation
Thank you and sorry for the slow response. Getting to this in a few days. |
Hi @shlomi-noach , can you let me know whether this is a PR you are interested in reviewing (and considering for submission) ? |
Terribly sorry for the delay. Please understand my current workload demands my attention at other places, I can still be slow to look into this -- please bare with me. |
Sorry about the delay; I expect to look into & merge a bunch of community PRs during the first two weeks of October. |
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.
Again, apologies for the delay.
Thank you for this PR, for keeping inline with the existing coding conventions, for adding tests. This looks good!
Related issue: #941
Description
This PR adds a command "topology-tags" to the HTTP API and the CLI interface to act exactly like the "topology" command but also to print the tags for each instance on the same line as the instance itself.
A proposal for the text formatting is specified in #941, but copied here:
I chose to add a separate command for this functionality instead of modifying "topology" or "topology-tabulated" in order to not modify existing APIs.
There is no option for printing tags for a tabulated topology, though this could be added if desired.
Testing
I added an integration test following the same pattern as the testing of the "topology" command, which invokes the orchestrator CLI to call the command which is added in this PR.
I did not see unit tests for the functions which I modified in
go/inst/instance_topology.go
so I did not add any. I also did not add any tests for the HTTP endpoint for the new command since I see only minimal testing ingo/http/api_test.go
, though I did run orchestrator in http mode andcurl
ed the new endpoint and invoked it with the modifiedorchestrator-client
script from this PR.gofmt
(please avoidgoimports
)./build.sh
go test ./go/...