blob: 10c8fb9e8be68630517407fe537b5ac925ee5965 [file] [log] [blame]
VinodKumarS-Huawei2ee9e7e2016-06-01 14:30:22 +05301 module ietf-network-topology {
2 yang-version 1;
3 namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
4 prefix lnk;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9 import ietf-network {
10 prefix nd;
11 }
12
13 organization
14 "IETF I2RS (Interface to the Routing System) Working Group";
15
16 contact
17 "WG Web: <http://tools.ietf.org/wg/i2rs/>
18 WG List: <mailto:i2rs@ietf.org>
19
20 WG Chair: Susan Hares
21 <mailto:shares@ndzh.com>
22
23 WG Chair: Jeffrey Haas
24 <mailto:jhaas@pfrc.org>
25
26 Editor: Alexander Clemm
27 <mailto:alex@cisco.com>
28
29 Editor: Jan Medved
30 <mailto:jmedved@cisco.com>
31
32 Editor: Robert Varga
33 <mailto:rovarga@cisco.com>
34
35 Editor: Tony Tkacik
36 <mailto:ttkacik@cisco.com>
37
38 Editor: Nitin Bahadur
39 <mailto:nitin_bahadur@yahoo.com>
40
41 Editor: Hariharan Ananthakrishnan
42 <mailto:hari@packetdesign.com>";
43
44 description
45 "This module defines a common base model for network topology,
46 augmenting the base network model with links to connect nodes,
47 as well as termination points to terminate links on nodes.
48
49 Copyright (c) 2015 IETF Trust and the persons identified as
50 authors of the code. All rights reserved.
51
52 Redistribution and use in source and binary forms, with or
53 without modification, is permitted pursuant to, and subject
54 to the license terms contained in, the Simplified BSD License
55 set forth in Section 4.c of the IETF Trust's Legal Provisions
56 Relating to IETF Documents
57 (http://trustee.ietf.org/license-info).
58
59 This version of this YANG module is part of
60 draft-ietf-i2rs-yang-network-topo-02;
61 see the RFC itself for full legal notices.
62
63 NOTE TO RFC EDITOR: Please replace above reference to
64 draft-ietf-i2rs-yang-network-topo-02 with RFC
65 number when published (i.e. RFC xxxx).";
66
67 revision 2015-12-08 {
68 description
69 "Initial revision.
70 NOTE TO RFC EDITOR: Please replace the following reference
71 to draft-ietf-i2rs-yang-network-topo-02 with
72 RFC number when published (i.e. RFC xxxx).";
73 reference
74 "draft-ietf-i2rs-yang-network-topo-02.";
75 }
76
77 typedef link-id {
78 type inet:uri;
79 description
80 "An identifier for a link in a topology.
81 The identifier SHOULD be chosen such that the same link in a
82 real network topology will always be identified through the
83 same identifier, even if the model is instantiated in
84 separate datastores. An implementation MAY choose to capture
85 semantics in the identifier, for example to indicate the type
86 of link and/or the type of topology that the link is a part
87 of.";
88 }
89
90 typedef tp-id {
91 type inet:uri;
92 description
93 "An identifier for termination points on a node.
94 The identifier SHOULD be chosen such that the same TP in a
95 real network topology will always be identified through the
96 same identifier, even if the model is instantiated in
97 separate datastores. An implementation MAY choose to capture
98 semantics in the identifier, for example to indicate the type
99 of TP and/or the type of node and topology that the TP is a
100 part of.";
101 }
102 grouping link-ref {
103 description
104 "References a link in a specific network.";
105 leaf link-ref {
106 type link-id;
107 description
108 "A type for an absolute reference 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.)";
111 }
112 uses nd:network-ref;
113 }
114
115 grouping tp-ref {
116 description
117 "References a termination point in a specific node.";
118 leaf tp-ref {
119 type tp-id;
120 description
121 "A type for an absolute reference to a termination point.
122 (This type should not be used for relative references.
123 In such a case, a relative path should be used instead.)";
124 }
125 uses nd:node-ref;
126 }
127
128 augment "/nd:networks/nd:network" {
129 description
130 "Add links to the network model.";
131 list link {
132 key "link-id";
133 description
134 "A Network Link connects a by Local (Source) node and
135 a Remote (Destination) Network Nodes via a set of the
136 nodes' termination points.
137 As it is possible to have several links between the same
138 source and destination nodes, and as a link could
139 potentially be re-homed between termination points, to
140 ensure that we would always know to distinguish between
141 links, every link is identified by a dedicated link
142 identifier.
143 Note that a link models a point-to-point link, not a
144 multipoint link.
145 Layering dependencies on links in underlay topologies are
146 not represented as the layering information of nodes and of
147 termination points is sufficient.";
148 container source {
149 description
150 "This container holds the logical source of a particular
151 link.";
152 leaf source-node {
153 type nd:node-id;
154 mandatory true;
155 description
156 "Source node identifier, must be in same topology.";
157 }
158 leaf source-tp {
159 type tp-id;
160 description
161 "Termination point within source node that terminates
162 the link.";
163 }
164 }
165 container destination {
166 description
167 "This container holds the logical destination of a
168 particular link.";
169 leaf dest-node {
170 type nd:node-id;
171 mandatory true;
172 description
173 "Destination node identifier, must be in the same
174 network.";
175 }
176 leaf dest-tp {
177 type tp-id;
178 description
179 "Termination point within destination node that
180 terminates the link.";
181 }
182 }
183 leaf link-id {
184 type link-id;
185 description
186 "The identifier of a link in the topology.
187 A link is specific to a topology to which it belongs.";
188 }
189 list supporting-link {
190 key "network-ref link-ref";
191 description
192 "Identifies the link, or links, that this link
193 is dependent on.";
194 leaf network-ref {
195 type nd:network-id;
196 description
197 "This leaf identifies in which underlay topology
198 supporting link is present.";
199 }
200 leaf link-ref {
201 type link-id;
202 description
203 "This leaf identifies a link which is a part
204 of this link's underlay. Reference loops, in which
205 a link identifies itself as its underlay, either
206 directly or transitively, are not allowed.";
207 }
208 }
209 }
210 }
211 augment "/nd:networks/nd:network/nd:node" {
212 description
213 "Augment termination points which terminate links.
214 Termination points can ultimately be mapped to interfaces.";
215 list termination-point {
216 key "tp-id";
217 description
218 "A termination point can terminate a link.
219 Depending on the type of topology, a termination point
220 could, for example, refer to a port or an interface.";
221 leaf tp-id {
222 type tp-id;
223 description
224 "Termination point identifier.";
225 }
226 list supporting-termination-point {
227 key "network-ref node-ref tp-ref";
228 description
229 "The leaf list identifies any termination points that
230 the termination point is dependent on, or maps onto.
231 Those termination points will themselves be contained
232 in a supporting node.
233 This dependency information can be inferred from
234 the dependencies between links. For this reason,
235 this item is not separately configurable. Hence no
236 corresponding constraint needs to be articulated.
237 The corresponding information is simply provided by the
238 implementing system.";
239 leaf network-ref {
240 type nd:network-id;
241 description
242 "This leaf identifies in which topology the
243 supporting termination point is present.";
244 }
245 leaf node-ref {
246 type nd:node-id;
247 description
248 "This leaf identifies in which node the supporting
249 termination point is present.";
250 }
251 leaf tp-ref {
252 type tp-id;
253 description
254 "Reference to the underlay node, must be in a
255 different topology";
256 }
257 }
258 }
259 }
260 }