1 module network-topology {
3 namespace "urn:TBD:params:xml:ns:yang:network-topology";
4 // replace with IANA namespace when assigned
9 contact "WILL-BE-DEFINED-LATER";
12 "This module defines a model for the topology of a network.
13 Key design decisions are as follows:
14 A topology consists of a set of nodes and links.
15 Links are point-to-point and unidirectional.
16 Bidirectional connections need to be represented through
18 Multipoint connections, broadcast domains etc can be represented
19 through a hierarchy of nodes, then connecting nodes at
20 upper layers of the hierarchy.";
30 "An identifier for a topology.";
36 "An identifier for a node in a topology.
37 The identifier may be opaque.
38 The identifier SHOULD be chosen such that the same node in a
39 real network topology will always be identified through the
40 same identifier, even if the model is instantiated in separate
41 datastores. An implementation MAY choose to capture semantics
42 in the identifier, for example to indicate the type of node
43 and/or the type of topology that the node is a part of.";
49 "An identifier for a link in a topology.
50 The identifier may be opaque.
51 The identifier SHOULD be chosen such that the same link in a
52 real network topology will always be identified through the
53 same identifier, even if the model is instantiated in separate
54 datastores. An implementation MAY choose to capture semantics
55 in the identifier, for example to indicate the type of link
56 and/or the type of topology that the link is a part of.";
62 "An identifier for termination points on a node.
63 The identifier may be opaque.
64 The identifier SHOULD be chosen such that the same TP in a
65 real network topology will always be identified through the
66 same identifier, even if the model is instantiated in separate
67 datastores. An implementation MAY choose to capture semantics
68 in the identifier, for example to indicate the type of TP
69 and/or the type of node and topology that the TP is a part of.";
74 path "/network-topology/topology/node/termination-point/tp-id";
77 "A type for an absolute reference to a termination point.
78 (This type should not be used for relative references.
79 In such a case, a relative path should be used instead.)";
81 typedef topology-ref {
83 path "/network-topology/topology/topology-id";
86 "A type for an absolute reference a topology instance.";
91 path "/network-topology/topology/node/node-id";
94 "A type for an absolute reference to a node instance.
95 (This type should not be used for relative references.
96 In such a case, a relative path should be used instead.)";
101 path "/network-topology/topology/link/link-id";
104 "A type for an absolute reference a link instance.
105 (This type should not be used for relative references.
106 In such a case, a relative path should be used instead.)";
121 grouping tp-attributes {
123 "The data objects needed to define a termination point.
124 (This only includes a single leaf at this point, used
125 to identify the termination point.)
126 Provided in a grouping so that in addition to the datastore,
127 the data can also be included in notifications.";
135 "The leaf list identifies any termination points that the
136 termination point is dependent on, or maps onto.
137 Those termination points will themselves be contained
138 in a supporting node.
139 This dependency information can be inferred from
140 the dependencies between links. For this reason,
141 this item is not separately configurable. Hence no
142 corresponding constraint needs to be articulated.
143 The corresponding information is simply provided by the
144 implementing system.";
148 grouping node-attributes {
150 "The data objects needed to define a node.
151 The objects are provided in a grouping so that in addition to
152 the datastore, the data can also be included in notifications
157 "The identifier of a node in the topology.
158 A node is specific to a topology to which it belongs.";
160 list supporting-node {
162 "This list defines vertical layering information for nodes.
163 It allows to capture for any given node, which node (or nodes)
164 in the corresponding underlay topology it maps onto.
165 A node can map to zero, one, or more nodes below it;
166 accordingly there can be zero, one, or more elements in the list.
167 If there are specific layering requirements, for example
168 specific to a particular type of topology that only allows
169 for certain layering relationships, the choice
170 below can be augmented with additional cases.
171 A list has been chosen rather than a leaf-list in order
172 to provide room for augmentations, e.g. for
173 statistics or priorization information associated with
182 grouping link-attributes {
183 // This is a grouping, not defined inline with the link definition itself,
184 // so it can be included in a notification, if needed
188 "The identifier of a link in the topology.
189 A link is specific to a topology to which it belongs.";
197 "Source node identifier, must be in same topology.";
202 "Termination point within source node that terminates the link.";
205 container destination {
210 "Destination node identifier, must be in same topology.";
215 "Termination point within destination node that terminates the link.";
218 list supporting-link {
227 container network-topology {
230 This is the model of an abstract topology.
231 A topology contins nodes and links.
232 Each topology MUST be identified by
233 unique topology-id for reason that a network could contain many
240 It is presumed that a datastore will contain many topologies. To
241 distinguish between topologies it is vital to have UNIQUE
242 topology identifiers.
245 container topology-types {
247 "This container is used to identify the type, or types
248 (as a topology can support several types simultaneously),
250 Topology types are the subject of several integrity constraints
251 that an implementing server can validate in order to
252 maintain integrity of the datastore.
253 Topology types are indicated through separate data nodes;
254 the set of topology types is expected to increase over time.
255 To add support for a new topology, an augmenting module
256 needs to augment this container with a new empty optional
257 container to indicate the new topology type.
258 The use of a container allows to indicate a subcategorization
260 The container SHALL NOT be augmented with any data nodes
261 that serve a purpose other than identifying a particular
265 list underlay-topology {
270 // a list, not a leaf-list, to allow for potential augmentation
271 // with properties specific to the underlay topology,
272 // such as statistics, preferences, or cost.
274 "Identifies the topology, or topologies, that this topology
279 description "The list of network nodes defined for the topology.";
281 uses node-attributes;
282 must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])";
283 // This constraint is meant to ensure that a referenced node is in fact
284 // a node in an underlay topology.
285 list termination-point {
287 "A termination point can terminate a link.
288 Depending on the type of topology, a termination point could,
289 for example, refer to a port or an interface.";
297 A Network Link connects a by Local (Source) node and
298 a Remote (Destination) Network Nodes via a set of the
299 nodes' termination points.
300 As it is possible to have several links between the same
301 source and destination nodes, and as a link could potentially
302 be re-homed between termination points, to ensure that we
303 would always know to distinguish between links, every link
304 is identified by a dedicated link identifier.
305 Note that a link models a point-to-point link, not a multipoint
307 Layering dependencies on links in underlay topologies are
308 not represented as the layering information of nodes and of
309 termination points is sufficient.
312 uses link-attributes;
313 must "boolean(../underlay-topology/link[./supporting-link]";
314 // Constraint: any supporting link must be part of an underlay topology
315 must "boolean(../node[./source/source-node])";
316 // Constraint: A link must have as source a node of the same topology
317 must "boolean(../node[./destination/dest-node])";
318 // Constraint: A link must have as source a destination of the same topology
319 must "boolean(../node/termination-point[./source/source-tp])";
320 // Constraint: The source termination point must be contained in the source node
321 must "boolean(../node/termination-point[./destination/dest-tp])";
322 // Constraint: The destination termination point must be contained
323 // in the destination node
329 description "This example defines a notification 1.";
333 anyxml reporting-entity;
342 description "This example defines a notification 2.";
346 anyxml reporting-entity;
352 augment "/network-topology" {
357 augment "/network-topology/topology" {
358 description "description of augment 2";
359 reference "reference of augment 2";
368 augment "/network-topology/topology/topology-types" {
369 container container-c {
391 "Takes as argument a name string.
392 Makes the code generator use the given name in the