1 module ietf-network-topology {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
6 import ietf-inet-types {
15 "WILL-BE-DEFINED-LATER";
17 "This module defines a common base model for network topology,
18 augmenting the base network model with links to connect nodes,
19 as well as termination points to terminate links on nodes.";
24 reference "draft-ietf-i2rs-yang-network-topo-01";
30 "An identifier for a link in a topology.
31 The identifier may be opaque.
32 The identifier SHOULD be chosen such that the same link in a
33 real network topology will always be identified through the
34 same identifier, even if the model is instantiated in
35 separate datastores. An implementation MAY choose to capture
36 semantics in the identifier, for example to indicate the type
37 of link and/or the type of topology that the link is a part
44 "An identifier for termination points on a node.
45 The identifier may be opaque.
46 The identifier SHOULD be chosen such that the same TP in a
47 real network topology will always be identified through the
48 same identifier, even if the model is instantiated in
49 separate datastores. An implementation MAY choose to capture
50 semantics in the identifier, for example to indicate the type
51 of TP and/or the type of node and topology that the TP is a
57 "References a link in a specific network.";
60 path "/nd:network[nd:network-id=current()/../"+
61 "nd:network-ref]/link/link-id";
64 "A type for an absolute reference a link instance.
65 (This type should not be used for relative references.
66 In such a case, a relative path should be used instead.)";
73 "References a termination point in a specific node.";
76 path "/nd:network[nd:network-id=current()/../"+
77 "nd:network-ref]/nd:node[nd:node-id=current()/../"+
78 "nd:node-ref]/termination-point/tp-id";
81 "A type for an absolute reference to a termination point.
82 (This type should not be used for relative references.
83 In such a case, a relative path should be used instead.)";
88 augment "/nd:network" {
90 "Add links to the network model.";
94 "A Network Link connects a by Local (Source) node and
95 a Remote (Destination) Network Nodes via a set of the
96 nodes' termination points.
97 As it is possible to have several links between the same
98 source and destination nodes, and as a link could
99 potentially be re-homed between termination points, to
100 ensure that we would always know to distinguish between
101 links, every link is identified by a dedicated link
103 Note that a link models a point-to-point link, not a
105 Layering dependencies on links in underlay topologies are
106 not represented as the layering information of nodes and of
107 termination points is sufficient.";
110 "This container holds the logical source of a particular
114 path "../../../nd:node/nd:node-id";
118 "Source node identifier, must be in same topology.";
122 path "../../../nd:node[nd:node-id=current()/../"+
123 "source-node]/termination-point/tp-id";
126 "Termination point within source node that terminates
130 container destination {
132 "This container holds the logical destination of a
136 path "../../../nd:node/nd:node-id";
140 "Destination node identifier, must be in the same
145 path "../../../nd:node[nd:node-id=current()/../"+
146 "dest-node]/termination-point/tp-id";
149 "Termination point within destination node that
150 terminates the link.";
156 "The identifier of a link in the topology.
157 A link is specific to a topology to which it belongs.";
159 list supporting-link {
160 key "network-ref link-ref";
162 "Identifies the link, or links, that this link
166 path "../../../nd:supporting-network/nd:network-ref";
169 "This leaf identifies in which underlay topology
170 supporting link is present.";
174 path "/nd:network[nd:network-id=current()/.."+
175 "/network-ref]/link/link-id";
178 "This leaf identifies a link which is a part
179 of this link's underlay. Reference loops, in which
180 a link identifies itself as its underlay, either
181 directly or transitively, are not allowed.";
186 augment "/nd:network/nd:node" {
188 "Augment termination points which terminate links.
189 Termination points can ultimately be mapped to interfaces.";
190 list termination-point {
193 "A termination point can terminate a link.
194 Depending on the type of topology, a termination point
195 could, for example, refer to a port or an interface.";
199 "Termination point identifier.";
201 list supporting-termination-point {
202 key "network-ref node-ref tp-ref";
204 "The leaf list identifies any termination points that
205 the termination point is dependent on, or maps onto.
206 Those termination points will themselves be contained
207 in a supporting node.
208 This dependency information can be inferred from
209 the dependencies between links. For this reason,
210 this item is not separately configurable. Hence no
211 corresponding constraint needs to be articulated.
212 The corresponding information is simply provided by the
213 implementing system.";
216 path "../../../nd:supporting-node/nd:network-ref";
219 "This leaf identifies in which topology the
220 supporting termination point is present.";
224 path "../../../nd:supporting-node/nd:node-ref";
227 "This leaf identifies in which node the supporting
228 termination point is present.";
232 path "/nd:network[nd:network-id=current()/../"+
233 "network-ref]/nd:node[nd:node-id=current()/../"+
234 "node-ref]/termination-point/tp-id";
237 "Reference to the underlay node, must be in a