From 1bbc6c091528889d8d4bed908d7f0ced204ab0e0 Mon Sep 17 00:00:00 2001 From: MeenuyD Date: Tue, 4 Jun 2024 15:52:48 +0530 Subject: [PATCH] Align command line parameter naming conventions --- cmd/network/evpn-svi.go | 8 ++++---- cmd/storage/backend/nvme_controller.go | 2 +- cmd/storage/backend/nvme_path.go | 2 +- cmd/storage/frontend/nvme_controller.go | 2 +- cmd/storage/frontend/nvme_namespace.go | 2 +- cmd/storage/frontend/nvme_subsystem.go | 2 +- cmd/storage/frontend/virtio_blk.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/network/evpn-svi.go b/cmd/network/evpn-svi.go index 2ebe32b..055e48b 100644 --- a/cmd/network/evpn-svi.go +++ b/cmd/network/evpn-svi.go @@ -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") @@ -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) } @@ -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) @@ -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 } diff --git a/cmd/storage/backend/nvme_controller.go b/cmd/storage/backend/nvme_controller.go index 885e6a3..2d63eac 100644 --- a/cmd/storage/backend/nvme_controller.go +++ b/cmd/storage/backend/nvme_controller.go @@ -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")) diff --git a/cmd/storage/backend/nvme_path.go b/cmd/storage/backend/nvme_path.go index c12c37e..4e3bc1d 100644 --- a/cmd/storage/backend/nvme_path.go +++ b/cmd/storage/backend/nvme_path.go @@ -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")) diff --git a/cmd/storage/frontend/nvme_controller.go b/cmd/storage/frontend/nvme_controller.go index c3f5944..f4470b7 100644 --- a/cmd/storage/frontend/nvme_controller.go +++ b/cmd/storage/frontend/nvme_controller.go @@ -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")) diff --git a/cmd/storage/frontend/nvme_namespace.go b/cmd/storage/frontend/nvme_namespace.go index 9251d0a..5a907c0 100644 --- a/cmd/storage/frontend/nvme_namespace.go +++ b/cmd/storage/frontend/nvme_namespace.go @@ -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")) diff --git a/cmd/storage/frontend/nvme_subsystem.go b/cmd/storage/frontend/nvme_subsystem.go index 3df6919..e397d1b 100644 --- a/cmd/storage/frontend/nvme_subsystem.go +++ b/cmd/storage/frontend/nvme_subsystem.go @@ -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")) diff --git a/cmd/storage/frontend/virtio_blk.go b/cmd/storage/frontend/virtio_blk.go index c8bd60a..a8cb1c2 100644 --- a/cmd/storage/frontend/virtio_blk.go +++ b/cmd/storage/frontend/virtio_blk.go @@ -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"))