Request updating package common's PostalAddress struct to make Country a string instead of an int.
It appears, from the comments, as if the current rationale for making this an integer value (reference to RF5139) is incorrect. Per RFC5139
3.3. Country Element
The "country" element differs from that defined in [RFC4119] in that
it now restricts the value space of the element to two uppercase
characters, which correspond to the alpha-2 codes in [ISO.3166-1].
3.4. A1 Element
The "A1" element is used for the top-level subdivision within a
country. In the absence of a country-specific guide on how to use
the A-series of elements, the second part of the ISO 3166-2 code
[ISO.3166-2] for a country subdivision SHOULD be used. The ISO
3166-2 code is formed of a country code and hyphen plus a code of
one, two, or three characters or numerals. For the "A1" element, the
leading country code and hyphen are omitted and only the subdivision
code is included.
For example, the codes for Canada include CA-BC, CA-ON, CA-QC;
Luxembourg has just three single-character codes, LU-D, LU-G, and
LU-L; Australia uses both two- and three-character codes, AU-ACT,
AU-NSW, AU-NT; and France uses numerical codes for mainland France
and letters for territories, FR-75, FR-NC. This results in the
following fragments:
<country>CA</country><A1>ON</A1><country>LU</country><A1>L</A1><country>AU</country><A1>ACT</A1><country>FR</country><A1>75</A1>
Thanks, that does appear to be an error. Looks like unit tests will need to be updated though. Looks like the only place it's actually included is in swordfish/spareresourceset_test.go.
Request updating package
common
'sPostalAddress
struct to makeCountry
astring
instead of anint
.It appears, from the comments, as if the current rationale for making this an integer value (reference to RF5139) is incorrect. Per RFC5139
3.3. Country Element
The "country" element differs from that defined in [RFC4119] in that it now restricts the value space of the element to two uppercase characters, which correspond to the alpha-2 codes in [ISO.3166-1].
3.4. A1 Element
The "A1" element is used for the top-level subdivision within a country. In the absence of a country-specific guide on how to use the A-series of elements, the second part of the ISO 3166-2 code [ISO.3166-2] for a country subdivision SHOULD be used. The ISO 3166-2 code is formed of a country code and hyphen plus a code of one, two, or three characters or numerals. For the "A1" element, the leading country code and hyphen are omitted and only the subdivision code is included.
For example, the codes for Canada include CA-BC, CA-ON, CA-QC; Luxembourg has just three single-character codes, LU-D, LU-G, and LU-L; Australia uses both two- and three-character codes, AU-ACT, AU-NSW, AU-NT; and France uses numerical codes for mainland France and letters for territories, FR-75, FR-NC. This results in the following fragments:
<country>CA</country><A1>ON</A1>
<country>LU</country><A1>L</A1>
<country>AU</country><A1>ACT</A1>
<country>FR</country><A1>75</A1>
Additionally, per the Redfish Resource and Schema Guide,
Country
is defined asCountry (v1.3+) | string | read-write | (null) | The country