forked from TrueCloudLab/frostfs-node
[#37] cli: Add nns-name
and nns-zone
for container create
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
6925fb4c59
commit
88e3868f47
2 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,7 @@ Changelog for FrostFS Node
|
|||
- `object.delete.tombstone_lifetime` config parameter to set tombstone lifetime in the DELETE service (#2246)
|
||||
- Reload config for pprof and metrics on SIGHUP in `neofs-node` (#1868)
|
||||
- Multiple configs support (#44)
|
||||
- Parameters `nns-name` and `nns-zone` for command `frostfs-cli container create` (#37)
|
||||
|
||||
### Changed
|
||||
- Change `frostfs_node_engine_container_size` to counting sizes of logical objects
|
||||
|
|
|
@ -26,6 +26,8 @@ var (
|
|||
containerAttributes []string
|
||||
containerAwait bool
|
||||
containerName string
|
||||
containerNnsName string
|
||||
containerNnsZone string
|
||||
containerNoTimestamp bool
|
||||
containerSubnet string
|
||||
force bool
|
||||
|
@ -160,6 +162,8 @@ func initContainerCreateCmd() {
|
|||
flags.StringSliceVarP(&containerAttributes, "attributes", "a", nil, "Comma separated pairs of container attributes in form of Key1=Value1,Key2=Value2")
|
||||
flags.BoolVar(&containerAwait, "await", false, "Block execution until container is persisted")
|
||||
flags.StringVar(&containerName, "name", "", "Container name attribute")
|
||||
flags.StringVar(&containerNnsName, "nns-name", "", "Container nns name attribute")
|
||||
flags.StringVar(&containerNnsZone, "nns-zone", "", "Container nns zone attribute")
|
||||
flags.BoolVar(&containerNoTimestamp, "disable-timestamp", false, "Disable timestamp container attribute")
|
||||
flags.StringVar(&containerSubnet, "subnet", "", "String representation of container subnetwork")
|
||||
flags.BoolVarP(&force, commonflags.ForceFlag, commonflags.ForceFlagShorthand, false,
|
||||
|
@ -213,5 +217,10 @@ func parseAttributes(dst *container.Container, attributes []string) error {
|
|||
container.SetName(dst, containerName)
|
||||
}
|
||||
|
||||
var domain container.Domain
|
||||
domain.SetName(containerNnsName)
|
||||
domain.SetZone(containerNnsZone)
|
||||
container.WriteDomain(dst, domain)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue