Skip to content

Commit

Permalink
OCM-6448 | fix: Fix UX bugs with CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterkepley committed May 22, 2024
1 parent 3665d1d commit 4353958
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions cmd/rosa-support/create/proxy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var args struct {
availabilityZone string
imageID string
privateKeyPath string
keyPairName string
keyPairFilePath string
caFilePath string
}

Expand All @@ -25,7 +25,7 @@ var Cmd = &cobra.Command{
Short: "Create proxy",
Long: "Create proxy.",
Example: ` # Create a proxy
rosa-support create proxy --region us-east-2 --vpc-id <vpc id> --availability-zone <AZ> --ca-file <filepath> --keypair-name <name>`,
rosa-support create proxy --region us-east-2 --vpc-id <vpc id> --availability-zone <AZ> --ca-file <filepath> --keypair-filepath <path/filename>`,
Run: run,
}

Expand Down Expand Up @@ -70,11 +70,11 @@ func init() {
)

flags.StringVarP(
&args.keyPairName,
"keypair-name",
&args.keyPairFilePath,
"keypair-filepath",
"",
"",
"Stores key pair in the given path (required)",
"Exact filepath/filename of the keypair. Example: 'my-keys.pem' or '../foo/bar/my-keys.pem' (required)",
)

err := Cmd.MarkFlagRequired("vpc-id")
Expand All @@ -97,7 +97,7 @@ func init() {
logger.LogError(err.Error())
os.Exit(1)
}
err = Cmd.MarkFlagRequired("keypair-name")
err = Cmd.MarkFlagRequired("keypair-filepath")
if err != nil {
logger.LogError(err.Error())
os.Exit(1)
Expand All @@ -109,7 +109,7 @@ func run(cmd *cobra.Command, _ []string) {
if err != nil {
panic(err)
}
_, ip, ca, err := vpc.LaunchProxyInstance(args.imageID, args.availabilityZone, args.keyPairName)
_, ip, ca, err := vpc.LaunchProxyInstance(args.imageID, args.availabilityZone, args.keyPairFilePath)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/rosa-support/create/sg/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func init() {
&args.count,
"count",
"",
0,
1,
"Additional number of security groups to be created for the vpc",
)
flags.StringVarP(
Expand Down

0 comments on commit 4353958

Please sign in to comment.