2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 module network-topology {
10 namespace "urn:TBD:params:xml:ns:yang:network-topology";
11 // replace with IANA namespace when assigned
16 contact "WILL-BE-DEFINED-LATER";
19 "This module defines a model for the topology of a network.
20 Key design decisions are as follows:
21 A topology consists of a set of nodes and links.
22 Links are point-to-point and unidirectional.
23 Bidirectional connections need to be represented through
25 Multipoint connections, broadcast domains etc can be represented
26 through a hierarchy of nodes, then connecting nodes at
27 upper layers of the hierarchy.";
37 "An identifier for a topology.";
43 "An identifier for a node in a topology.
44 The identifier may be opaque.
45 The identifier SHOULD be chosen such that the same node in a
46 real network topology will always be identified through the
47 same identifier, even if the model is instantiated in separate
48 datastores. An implementation MAY choose to capture semantics
49 in the identifier, for example to indicate the type of node
50 and/or the type of topology that the node is a part of.";
56 "An identifier for a link in a topology.
57 The identifier may be opaque.
58 The identifier SHOULD be chosen such that the same link in a
59 real network topology will always be identified through the
60 same identifier, even if the model is instantiated in separate
61 datastores. An implementation MAY choose to capture semantics
62 in the identifier, for example to indicate the type of link
63 and/or the type of topology that the link is a part of.";
69 "An identifier for termination points on a node.
70 The identifier may be opaque.
71 The identifier SHOULD be chosen such that the same TP in a
72 real network topology will always be identified through the
73 same identifier, even if the model is instantiated in separate
74 datastores. An implementation MAY choose to capture semantics
75 in the identifier, for example to indicate the type of TP
76 and/or the type of node and topology that the TP is a part of.";
81 path "/network-topology/topology/node/termination-point/tp-id";
84 "A type for an absolute reference to a termination point.
85 (This type should not be used for relative references.
86 In such a case, a relative path should be used instead.)";
88 typedef topology-ref {
90 path "/network-topology/topology/topology-id";
93 "A type for an absolute reference a topology instance.";
98 path "/network-topology/topology/node/node-id";
101 "A type for an absolute reference to a node instance.
102 (This type should not be used for relative references.
103 In such a case, a relative path should be used instead.)";
108 path "/network-topology/topology/link/link-id";
111 "A type for an absolute reference a link instance.
112 (This type should not be used for relative references.
113 In such a case, a relative path should be used instead.)";
118 length 5..10|15..20|25..30;
120 description "x type description";
121 reference "x type reference";
130 identity crypto-alg {
131 description "Base identity from which all crypto algorithms are derived.";
136 description "DES crypto algorithm";
141 description "Triple DES crypto algorithm";
144 grouping tp-attributes {
146 "The data objects needed to define a termination point.
147 (This only includes a single leaf at this point, used
148 to identify the termination point.)
149 Provided in a grouping so that in addition to the datastore,
150 the data can also be included in notifications.";
158 "The leaf list identifies any termination points that the
159 termination point is dependent on, or maps onto.
160 Those termination points will themselves be contained
161 in a supporting node.
162 This dependency information can be inferred from
163 the dependencies between links. For this reason,
164 this item is not separately configurable. Hence no
165 corresponding constraint needs to be articulated.
166 The corresponding information is simply provided by the
167 implementing system.";
171 grouping node-attributes {
173 "The data objects needed to define a node.
174 The objects are provided in a grouping so that in addition to
175 the datastore, the data can also be included in notifications
180 "The identifier of a node in the topology.
181 A node is specific to a topology to which it belongs.";
183 list supporting-node {
185 "This list defines vertical layering information for nodes.
186 It allows to capture for any given node, which node (or nodes)
187 in the corresponding underlay topology it maps onto.
188 A node can map to zero, one, or more nodes below it;
189 accordingly there can be zero, one, or more elements in the list.
190 If there are specific layering requirements, for example
191 specific to a particular type of topology that only allows
192 for certain layering relationships, the choice
193 below can be augmented with additional cases.
194 A list has been chosen rather than a leaf-list in order
195 to provide room for augmentations, e.g. for
196 statistics or priorization information associated with
205 grouping link-attributes {
206 // This is a grouping, not defined inline with the link definition itself,
207 // so it can be included in a notification, if needed
211 "The identifier of a link in the topology.
212 A link is specific to a topology to which it belongs.";
220 "Source node identifier, must be in same topology.";
225 "Termination point within source node that terminates the link.";
228 container destination {
233 "Destination node identifier, must be in same topology.";
238 "Termination point within destination node that terminates the link.";
241 list supporting-link {
250 container network-topology {
253 This is the model of an abstract topology.
254 A topology contins nodes and links.
255 Each topology MUST be identified by
256 unique topology-id for reason that a network could contain many
263 It is presumed that a datastore will contain many topologies. To
264 distinguish between topologies it is vital to have UNIQUE
265 topology identifiers.
268 container topology-types {
270 "This container is used to identify the type, or types
271 (as a topology can support several types simultaneously),
273 Topology types are the subject of several integrity constraints
274 that an implementing server can validate in order to
275 maintain integrity of the datastore.
276 Topology types are indicated through separate data nodes;
277 the set of topology types is expected to increase over time.
278 To add support for a new topology, an augmenting module
279 needs to augment this container with a new empty optional
280 container to indicate the new topology type.
281 The use of a container allows to indicate a subcategorization
283 The container SHALL NOT be augmented with any data nodes
284 that serve a purpose other than identifying a particular
311 list underlay-topology {
316 // a list, not a leaf-list, to allow for potential augmentation
317 // with properties specific to the underlay topology,
318 // such as statistics, preferences, or cost.
320 "Identifies the topology, or topologies, that this topology
325 description "The list of network nodes defined for the topology.";
327 uses node-attributes;
328 must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])";
329 // This constraint is meant to ensure that a referenced node is in fact
330 // a node in an underlay topology.
331 list termination-point {
333 "A termination point can terminate a link.
334 Depending on the type of topology, a termination point could,
335 for example, refer to a port or an interface.";
343 A Network Link connects a by Local (Source) node and
344 a Remote (Destination) Network Nodes via a set of the
345 nodes' termination points.
346 As it is possible to have several links between the same
347 source and destination nodes, and as a link could potentially
348 be re-homed between termination points, to ensure that we
349 would always know to distinguish between links, every link
350 is identified by a dedicated link identifier.
351 Note that a link models a point-to-point link, not a multipoint
353 Layering dependencies on links in underlay topologies are
354 not represented as the layering information of nodes and of
355 termination points is sufficient.
358 uses link-attributes;
359 must "boolean(../underlay-topology/link[./supporting-link]";
360 // Constraint: any supporting link must be part of an underlay topology
361 must "boolean(../node[./source/source-node])";
362 // Constraint: A link must have as source a node of the same topology
363 must "boolean(../node[./destination/dest-node])";
364 // Constraint: A link must have as source a destination of the same topology
365 must "boolean(../node/termination-point[./source/source-tp])";
366 // Constraint: The source termination point must be contained in the source node
367 must "boolean(../node/termination-point[./destination/dest-tp])";
368 // Constraint: The destination termination point must be contained
369 // in the destination node
375 description "This example defines a notification 1.";
379 anyxml reporting-entity;
382 container endpoints {
398 description "This example defines a notification 2.";
402 anyxml reporting-entity;
408 augment "/network-topology" {
413 augment "/network-topology/topology" {
414 description "description of augment 2";
415 reference "reference of augment 2";
424 augment "/network-topology/topology/topology-types" {
425 container container-c {
433 description "This statement is used to define a NETCONF RPC operation.";
434 reference "http://tools.ietf.org/html/rfc6020#section-7.13";
449 "Takes as argument a name string.
450 Makes the code generator use the given name in the
455 feature local-storage {
457 "This feature means the device supports local
458 storage (memory, flash or disk) that can be used to
459 store syslog messages.";