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

fix: command line parameter naming conventions #452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/network/evpn-svi.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func CreateSVI() *cobra.Command {
}
cmd.Flags().StringVar(&name, "name", "", "SVI Name")
cmd.Flags().StringVar(&vrf, "vrf", "", "Must be unique")
cmd.Flags().StringVar(&logicalBridge, "logicalBridge", "", "Pair of vni and vlan_id must be unique")
cmd.Flags().StringVar(&logicalBridge, "logical-bridge", "", "Pair of vni and vlan_id must be unique")
cmd.Flags().StringVar(&mac, "mac", "", "GW MAC address, random MAC assigned if not specified")
cmd.Flags().StringSliceVar(&gwIPs, "gw-ips", nil, "List of GW IP addresses")
cmd.Flags().BoolVar(&ebgp, "ebgp", false, "Enable eBGP in VRF for tenants connected through this SVI")
Expand All @@ -66,7 +66,7 @@ func CreateSVI() *cobra.Command {
log.Fatalf("Error marking flag as required: %v", err)
}

if err := cmd.MarkFlagRequired("logicalBridge"); err != nil {
if err := cmd.MarkFlagRequired("logical-bridge"); err != nil {
log.Fatalf("Error marking flag as required: %v", err)
}

Expand Down Expand Up @@ -113,7 +113,7 @@ func DeleteSVI() *cobra.Command {
}

cmd.Flags().StringVarP(&name, "name", "n", "", "Specify the name of the BridgePort")
cmd.Flags().BoolVarP(&allowMissing, "allowMissing", "a", false, "Specify the name of the BridgePort")
cmd.Flags().BoolVarP(&allowMissing, "allow-missing", "a", false, "Specify the name of the BridgePort")

if err := cmd.MarkFlagRequired("name"); err != nil {
log.Fatalf("Error marking flag as required: %v", err)
Expand Down Expand Up @@ -245,7 +245,7 @@ func UpdateSVI() *cobra.Command {
},
}
cmd.Flags().StringSliceVar(&updateMask, "update-mask", nil, "update mask")
cmd.Flags().BoolVarP(&allowMissing, "allowMissing", "a", false, "allow the missing")
cmd.Flags().BoolVarP(&allowMissing, "allow-missing", "a", false, "allow the missing")

return cmd
}
2 changes: 1 addition & 1 deletion cmd/storage/backend/nvme_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func newDeleteNvmeControllerCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted remote controller")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/backend/nvme_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func newDeleteNvmePathCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted nvme path")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/frontend/nvme_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func newDeleteNvmeControllerCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted controller")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/frontend/nvme_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func newDeleteNvmeNamespaceCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted namespace")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/frontend/nvme_subsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func newDeleteNvmeSubsystemCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted subsystem")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/frontend/virtio_blk.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func newDeleteVirtioBlkCommand() *cobra.Command {
}

cmd.Flags().StringVar(&name, "name", "", "name of deleted virtio-blk controller")
cmd.Flags().BoolVar(&allowMissing, "allowMissing", false, "cmd succeeds if attempts to delete a resource that is not present")
cmd.Flags().BoolVar(&allowMissing, "allow-missing", false, "cmd succeeds if attempts to delete a resource that is not present")

cobra.CheckErr(cmd.MarkFlagRequired("name"))

Expand Down
Loading