Skip to content

Commit

Permalink
Align command line parameter naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
MeenuyD committed Jun 4, 2024
1 parent 9cf56d1 commit 1bbc6c0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
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

0 comments on commit 1bbc6c0

Please sign in to comment.