Update YANG models for OpenFronthaul M-Plane.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / ietf-yang-schema-mount.yang
1 module ietf-yang-schema-mount {
2   yang-version 1.1;
3   namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount";
4   prefix yangmnt;
5
6   import ietf-inet-types {
7     prefix inet;
8     reference
9       "RFC 6991: Common YANG Data Types";
10   }
11
12   import ietf-yang-types {
13     prefix yang;
14     reference
15       "RFC 6991: Common YANG Data Types";
16   }
17
18   organization
19     "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
20
21   contact
22     "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
23      WG List:  <mailto:netmod@ietf.org>
24
25      Editor:   Martin Bjorklund
26                <mailto:mbj@tail-f.com>
27
28      Editor:   Ladislav Lhotka
29                <mailto:lhotka@nic.cz>";
30
31   description
32     "This module defines a YANG extension statement that can be used
33      to incorporate data models defined in other YANG modules in a
34      module.  It also defines operational state data that specify the
35      overall structure of the data model.
36
37      The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
38      NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
39      'MAY', and 'OPTIONAL' in this document are to be interpreted as
40      described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
41      they appear in all capitals, as shown here.
42
43      Copyright (c) 2019 IETF Trust and the persons identified as
44      authors of the code.  All rights reserved.
45
46      Redistribution and use in source and binary forms, with or
47      without modification, is permitted pursuant to, and subject to
48      the license terms contained in, the Simplified BSD License set
49      forth in Section 4.c of the IETF Trust's Legal Provisions
50      Relating to IETF Documents
51      (https://trustee.ietf.org/license-info).
52
53      This version of this YANG module is part of RFC 8528;
54      see the RFC itself for full legal notices.";
55
56   revision 2019-01-14 {
57     description
58       "Initial revision.";
59     reference
60       "RFC 8528: YANG Schema Mount";
61   }
62
63   /*
64    * Extensions
65    */
66
67   extension mount-point {
68     argument label;
69     description
70       "The argument 'label' is a YANG identifier, i.e., it is of the
71        type 'yang:yang-identifier'.
72
73        The 'mount-point' statement MUST NOT be used in a YANG
74        version 1 module, neither explicitly nor via a 'uses'
75        statement.
76
77        The 'mount-point' statement MAY be present as a substatement
78        of 'container' and 'list' and MUST NOT be present elsewhere.
79        There MUST NOT be more than one 'mount-point' statement in a
80        given 'container' or 'list' statement.
81
82        If a mount point is defined within a grouping, its label is
83        bound to the module where the grouping is used.
84
85        A mount point defines a place in the node hierarchy where
86        other data models may be attached.  A server that implements a
87        module with a mount point populates the
88        '/schema-mounts/mount-point' list with detailed information on
89        which data models are mounted at each mount point.
90
91        Note that the 'mount-point' statement does not define a new
92        data node.";
93   }
94
95   /*
96    * State data nodes
97    */
98
99   container schema-mounts {
100     config false;
101     description
102       "Contains information about the structure of the overall
103        mounted data model implemented in the server.";
104     list namespace {
105       key "prefix";
106       description
107         "This list provides a mapping of namespace prefixes that are
108          used in XPath expressions of 'parent-reference' leafs to the
109          corresponding namespace URI references.";
110       leaf prefix {
111         type yang:yang-identifier;
112         description
113           "Namespace prefix.";
114       }
115       leaf uri {
116         type inet:uri;
117         description
118           "Namespace URI reference.";
119       }
120     }
121     list mount-point {
122       key "module label";
123       description
124         "Each entry of this list specifies a schema for a particular
125          mount point.
126
127          Each mount point MUST be defined using the 'mount-point'
128          extension in one of the modules listed in the server's
129          YANG library instance with conformance type 'implement'.";
130       leaf module {
131         type yang:yang-identifier;
132         description
133           "Name of a module containing the mount point.";
134       }
135       leaf label {
136         type yang:yang-identifier;
137         description
138           "Label of the mount point defined using the 'mount-point'
139            extension.";
140       }
141       leaf config {
142         type boolean;
143         default "true";
144         description
145           "If this leaf is set to 'false', then all data nodes in the
146            mounted schema are read-only ('config false'), regardless
147            of their 'config' property.";
148       }
149       choice schema-ref {
150         mandatory true;
151         description
152           "Alternatives for specifying the schema.";
153         container inline {
154           presence
155             "A complete self-contained schema is mounted at the
156              mount point.";
157           description
158             "This node indicates that the server has mounted at least
159              the module 'ietf-yang-library' at the mount point, and
160              its instantiation provides the information about the
161              mounted schema.
162
163              Different instances of the mount point may have
164              different schemas mounted.";
165         }
166         container shared-schema {
167           presence
168             "The mounted schema together with the 'parent-reference'
169              make up the schema for this mount point.";
170           description
171             "This node indicates that the server has mounted at least
172              the module 'ietf-yang-library' at the mount point, and
173              its instantiation provides the information about the
174              mounted schema.  When XPath expressions in the mounted
175              schema are evaluated, the 'parent-reference' leaf-list
176              is taken into account.
177
178              Different instances of the mount point MUST have the
179              same schema mounted.";
180           leaf-list parent-reference {
181             type yang:xpath1.0;
182             description
183               "Entries of this leaf-list are XPath 1.0 expressions
184                that are evaluated in the following context:
185
186                - The context node is the node in the parent data tree
187                  where the mount-point is defined.
188
189                - The accessible tree is the parent data tree
190                  *without* any nodes defined in modules that are
191                  mounted inside the parent schema.
192
193                - The context position and context size are both equal
194                  to 1.
195
196                - The set of variable bindings is empty.
197
198                - The function library is the core function library
199                  defined in the W3C XPath 1.0 document
200                  (http://www.w3.org/TR/1999/REC-xpath-19991116) and
201                  the functions defined in Section 10 of RFC 7950.
202
203                - The set of namespace declarations is defined by the
204                  'namespace' list under 'schema-mounts'.
205
206                Each XPath expression MUST evaluate to a node-set
207                (possibly empty).  For the purposes of evaluating
208                XPath expressions whose context nodes are defined in
209                the mounted schema, the union of all these node-sets
210                together with ancestor nodes are added to the
211                accessible data tree.
212
213                Note that in the case 'ietf-yang-schema-mount' is
214                itself mounted, a 'parent-reference' in the mounted
215                module may refer to nodes that were brought into the
216                accessible tree through a 'parent-reference' in the
217                parent schema.";
218           }
219         }
220       }
221     }
222   }
223 }