1 module network-topology {
3 namespace "urn:TBD:params:xml:ns:yang:network-topology";
4 // replace with IANA namespace when assigned
7 import ietf-inet-types { prefix "inet"; }
11 contact "WILL-BE-DEFINED-LATER";
14 "This module defines a model for the topology of a network.
15 Key design decisions are as follows:
16 A topology consists of a set of nodes and links.
17 Links are point-to-point and unidirectional.
18 Bidirectional connections need to be represented through
20 Multipoint connections, broadcast domains etc can be represented
21 through a hierarchy of nodes, then connecting nodes at
22 upper layers of the hierarchy.";
32 "An identifier for a topology.";
38 "An identifier for a node in a topology.
39 The identifier may be opaque.
40 The identifier SHOULD be chosen such that the same node in a
41 real network topology will always be identified through the
42 same identifier, even if the model is instantiated in separate
43 datastores. An implementation MAY choose to capture semantics
44 in the identifier, for example to indicate the type of node
45 and/or the type of topology that the node is a part of.";
51 "An identifier for a link in a topology.
52 The identifier may be opaque.
53 The identifier SHOULD be chosen such that the same link in a
54 real network topology will always be identified through the
55 same identifier, even if the model is instantiated in separate
56 datastores. An implementation MAY choose to capture semantics
57 in the identifier, for example to indicate the type of link
58 and/or the type of topology that the link is a part of.";
64 "An identifier for termination points on a node.
65 The identifier may be opaque.
66 The identifier SHOULD be chosen such that the same TP in a
67 real network topology will always be identified through the
68 same identifier, even if the model is instantiated in separate
69 datastores. An implementation MAY choose to capture semantics
70 in the identifier, for example to indicate the type of TP
71 and/or the type of node and topology that the TP is a part of.";
76 path "/network-topology/topology/node/termination-point/tp-id";
79 "A type for an absolute reference to a termination point.
80 (This type should not be used for relative references.
81 In such a case, a relative path should be used instead.)";
83 typedef topology-ref {
85 path "/network-topology/topology/topology-id";
88 "A type for an absolute reference a topology instance.";
93 path "/network-topology/topology/node/node-id";
96 "A type for an absolute reference to a node instance.
97 (This type should not be used for relative references.
98 In such a case, a relative path should be used instead.)";
103 path "/network-topology/topology/link/link-id";
106 "A type for an absolute reference a link instance.
107 (This type should not be used for relative references.
108 In such a case, a relative path should be used instead.)";
111 grouping tp-attributes {
113 "The data objects needed to define a termination point.
114 (This only includes a single leaf at this point, used
115 to identify the termination point.)
116 Provided in a grouping so that in addition to the datastore,
117 the data can also be included in notifications.";
125 "The leaf list identifies any termination points that the
126 termination point is dependent on, or maps onto.
127 Those termination points will themselves be contained
128 in a supporting node.
129 This dependency information can be inferred from
130 the dependencies between links. For this reason,
131 this item is not separately configurable. Hence no
132 corresponding constraint needs to be articulated.
133 The corresponding information is simply provided by the
134 implementing system.";
138 grouping node-attributes {
140 "The data objects needed to define a node.
141 The objects are provided in a grouping so that in addition to
142 the datastore, the data can also be included in notifications
147 "The identifier of a node in the topology.
148 A node is specific to a topology to which it belongs.";
150 list supporting-node {
152 "This list defines vertical layering information for nodes.
153 It allows to capture for any given node, which node (or nodes)
154 in the corresponding underlay topology it maps onto.
155 A node can map to zero, one, or more nodes below it;
156 accordingly there can be zero, one, or more elements in the list.
157 If there are specific layering requirements, for example
158 specific to a particular type of topology that only allows
159 for certain layering relationships, the choice
160 below can be augmented with additional cases.
161 A list has been chosen rather than a leaf-list in order
162 to provide room for augmentations, e.g. for
163 statistics or priorization information associated with
172 grouping link-attributes {
173 // This is a grouping, not defined inline with the link definition itself,
174 // so it can be included in a notification, if needed
178 "The identifier of a link in the topology.
179 A link is specific to a topology to which it belongs.";
186 "Source node identifier, must be in same topology.";
191 "Termination point within source node that terminates the link.";
194 container destination {
199 "Destination node identifier, must be in same topology.";
204 "Termination point within destination node that terminates the link.";
207 list supporting-link {
216 container network-topology {
219 This is the model of an abstract topology.
220 A topology contins nodes and links.
221 Each topology MUST be identified by
222 unique topology-id for reason that a network could contain many
229 It is presumed that a datastore will contain many topologies. To
230 distinguish between topologies it is vital to have UNIQUE
231 topology identifiers.
234 container topology-types {
236 "This container is used to identify the type, or types
237 (as a topology can support several types simultaneously),
239 Topology types are the subject of several integrity constraints
240 that an implementing server can validate in order to
241 maintain integrity of the datastore.
242 Topology types are indicated through separate data nodes;
243 the set of topology types is expected to increase over time.
244 To add support for a new topology, an augmenting module
245 needs to augment this container with a new empty optional
246 container to indicate the new topology type.
247 The use of a container allows to indicate a subcategorization
249 The container SHALL NOT be augmented with any data nodes
250 that serve a purpose other than identifying a particular
254 list underlay-topology {
259 // a list, not a leaf-list, to allow for potential augmentation
260 // with properties specific to the underlay topology,
261 // such as statistics, preferences, or cost.
263 "Identifies the topology, or topologies, that this topology
268 description "The list of network nodes defined for the topology.";
270 uses node-attributes;
271 must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])";
272 // This constraint is meant to ensure that a referenced node is in fact
273 // a node in an underlay topology.
274 list termination-point {
276 "A termination point can terminate a link.
277 Depending on the type of topology, a termination point could,
278 for example, refer to a port or an interface.";
286 A Network Link connects a by Local (Source) node and
287 a Remote (Destination) Network Nodes via a set of the
288 nodes' termination points.
289 As it is possible to have several links between the same
290 source and destination nodes, and as a link could potentially
291 be re-homed between termination points, to ensure that we
292 would always know to distinguish between links, every link
293 is identified by a dedicated link identifier.
294 Note that a link models a point-to-point link, not a multipoint
296 Layering dependencies on links in underlay topologies are
297 not represented as the layering information of nodes and of
298 termination points is sufficient.
301 uses link-attributes;
302 must "boolean(../underlay-topology/link[./supporting-link])";
303 // Constraint: any supporting link must be part of an underlay topology
304 must "boolean(../node[./source/source-node])";
305 // Constraint: A link must have as source a node of the same topology
306 must "boolean(../node[./destination/dest-node])";
307 // Constraint: A link must have as source a destination of the same topology
308 must "boolean(../node/termination-point[./source/source-tp])";
309 // Constraint: The source termination point must be contained in the source node
310 must "boolean(../node/termination-point[./destination/dest-tp])";
311 // Constraint: The destination termination point must be contained
312 // in the destination node