forked from TrueCloudLab/frostfs-node
[#316] ir/netmap: Rename LOCODE attribute key
Rename key to LOCODE node attribute from `Locode` to `UN-LOCODE`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
c384fbbf4e
commit
0a87fec6c6
2 changed files with 4 additions and 4 deletions
|
@ -10,10 +10,10 @@ var errMissingLocode = errors.New("missing locode attribute")
|
|||
|
||||
var errMissingRequiredAttr = errors.New("missing required attribute in DB record")
|
||||
|
||||
// VerifyAndUpdate validates LOCODE attribute of n
|
||||
// VerifyAndUpdate validates UN-LOCODE attribute of n
|
||||
// and adds a group of related attributes.
|
||||
//
|
||||
// If n does not contain LOCODE attribute or its value does not
|
||||
// If n does not contain UN-LOCODE attribute or its value does not
|
||||
// match the UN/LOCODE format, an error returns.
|
||||
//
|
||||
// New attributes are formed from the record of DB instance (Prm).
|
||||
|
@ -26,7 +26,7 @@ var errMissingRequiredAttr = errors.New("missing required attribute in DB record
|
|||
// * SubDiv: R.SubDivName();
|
||||
// * Continent: R.Continent().String().
|
||||
//
|
||||
// LOCODE attribute remains untouched.
|
||||
// UN-LOCODE attribute remains untouched.
|
||||
func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
|
||||
mAttr := uniqueAttributes(n.Attributes())
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ type Validator struct {
|
|||
|
||||
// TODO: define constants in API lib.
|
||||
const (
|
||||
attrKeyLocode = "Locode"
|
||||
attrKeyLocode = "UN-LOCODE"
|
||||
|
||||
attrKeyCountryCode = "CountryCode"
|
||||
attrKeyCountry = "Country"
|
||||
|
|
Loading…
Reference in a new issue