forked from TrueCloudLab/frostfs-node
[#316] cmd/node: Make UN-LOCODE attribute mandatory in the configuration
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
7a9b02049f
commit
e63f9faab8
1 changed files with 4 additions and 0 deletions
|
@ -46,10 +46,14 @@ type wellKnownNodeAttrDesc struct {
|
||||||
defaultVal string
|
defaultVal string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: define attribute keys in API lib.
|
||||||
|
const attrKeyLocode = "UN-LOCODE"
|
||||||
|
|
||||||
func listWellKnownAttrDesc() map[string]wellKnownNodeAttrDesc {
|
func listWellKnownAttrDesc() map[string]wellKnownNodeAttrDesc {
|
||||||
return map[string]wellKnownNodeAttrDesc{
|
return map[string]wellKnownNodeAttrDesc{
|
||||||
netmap.PriceAttr: {defaultVal: strconv.FormatUint(defaultPrice, 10)},
|
netmap.PriceAttr: {defaultVal: strconv.FormatUint(defaultPrice, 10)},
|
||||||
netmap.CapacityAttr: {defaultVal: strconv.FormatUint(defaultCapacity, 10)},
|
netmap.CapacityAttr: {defaultVal: strconv.FormatUint(defaultCapacity, 10)},
|
||||||
|
attrKeyLocode: {explicit: true},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue