Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cigoldstein
Copy link

  • 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
@cigoldstein cigoldstein deleted the add_tools-yb-support-tool branch September 25, 2023 14:27
@cigoldstein cigoldstein restored the add_tools-yb-support-tool branch September 25, 2023 14:28
@cigoldstein cigoldstein reopened this Sep 25, 2023
@cigoldstein cigoldstein force-pushed the add_tools-yb-support-tool branch from cdc63c8 to 1476299 Compare September 25, 2023 15:10
@cigoldstein cigoldstein reopened this Sep 25, 2023

if isVerbose {
fmt.Printf("Command: \"yugaware-client universe list -o json --hostname %s --api-token <redacted>\"\n", hostname)
}
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants