Add RFC8795 types
[mdsal.git] / model / ietf / rfc8795-ietf-te-topology-state / src / main / yang / ietf-te-topology-state@2020-08-06.yang
1 module ietf-te-topology-state {
2   yang-version 1.1;
3   namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology-state";
4   prefix tet-s;
5
6   import ietf-te-types {
7     prefix te-types;
8     reference
9       "RFC 8776: Common YANG Data Types for Traffic Engineering";
10   }
11   import ietf-te-topology {
12     prefix tet;
13     reference
14       "RFC 8795: YANG Data Model for Traffic Engineering (TE)
15        Topologies";
16   }
17   import ietf-network-state {
18     prefix nw-s;
19     reference
20       "RFC 8345: A YANG Data Model for Network Topologies";
21   }
22   import ietf-network-topology-state {
23     prefix nt-s;
24     reference
25       "RFC 8345: A YANG Data Model for Network Topologies";
26   }
27
28   organization
29     "IETF Traffic Engineering Architecture and Signaling (TEAS)
30      Working Group";
31   contact
32     "WG Web:   <https://datatracker.ietf.org/wg/teas/>
33      WG List:  <mailto:teas@ietf.org>
34
35      Editor:   Xufeng Liu
36                <mailto:xufeng.liu.ietf@gmail.com>
37
38      Editor:   Igor Bryskin
39                <mailto:i_bryskin@yahoo.com>
40
41      Editor:   Vishnu Pavan Beeram
42                <mailto:vbeeram@juniper.net>
43
44      Editor:   Tarek Saad
45                <mailto:tsaad@juniper.net>
46
47      Editor:   Himanshu Shah
48                <mailto:hshah@ciena.com>
49
50      Editor:   Oscar Gonzalez de Dios
51                <mailto:oscar.gonzalezdedios@telefonica.com>";
52   description
53     "This YANG module defines a TE topology state model.
54
55      Copyright (c) 2020 IETF Trust and the persons identified as
56      authors of the code.  All rights reserved.
57
58      Redistribution and use in source and binary forms, with or
59      without modification, is permitted pursuant to, and subject to
60      the license terms contained in, the Simplified BSD License set
61      forth in Section 4.c of the IETF Trust's Legal Provisions
62      Relating to IETF Documents
63      (https://trustee.ietf.org/license-info).
64
65      This version of this YANG module is part of RFC 8795; see the
66      RFC itself for full legal notices.";
67
68   revision 2020-08-06 {
69     description
70       "Initial revision.";
71     reference
72       "RFC 8795: YANG Data Model for Traffic Engineering (TE)
73        Topologies";
74   }
75
76   /*
77    * Groupings
78    */
79
80   grouping te-node-connectivity-matrix-attributes {
81     description
82       "Termination point references of a connectivity matrix entry.";
83     container from {
84       description
85         "Reference to a source Link Termination Point (LTP).";
86       leaf tp-ref {
87         type leafref {
88           path "../../../../../../nt-s:termination-point/nt-s:tp-id";
89         }
90         description
91           "Relative reference to a termination point.";
92       }
93       uses te-types:label-set-info;
94     }
95     container to {
96       description
97         "Reference to a destination LTP.";
98       leaf tp-ref {
99         type leafref {
100           path "../../../../../../nt-s:termination-point/nt-s:tp-id";
101         }
102         description
103           "Relative reference to a termination point.";
104       }
105       uses te-types:label-set-info;
106     }
107     uses tet:connectivity-matrix-entry-path-attributes;
108   }
109   // te-node-connectivity-matrix-attributes
110
111   grouping te-node-tunnel-termination-point-llc-list {
112     description
113       "Local Link Connectivity List (LLCL) of a Tunnel Termination
114        Point (TTP) on a TE node.";
115     list local-link-connectivity {
116       key "link-tp-ref";
117       description
118         "The termination capabilities between the TTP and the LTP.
119          This capability information can be used to compute
120          the tunnel path.
121          The Interface Adjustment Capability Descriptors (IACDs)
122          (defined in RFC 6001) on each LTP can be derived from
123          this list.";
124       reference
125         "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions
126          for Multi-Layer and Multi-Region Networks (MLN/MRN)";
127       leaf link-tp-ref {
128         type leafref {
129           path "../../../../../nt-s:termination-point/nt-s:tp-id";
130         }
131         description
132           "LTP.";
133       }
134       uses te-types:label-set-info;
135       uses tet:connectivity-matrix-entry-path-attributes;
136     }
137     // local-link-connectivity
138   }
139   // te-node-tunnel-termination-point-llc-list
140
141   /*
142    * Data nodes
143    */
144
145   augment "/nw-s:networks/nw-s:network/nw-s:network-types" {
146     description
147       "Introduces a new network type for a TE topology.";
148     container te-topology {
149       presence "Indicates a TE topology";
150       description
151         "Its presence identifies the TE topology type.";
152     }
153   }
154
155   augment "/nw-s:networks" {
156     description
157       "Augmentation parameters for TE topologies.";
158     uses tet:te-topologies-augment;
159   }
160
161   augment "/nw-s:networks/nw-s:network" {
162     when 'nw-s:network-types/tet-s:te-topology' {
163       description
164         "Augmentation parameters apply only for networks with a
165          TE topology type.";
166     }
167     description
168       "Configuration parameters for a TE topology.";
169     uses tet:te-topology-augment;
170   }
171
172   augment "/nw-s:networks/nw-s:network/nw-s:node" {
173     when '../nw-s:network-types/tet-s:te-topology' {
174       description
175         "Augmentation parameters apply only for networks with a
176          TE topology type.";
177     }
178     description
179       "Configuration parameters for TE at the node level.";
180     leaf te-node-id {
181       type te-types:te-node-id;
182       description
183         "The identifier of a node in the TE topology.
184          A node is specific to a topology to which it belongs.";
185     }
186     container te {
187       must '../te-node-id' {
188         description
189           "'te-node-id' is mandatory.";
190       }
191       must 'count(../nw-s:supporting-node)<=1' {
192         description
193           "For a node in a TE topology, there cannot be more
194            than one supporting node.  If multiple nodes are
195            abstracted, the 'underlay-topology' field is used.";
196       }
197       presence "TE support";
198       description
199         "Indicates TE support.";
200       uses tet:te-node-augment;
201     }
202   }
203
204   augment "/nw-s:networks/nw-s:network/nt-s:link" {
205     when '../nw-s:network-types/tet-s:te-topology' {
206       description
207         "Augmentation parameters apply only for networks with a
208          TE topology type.";
209     }
210     description
211       "Configuration parameters for TE at the link level.";
212     container te {
213       must 'count(../nt-s:supporting-link)<=1' {
214         description
215           "For a link in a TE topology, there cannot be more
216            than one supporting link.  If one or more link paths are
217            abstracted, the underlay is used.";
218       }
219       presence "TE support";
220       description
221         "Indicates TE support.";
222       uses tet:te-link-augment;
223     }
224   }
225
226   augment "/nw-s:networks/nw-s:network/nw-s:node/"
227         + "nt-s:termination-point" {
228     when '../../nw-s:network-types/tet-s:te-topology' {
229       description
230         "Augmentation parameters apply only for networks with a
231          TE topology type.";
232     }
233     description
234       "Configuration parameters for TE at the termination point
235        level.";
236     uses tet:te-termination-point-augment;
237   }
238
239   augment "/nw-s:networks/nw-s:network/nt-s:link/te/"
240         + "bundle-stack-level/bundle/bundled-links/bundled-link" {
241     when '../../../../nw-s:network-types/tet-s:te-topology' {
242       description
243         "Augmentation parameters apply only for networks with a
244          TE topology type.";
245     }
246     description
247       "Augmentation for a TE bundled link.";
248     leaf src-tp-ref {
249       type leafref {
250         path "../../../../../nw-s:node[nw-s:node-id = "
251            + "current()/../../../../nt-s:source/"
252            + "nt-s:source-node]/"
253            + "nt-s:termination-point/nt-s:tp-id";
254         require-instance true;
255       }
256       description
257         "Reference to another TE termination point on the
258          same source node.";
259     }
260     leaf des-tp-ref {
261       type leafref {
262         path "../../../../../nw-s:node[nw-s:node-id = "
263            + "current()/../../../../nt-s:destination/"
264            + "nt-s:dest-node]/"
265            + "nt-s:termination-point/nt-s:tp-id";
266         require-instance true;
267       }
268       description
269         "Reference to another TE termination point on the
270          same destination node.";
271     }
272   }
273
274   augment "/nw-s:networks/nw-s:network/nw-s:node/te/"
275         + "information-source-entry/connectivity-matrices/"
276         + "connectivity-matrix" {
277     when '../../../../../nw-s:network-types/tet-s:te-topology' {
278       description
279         "Augmentation parameters apply only for networks with a
280          TE topology type.";
281     }
282     description
283       "Augmentation for the TE node connectivity matrix.";
284     uses te-node-connectivity-matrix-attributes;
285   }
286
287   augment "/nw-s:networks/nw-s:network/nw-s:node/te/"
288         + "te-node-attributes/connectivity-matrices/"
289         + "connectivity-matrix" {
290     when '../../../../../nw-s:network-types/tet-s:te-topology' {
291       description
292         "Augmentation parameters apply only for networks with a
293          TE topology type.";
294     }
295     description
296       "Augmentation for the TE node connectivity matrix.";
297     uses te-node-connectivity-matrix-attributes;
298   }
299
300   augment "/nw-s:networks/nw-s:network/nw-s:node/te/"
301         + "tunnel-termination-point/local-link-connectivities" {
302     when '../../../../nw-s:network-types/tet-s:te-topology' {
303       description
304         "Augmentation parameters apply only for networks with a
305          TE topology type.";
306     }
307     description
308       "Augmentation for TE node TTP LLCs (Local Link
309        Connectivities).";
310     uses te-node-tunnel-termination-point-llc-list;
311   }
312 }