-
Notifications
You must be signed in to change notification settings - Fork 18
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 new exec utility and import yugatool/yugaware-client #84
base: main
Are you sure you want to change the base?
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
|
||
if isVerbose { | ||
fmt.Printf("Command: \"yugaware-client universe list -o json --hostname %s --api-token <redacted>\"\n", hostname) | ||
} |
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 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 { |
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.
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 { |
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.
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?