This repository was archived by the owner on Feb 18, 2025. It is now read-only.
Add topology tags command#942
Merged
shlomi-noach merged 8 commits intoopenark:masterfrom Dec 4, 2019
nickdelnano:add-topology-tags-command
Merged
Add topology tags command#942shlomi-noach merged 8 commits intoopenark:masterfrom nickdelnano:add-topology-tags-command
shlomi-noach merged 8 commits intoopenark:masterfrom
nickdelnano:add-topology-tags-command
Conversation
Collaborator
|
Thank you and sorry for the slow response. Getting to this in a few days. |
Contributor
Author
|
Hi @shlomi-noach , can you let me know whether this is a PR you are interested in reviewing (and considering for submission) ? |
Collaborator
|
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. |
Collaborator
|
Sorry about the delay; I expect to look into & merge a bunch of community PRs during the first two weeks of October. |
shlomi-noach
approved these changes
Dec 4, 2019
Collaborator
shlomi-noach
left a comment
There was a problem hiding this comment.
Again, apologies for the delay.
Thank you for this PR, for keeping inline with the existing coding conventions, for adding tests. This looks good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.goso 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 andcurled the new endpoint and invoked it with the modifiedorchestrator-clientscript from this PR.gofmt(please avoidgoimports)./build.shgo test ./go/...