Add new exec utility and import yugatool/yugaware-client#84
Open
cigoldstein wants to merge 1 commit into
Open
Conversation
cigoldstein
commented
Sep 24, 2023
- cobra commands are now broken out by upload/exec/import
- new exec command allows commands to be executed across all universe nodes
- exec can lookup inventory using yugaware client or except a json/yaml file
- existing yugatool and yugaware-client applications imported into yb-support-tool
- cobra commands are now broken out by upload/exec/import - new exec command allows commands to be executed across all universe nodes - exec can lookup inventory using yugaware client or except a json/yaml file - existing yugatool and yugaware-client applications imported into yb-support-tool
cdc63c8 to
1476299
Compare
tvesely
reviewed
Sep 28, 2023
|
|
||
| if isVerbose { | ||
| fmt.Printf("Command: \"yugaware-client universe list -o json --hostname %s --api-token <redacted>\"\n", hostname) | ||
| } |
Contributor
There was a problem hiding this comment.
This should be writing the entire command including arguments from the args array or such, rather than writing it out. Did you do this in order to have the api token?
| } `json:"universeDetails" yaml:"universeDetails"` | ||
| } | ||
|
|
||
| func YbaLookup(hostname, apiToken string, isInsecure, isVerbose bool) []Inventory { |
Contributor
There was a problem hiding this comment.
You should break this out as a module so that you can run yugaware-client commands without all this boilerplate next time.
|
|
||
| type Inventory struct { | ||
| Name string `json:"name" yaml:"name"` | ||
| UniverseDetails struct { |
Contributor
There was a problem hiding this comment.
You know, the UniverseDetails data structure already exists in the yugaware-client library that was generated by swagger. Is it this way in order to omit fields you don't care about?
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.