adm: Make --namespace flag required #1026

Merged
fyrchik merged 1 commit from achuprov/frostfs-node:bugfix/namespace_require into master 2024-03-05 18:40:50 +00:00

View file

@ -155,6 +155,7 @@ func initFrostfsIDCreateNamespaceCmd() {
frostfsidCreateNamespaceCmd.Flags().StringP(commonflags.EndpointFlag, commonflags.EndpointFlagShort, "", commonflags.EndpointFlagDesc)
frostfsidCreateNamespaceCmd.Flags().String(namespaceFlag, "", "Namespace name to create")
frostfsidCreateNamespaceCmd.Flags().String(commonflags.AlphabetWalletsFlag, "", commonflags.AlphabetWalletsFlagDesc)
_ = frostfsidCreateNamespaceCmd.MarkFlagRequired(namespaceFlag)

It should be required only for create-namespace, other commands can use root namespace by default (which is, quite conveniently, also an empty string).
cc @aarifullin

It should be required only for `create-namespace`, other commands can use `root` namespace by default (which is, quite conveniently, also an empty string). cc @aarifullin

Other operations should pass on dev-env without namespace, could you recheck this?

Other operations should pass on dev-env without namespace, could you recheck this?
}
func initFrostfsIDListNamespacesCmd() {