forked from TrueCloudLab/frostfs-node
[#1095] cli: Support user/group target for local overrides
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
5a2a877cca
commit
dff4dd545e
1 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,8 @@ const (
|
||||||
defaultNamespace = "root"
|
defaultNamespace = "root"
|
||||||
namespaceTarget = "namespace"
|
namespaceTarget = "namespace"
|
||||||
containerTarget = "container"
|
containerTarget = "container"
|
||||||
|
userTarget = "user"
|
||||||
|
groupTarget = "group"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -66,6 +68,16 @@ func parseTarget(cmd *cobra.Command) *control.ChainTarget {
|
||||||
Name: name,
|
Name: name,
|
||||||
Type: control.ChainTarget_CONTAINER,
|
Type: control.ChainTarget_CONTAINER,
|
||||||
}
|
}
|
||||||
|
case userTarget:
|
||||||
|
return &control.ChainTarget{
|
||||||
|
Name: name,
|
||||||
|
Type: control.ChainTarget_USER,
|
||||||
|
}
|
||||||
|
case groupTarget:
|
||||||
|
return &control.ChainTarget{
|
||||||
|
Name: name,
|
||||||
|
Type: control.ChainTarget_GROUP,
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
commonCmd.ExitOnErr(cmd, "read target type error: %w", errUnknownTargetType)
|
commonCmd.ExitOnErr(cmd, "read target type error: %w", errUnknownTargetType)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue