From 521df90def4632e16eb2fa6a0a4c18e6b0b052a5 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 10 Feb 2021 23:26:34 +0300 Subject: [PATCH] [#255] pkg/netmap: Define constant keys to all well-known attributes Signed-off-by: Leonard Lyubich --- pkg/netmap/node_info.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pkg/netmap/node_info.go b/pkg/netmap/node_info.go index 90cccfa..17aa9f4 100644 --- a/pkg/netmap/node_info.go +++ b/pkg/netmap/node_info.go @@ -51,6 +51,40 @@ const ( // AttrCapacity is a key to the node attribute that indicates the // total available disk space in Gigabytes. AttrCapacity = "Capacity" + + // AttrSubnet is a key to the node attribute that indicates the + // string ID of node's storage subnet. + AttrSubnet = "Subnet" + + // AttrUNLOCODE is a key to the node attribute that indicates the + // node's geographic location in UN/LOCODE format. + AttrUNLOCODE = "UN-LOCODE" + + // AttrCountryCode is a key to the node attribute that indicates the + // Country code in ISO 3166-1_alpha-2 format. + AttrCountryCode = "CountryCode" + + // AttrCountry is a key to the node attribute that indicates the + // country short name in English, as defined in ISO-3166. + AttrCountry = "Country" + + // AttrLocation is a key to the node attribute that indicates the + // place name of the node location. + AttrLocation = "Location" + + // AttrSubDivCode is a key to the node attribute that indicates the + // country's administrative subdivision where node is located + // in ISO 3166-2 format. + AttrSubDivCode = "SubDivCode" + + // AttrSubDiv is a key to the node attribute that indicates the + // country's administrative subdivision name, as defined in + // ISO 3166-2. + AttrSubDiv = "SubDiv" + + // AttrContinent is a key to the node attribute that indicates the + // node's continent name according to the Seven-Continent model. + AttrContinent = "Continent" ) var _ hrw.Hasher = (*Node)(nil)