module ietf-sid-file { namespace "urn:ietf:params:xml:ns:yang:ietf-sid-file"; prefix sid; import ietf-yang-types { prefix yang; } import ietf-comi { prefix comi; } organization "IETF Core Working Group"; contact "Michel Veillette Andy Bierman Alexander Pelov "; description "This module defines the structure of the .sid files. Each .sid file contains the mapping between the different string identifiers defined by a YANG module and a corresponding numeric value called SID."; revision 2017-11-26 { description "Initial revision."; reference "[I-D.ietf-core-sid] YANG Schema Item iDentifier (SID)"; } typedef revision-identifier { type string { pattern '\d{4}-\d{2}-\d{2}'; } description "Represents a date in YYYY-MM-DD format."; } typedef schema-node-path { type string { pattern '/[a-zA-Z_][a-zA-Z0-9\-_.]*:[a-zA-Z_][a-zA-Z0-9\-_.]*' + '(/[a-zA-Z_][a-zA-Z0-9\-_.]*(:[a-zA-Z_][a-zA-Z0-9\-_.]*)?)*'; } description "Identifies a schema-node path string for use in the SID registry. This string format follows the rules for an instance-identifier, as defined in RFC 7959, except that no predicates are allowed. This format is intended to support the YANG 1.1 ABNF for a schema node identifier, except module names are used instead of prefixes, as specified in RFC 7951."; reference "RFC 7950, The YANG 1.1 Data Modeling Language; Section 6.5: Schema Node Identifier; RFC 7951, JSON Encoding of YANG Data; Section 6.11: The instance-identifier type"; } leaf module-name { type yang:yang-identifier; description "Name of the YANG module associated with this .sid file."; } leaf module-revision { type revision-identifier; description "Revision of the YANG module associated with this .sid file. This leaf is not present if no revision statement is defined in the YANG module."; } list assigment-ranges { key "entry-point"; description "SID range(s) allocated to the YANG module identified by 'module-name' and 'module-revision'."; leaf entry-point { type comi:sid; mandatory true; description "Lowest SID available for assignment."; } leaf size { type uint64; mandatory true; description "Number of SIDs available for assignment."; } } list items { key "namespace identifier"; description "Each entry within this list defined the mapping between a YANG item string identifier and a SID. This list MUST include a mapping entry for each YANG item defined by the YANG module identified by 'module-name' and 'module-revision'."; leaf namespace { type enumeration { enum module { value 0; description "All module and submodule names share the same global module identifier namespace."; } enum identity { value 1; description "All identity names defined in a module and its submodules share the same identity identifier namespace."; } enum feature { value 2; description "All feature names defined in a module and its submodules share the same feature identifier namespace."; } enum data { value 3; description "The namespace for all data nodes, as defined in YANG."; } } description "Namespace of the YANG item for this mapping entry."; } leaf identifier { type union { type yang:yang-identifier; type schema-node-path; } description "String identifier of the YANG item for this mapping entry. If the corresponding 'namespace' field is 'module', 'feature', or 'identity', then this field MUST contain a valid YANG identifier string. If the corresponding 'namespace' field is 'data', then this field MUST contain a valid schema node path."; } leaf sid { type comi:sid; mandatory true; description "SID assigned to the YANG item for this mapping entry."; } } }