diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bf7ee9b58..4a6324756c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cmd/frostfs-cli/modules/container/create.go b/cmd/frostfs-cli/modules/container/create.go index 9a77e8727e..930529efb3 100644 --- a/cmd/frostfs-cli/modules/container/create.go +++ b/cmd/frostfs-cli/modules/container/create.go @@ -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 }