Skip to content

Add new exec utility and import yugatool/yugaware-client#84

Open
cigoldstein wants to merge 1 commit into
yugabyte:mainfrom
cigoldstein:add_tools-yb-support-tool
Open

Add new exec utility and import yugatool/yugaware-client#84
cigoldstein wants to merge 1 commit into
yugabyte:mainfrom
cigoldstein:add_tools-yb-support-tool

Conversation

@cigoldstein
Copy link
Copy Markdown

  • 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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