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)
|
- `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)
|
- Reload config for pprof and metrics on SIGHUP in `neofs-node` (#1868)
|
||||||
- Multiple configs support (#44)
|
- Multiple configs support (#44)
|
||||||
|
- Parameters `nns-name` and `nns-zone` for command `frostfs-cli container create` (#37)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Change `frostfs_node_engine_container_size` to counting sizes of logical objects
|
- Change `frostfs_node_engine_container_size` to counting sizes of logical objects
|
||||||
|
|
|
@ -26,6 +26,8 @@ var (
|
||||||
containerAttributes []string
|
containerAttributes []string
|
||||||
containerAwait bool
|
containerAwait bool
|
||||||
containerName string
|
containerName string
|
||||||
|
containerNnsName string
|
||||||
|
containerNnsZone string
|
||||||
containerNoTimestamp bool
|
containerNoTimestamp bool
|
||||||
containerSubnet string
|
containerSubnet string
|
||||||
force bool
|
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.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.BoolVar(&containerAwait, "await", false, "Block execution until container is persisted")
|
||||||
flags.StringVar(&containerName, "name", "", "Container name attribute")
|
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.BoolVar(&containerNoTimestamp, "disable-timestamp", false, "Disable timestamp container attribute")
|
||||||
flags.StringVar(&containerSubnet, "subnet", "", "String representation of container subnetwork")
|
flags.StringVar(&containerSubnet, "subnet", "", "String representation of container subnetwork")
|
||||||
flags.BoolVarP(&force, commonflags.ForceFlag, commonflags.ForceFlagShorthand, false,
|
flags.BoolVarP(&force, commonflags.ForceFlag, commonflags.ForceFlagShorthand, false,
|
||||||
|
@ -213,5 +217,10 @@ func parseAttributes(dst *container.Container, attributes []string) error {
|
||||||
container.SetName(dst, containerName)
|
container.SetName(dst, containerName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var domain container.Domain
|
||||||
|
domain.SetName(containerNnsName)
|
||||||
|
domain.SetZone(containerNnsZone)
|
||||||
|
container.WriteDomain(dst, domain)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue