From 435395837bbe9f683a5378201ed3017f798c316d Mon Sep 17 00:00:00 2001 From: hkepley Date: Wed, 22 May 2024 14:59:27 -0400 Subject: [PATCH] OCM-6448 | fix: Fix UX bugs with CLI --- cmd/rosa-support/create/proxy/cmd.go | 14 +++++++------- cmd/rosa-support/create/sg/cmd.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/rosa-support/create/proxy/cmd.go b/cmd/rosa-support/create/proxy/cmd.go index 12cef32..77c7f16 100644 --- a/cmd/rosa-support/create/proxy/cmd.go +++ b/cmd/rosa-support/create/proxy/cmd.go @@ -16,7 +16,7 @@ var args struct { availabilityZone string imageID string privateKeyPath string - keyPairName string + keyPairFilePath string caFilePath string } @@ -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 --availability-zone --ca-file --keypair-name `, + rosa-support create proxy --region us-east-2 --vpc-id --availability-zone --ca-file --keypair-filepath `, Run: run, } @@ -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") @@ -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) @@ -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) } diff --git a/cmd/rosa-support/create/sg/cmd.go b/cmd/rosa-support/create/sg/cmd.go index a8e60b6..838af33 100644 --- a/cmd/rosa-support/create/sg/cmd.go +++ b/cmd/rosa-support/create/sg/cmd.go @@ -51,7 +51,7 @@ func init() { &args.count, "count", "", - 0, + 1, "Additional number of security groups to be created for the vpc", ) flags.StringVarP(