diff --git a/experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-06.yang b/experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-19.yang similarity index 87% rename from experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-06.yang rename to experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-19.yang index e505732a3..3681953f6 100644 --- a/experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-06.yang +++ b/experimental/ietf-extracted-YANG-modules/ietf-ni-location@2024-08-19.yang @@ -6,13 +6,14 @@ module ietf-ni-location { import ietf-network-inventory { prefix nwi; reference - "RFCXXXX: A YANG Data Model for Network Inventory"; + "RFCAAAA: A YANG Data Model for Network Inventory"; } import ietf-geo-location { prefix geo; reference "RFC 9179: A YANG Grouping for Geographic Locations"; } + organization "IETF Network Inventory YANG (ivy) Working Group"; contact @@ -46,7 +47,7 @@ module ietf-ni-location { This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; - revision 2024-08-06 { + revision 2024-08-19 { description "Initial version"; reference @@ -55,10 +56,12 @@ module ietf-ni-location { //update date information and remove this note } + /* Identities */ + identity inventory-location-type { description "Base identity for network inventory location types, e.g. site, - room, building, floor, etc."; + room, building, and floor."; } identity site { @@ -79,45 +82,17 @@ module ietf-ni-location { "Indicates building as location type."; } - grouping locations-grouping { - description - "The grouping of the locations."; - list location { - key "id"; - description - "The list of locations within the network."; - leaf id { - type string; - description - "An identifier the location."; - } - uses nwi:common-entity-attributes; - leaf location-type { - type identityref { - base inventory-location-type; - } - description - "The type of network inventory location, e.g. - equipment room, building, or site."; - } - leaf parent { - type leafref { - path "../../location/id"; - } - description - "The name of the parent locations."; - } - leaf-list child { - type leafref { - path "../../location/id"; - } - description - "The name of the child locations."; - } - uses physical-address-grouping; - uses geo:geo-location; + /* Typedef */ + + typedef ni-location-ref { + type leafref { + path "/nil:locations/nil:location/nil:id"; } + description + "This type is used by data models that need to reference + network inventory location."; } + /* Grouping */ grouping physical-address-grouping { description @@ -128,35 +103,77 @@ module ietf-ni-location { leaf address { type string; description - "Address (number and street) of the site."; + "Specifies an address (number and street)."; } leaf postal-code { type string; description - "Postal code of the site."; + "Specifies a postal code."; } leaf state { type string; description - "State of the site. This leaf can also be + "Specifies a state. This leaf can also be used to describe a region for a country that does not have states."; } leaf city { type string; description - "City of the site."; + "Specifies a city."; } leaf country-code { type string { pattern '[A-Z]{2}'; } description - "Country of the site. + "Specifies a country. Expressed as ISO ALPHA-2 code."; } } } + + grouping locations-grouping { + description + "The grouping of the locations."; + list location { + key "id"; + description + "The list of locations within the network."; + leaf id { + type string; + description + "An identifier of the location."; + } + uses nwi:common-entity-attributes; + leaf type { + type identityref { + base inventory-location-type; + } + description + "The type of network inventory location, e.g. + equipment room, building, or site."; + } + leaf parent { + type leafref { + path "../../location/id"; + } + description + "The name of the location that physically contains this + location."; + } + leaf-list child { + type leafref { + path "../../location/id"; + } + description + "The name of the contained child locations."; + } + uses physical-address-grouping; + uses geo:geo-location; + } + } + grouping rack-grouping { description "The attributes of the rack."; @@ -166,11 +183,13 @@ module ietf-ni-location { list rack { key "id"; description - "The list of racks within an equipment room."; + "The list of racks within a location, + e.g. equipment room."; leaf id { type string; description - "An identifier the rack."; + "An identifier that uniquely identifies the rack + within a location, e.g. equipment room."; } uses nwi:common-entity-attributes; container rack-location { @@ -179,9 +198,7 @@ module ietf-ni-location { comprises the name of the location, row number, and column number."; leaf location-ref { - type leafref { - path "/nil:locations/nil:location/nil:id"; - } + type ni-location-ref; description "Name of location where this rack is located."; } @@ -270,9 +287,7 @@ module ietf-ni-location { description "The container for the location."; leaf-list location { - type leafref { - path "/nil:locations/nil:location/nil:id"; - } + type ni-location-ref; description "The reference of the location."; }