[#316] cmd/node: Make UN-LOCODE attribute mandatory in the configuration

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-10 13:47:49 +03:00 committed by Leonard Lyubich
parent 7a9b02049f
commit e63f9faab8

View file

@ -46,10 +46,14 @@ type wellKnownNodeAttrDesc struct {
defaultVal string
}
// TODO: define attribute keys in API lib.
const attrKeyLocode = "UN-LOCODE"
func listWellKnownAttrDesc() map[string]wellKnownNodeAttrDesc {
return map[string]wellKnownNodeAttrDesc{
netmap.PriceAttr: {defaultVal: strconv.FormatUint(defaultPrice, 10)},
netmap.CapacityAttr: {defaultVal: strconv.FormatUint(defaultCapacity, 10)},
attrKeyLocode: {explicit: true},
}
}