1 module ietf-yang-schema-mount {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount";
6 import ietf-inet-types {
9 "RFC 6991: Common YANG Data Types";
12 import ietf-yang-types {
15 "RFC 6991: Common YANG Data Types";
19 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
22 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
23 WG List: <mailto:netmod@ietf.org>
25 Editor: Martin Bjorklund
26 <mailto:mbj@tail-f.com>
28 Editor: Ladislav Lhotka
29 <mailto:lhotka@nic.cz>";
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.
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.
43 Copyright (c) 2019 IETF Trust and the persons identified as
44 authors of the code. All rights reserved.
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).
53 This version of this YANG module is part of RFC 8528;
54 see the RFC itself for full legal notices.";
60 "RFC 8528: YANG Schema Mount";
67 extension mount-point {
70 "The argument 'label' is a YANG identifier, i.e., it is of the
71 type 'yang:yang-identifier'.
73 The 'mount-point' statement MUST NOT be used in a YANG
74 version 1 module, neither explicitly nor via a 'uses'
76 The 'mount-point' statement MAY be present as a substatement
77 of 'container' and 'list' and MUST NOT be present elsewhere.
78 There MUST NOT be more than one 'mount-point' statement in a
79 given 'container' or 'list' statement.
81 If a mount point is defined within a grouping, its label is
82 bound to the module where the grouping is used.
84 A mount point defines a place in the node hierarchy where
85 other data models may be attached. A server that implements a
86 module with a mount point populates the
87 '/schema-mounts/mount-point' list with detailed information on
88 which data models are mounted at each mount point.
90 Note that the 'mount-point' statement does not define a new
98 container schema-mounts {
101 "Contains information about the structure of the overall
102 mounted data model implemented in the server.";
106 "This list provides a mapping of namespace prefixes that are
107 used in XPath expressions of 'parent-reference' leafs to the
108 corresponding namespace URI references.";
110 type yang:yang-identifier;
117 "Namespace URI reference.";
124 "Each entry of this list specifies a schema for a particular
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'.";
131 type yang:yang-identifier;
133 "Name of a module containing the mount point.";
136 type yang:yang-identifier;
138 "Label of the mount point defined using the 'mount-point'
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.";
152 "Alternatives for specifying the schema.";
155 "A complete self-contained schema is mounted at the
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
163 Different instances of the mount point may have
164 different schemas mounted.";
166 container shared-schema {
168 "The mounted schema together with the 'parent-reference'
169 make up the schema for this mount point.";
172 "This node indicates that the server has mounted at least
173 the module 'ietf-yang-library' at the mount point, and
174 its instantiation provides the information about the
175 mounted schema. When XPath expressions in the mounted
176 schema are evaluated, the 'parent-reference' leaf-list
177 is taken into account.
179 Different instances of the mount point MUST have the
180 same schema mounted.";
181 leaf-list parent-reference {
184 "Entries of this leaf-list are XPath 1.0 expressions
185 that are evaluated in the following context:
187 - The context node is the node in the parent data tree
188 where the mount-point is defined.
190 - The accessible tree is the parent data tree
191 *without* any nodes defined in modules that are
192 mounted inside the parent schema.
194 - The context position and context size are both equal
197 - The set of variable bindings is empty.
199 - The function library is the core function library
200 defined in the W3C XPath 1.0 document
201 (http://www.w3.org/TR/1999/REC-xpath-19991116) and
202 the functions defined in Section 10 of RFC 7950.
204 - The set of namespace declarations is defined by the
205 'namespace' list under 'schema-mounts'.
207 Each XPath expression MUST evaluate to a node-set
208 (possibly empty). For the purposes of evaluating
209 XPath expressions whose context nodes are defined in
210 the mounted schema, the union of all these node-sets
211 together with ancestor nodes are added to the
212 accessible data tree.
214 Note that in the case 'ietf-yang-schema-mount' is
215 itself mounted, a 'parent-reference' in the mounted
216 module may refer to nodes that were brought into the
217 accessible tree through a 'parent-reference' in the