1 module ietf-network-topology {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
6 import ietf-inet-types {
9 "RFC 6991: Common YANG Data Types";
14 "RFC 8345: A YANG Data Model for Network Topologies";
18 "IETF I2RS (Interface to the Routing System) Working Group";
21 "WG Web: <https://datatracker.ietf.org/wg/i2rs/>
22 WG List: <mailto:i2rs@ietf.org>
24 Editor: Alexander Clemm
25 <mailto:ludwig@clemm.org>
28 <mailto:jmedved@cisco.com>
31 <mailto:robert.varga@pantheon.tech>
34 <mailto:nitin_bahadur@yahoo.com>
36 Editor: Hariharan Ananthakrishnan
37 <mailto:hari@packetdesign.com>
40 <mailto:xufeng.liu.ietf@gmail.com>";
43 "This module defines a common base model for a network topology,
44 augmenting the base network data model with links to connect
45 nodes, as well as termination points to terminate links
48 Copyright (c) 2018 IETF Trust and the persons identified as
49 authors of the code. All rights reserved.
51 Redistribution and use in source and binary forms, with or
52 without modification, is permitted pursuant to, and subject
53 to the license terms contained in, the Simplified BSD License
54 set forth in Section 4.c of the IETF Trust's Legal Provisions
55 Relating to IETF Documents
56 (https://trustee.ietf.org/license-info).
58 This version of this YANG module is part of RFC 8345;
59 see the RFC itself for full legal notices.";
65 "RFC 8345: A YANG Data Model for Network Topologies";
71 "An identifier for a link in a topology. The precise
72 structure of the link-id will be up to the implementation.
73 The identifier SHOULD be chosen such that the same link in a
74 real network topology will always be identified through the
75 same identifier, even if the data model is instantiated in
76 separate datastores. An implementation MAY choose to capture
77 semantics in the identifier -- for example, to indicate the
78 type of link and/or the type of topology of which the link is
85 "An identifier for termination points on a node. The precise
86 structure of the tp-id will be up to the implementation.
87 The identifier SHOULD be chosen such that the same termination
88 point in a real network topology will always be identified
89 through the same identifier, even if the data model is
90 instantiated in separate datastores. An implementation MAY
91 choose to capture semantics in the identifier -- for example,
92 to indicate the type of termination point and/or the type of
93 node that contains the termination point.";
98 "This grouping can be used to reference a link in a specific
99 network. Although it is not used in this module, it is
100 defined here for the convenience of augmenting modules.";
103 path "/nw:networks/nw:network[nw:network-id=current()/../"+
104 "network-ref]/nt:link/nt:link-id";
105 require-instance false;
108 "A type for an absolute reference to a link instance.
109 (This type should not be used for relative references.
110 In such a case, a relative path should be used instead.)";
117 "This grouping can be used to reference a termination point
118 in a specific node. Although it is not used in this module,
119 it is defined here for the convenience of augmenting
123 path "/nw:networks/nw:network[nw:network-id=current()/../"+
124 "network-ref]/nw:node[nw:node-id=current()/../"+
125 "node-ref]/nt:termination-point/nt:tp-id";
126 require-instance false;
129 "A type for an absolute reference to a termination point.
130 (This type should not be used for relative references.
131 In such a case, a relative path should be used instead.)";
136 augment "/nw:networks/nw:network" {
138 "Add links to the network data model.";
142 "A network link connects a local (source) node and
143 a remote (destination) node via a set of the respective
144 node's termination points. It is possible to have several
145 links between the same source and destination nodes.
146 Likewise, a link could potentially be re-homed between
147 termination points. Therefore, in order to ensure that we
148 would always know to distinguish between links, every link
149 is identified by a dedicated link identifier. Note that a
150 link models a point-to-point link, not a multipoint link.";
154 "The identifier of a link in the topology.
155 A link is specific to a topology to which it belongs.";
159 "This container holds the logical source of a particular
163 path "../../../nw:node/nw:node-id";
164 require-instance false;
167 "Source node identifier. Must be in the same topology.";
171 path "../../../nw:node[nw:node-id=current()/../"+
172 "source-node]/termination-point/tp-id";
173 require-instance false;
176 "This termination point is located within the source node
177 and terminates the link.";
181 container destination {
183 "This container holds the logical destination of a
187 path "../../../nw:node/nw:node-id";
188 require-instance false;
191 "Destination node identifier. Must be in the same
196 path "../../../nw:node[nw:node-id=current()/../"+
197 "dest-node]/termination-point/tp-id";
198 require-instance false;
201 "This termination point is located within the
202 destination node and terminates the link.";
205 list supporting-link {
206 key "network-ref link-ref";
208 "Identifies the link or links on which this link depends.";
211 path "../../../nw:supporting-network/nw:network-ref";
212 require-instance false;
215 "This leaf identifies in which underlay topology
216 the supporting link is present.";
221 path "/nw:networks/nw:network[nw:network-id=current()/"+
222 "../network-ref]/link/link-id";
223 require-instance false;
226 "This leaf identifies a link that is a part
227 of this link's underlay. Reference loops in which
228 a link identifies itself as its underlay, either
229 directly or transitively, are not allowed.";
234 augment "/nw:networks/nw:network/nw:node" {
236 "Augments termination points that terminate links.
237 Termination points can ultimately be mapped to interfaces.";
238 list termination-point {
241 "A termination point can terminate a link.
242 Depending on the type of topology, a termination point
243 could, for example, refer to a port or an interface.";
247 "Termination point identifier.";
249 list supporting-termination-point {
250 key "network-ref node-ref tp-ref";
252 "This list identifies any termination points on which a
253 given termination point depends or onto which it maps.
254 Those termination points will themselves be contained
255 in a supporting node. This dependency information can be
256 inferred from the dependencies between links. Therefore,
257 this item is not separately configurable. Hence, no
258 corresponding constraint needs to be articulated.
259 The corresponding information is simply provided by the
260 implementing system.";
264 path "../../../nw:supporting-node/nw:network-ref";
265 require-instance false;
268 "This leaf identifies in which topology the
269 supporting termination point is present.";
273 path "../../../nw:supporting-node/nw:node-ref";
274 require-instance false;
277 "This leaf identifies in which node the supporting
278 termination point is present.";
282 path "/nw:networks/nw:network[nw:network-id=current()/"+
283 "../network-ref]/nw:node[nw:node-id=current()/../"+
284 "node-ref]/termination-point/tp-id";
285 require-instance false;
288 "Reference to the underlay node (the underlay node must
289 be in a different topology).";