cli: Improve chain rule managing commands #909
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#909
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:feat/cli-ape"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
are both empty.
e54a8edb47
to8285cb3ac5
8285cb3ac5
to506ecd555c
WIP: [#XX] cli: Make add-rule and list-rules recieve namespace paramto cli: Improve chain rule managing commands506ecd555c
to0777e30836
cli: Improve chain rule managing commandsto WIP: cli: Improve chain rule managing commands0777e30836
toe2c49f4e6c
WIP: cli: Improve chain rule managing commandsto cli: Improve chain rule managing commands@ -24,0 +35,4 @@
Type: control.ChainTarget_CONTAINER,
}
}
nsStr, _ := cmd.Flags().GetString(commonflags.NSFlag)
I suggest requiring you to enter "root' explicitly. Because if I forgot to enter correct namespace, then root namespace will be affected.
@aarifullin @fyrchik what do you think?
Root is somewhat default namespace, but I like the idea.
Though, if I don't know anything about namespaces, it is somewhat irrelevant.
We could also print it in verbose mode.
Actually, I would argue, that rules on some specific namespace should not be a common scenario for a node administrator.
explanation:
frostfs-cli add-rule ...
without namespace leads to using root namespacefrostfs-cli add-rule --namespace
leads to errorfrostfs-cli add-rule --namespace root
leads to using root namespace@dstepanov-yadro
I have decided to make the usage consistent with
frostfs-adm
and introduced flags--target-type --target-name
. That is correct because flags make the command usage more intuitive (and, again, consistent with admin util).Also, I liked the idea suggested by @fyrchik to make an interaction
confirm if you wanna use root namespace
if name flag is not set.If no one likes how it looks then I will just make
--target-name
flag as required and""
won't be acceptable for inputFine!
e2c49f4e6c
to71dc5c257a
71dc5c257a
to00a1184f9c
Updated PR: removed unused flags