Remove openroadm and tapi models building
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-routing-constraints@2021-12-10.yang
1 module org-openroadm-routing-constraints {
2   namespace "http://org/openroadm/routing/constraints";
3   prefix org-openroadm-routing-constraints;
4
5   import org-openroadm-common-node-types {
6     prefix org-openroadm-common-node-types;
7     revision-date 2021-05-28;
8   }
9   import org-openroadm-network-resource {
10     prefix org-openroadm-network-resource;
11     revision-date 2019-11-29;
12   }
13
14   organization
15     "Open ROADM MSA";
16   contact
17     "OpenROADM.org";
18   description
19     "YANG definitions of routing constraints.
20
21       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22       All other rights reserved.
23
24       Redistribution and use in source and binary forms, with or without modification,
25       are permitted provided that the following conditions are met:
26
27       * Redistributions of source code must retain the above copyright notice, this
28         list of conditions and the following disclaimer.
29       * Redistributions in binary form must reproduce the above copyright notice,
30         this list of conditions and the following disclaimer in the documentation and/or
31         other materials provided with the distribution.
32       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33         contributors may be used to endorse or promote products derived from this software
34         without specific prior written permission.
35
36       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
37       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
40       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
42       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45       POSSIBILITY OF SUCH DAMAGE";
46
47   revision 2021-12-10 {
48     description
49       "Version 10.1";
50   }
51   revision 2021-09-24 {
52     description
53       "Version 10.0";
54   }
55   revision 2021-05-28 {
56     description
57       "Version 9.1";
58   }
59   revision 2020-12-11 {
60     description
61       "Version 8.1";
62   }
63   revision 2020-09-25 {
64     description
65       "Version 8.0";
66   }
67   revision 2020-05-29 {
68     description
69       "Version 7.1.0";
70   }
71   revision 2019-11-29 {
72     description
73       "Version 6.1.0";
74   }
75   revision 2019-03-29 {
76     description
77       "Version 5.0.0";
78   }
79   revision 2018-11-30 {
80     description
81       "Version 4.1.0";
82   }
83   revision 2018-09-28 {
84     description
85       "Version 4.0.0";
86   }
87   revision 2018-03-30 {
88     description
89       "Version 3.0.0";
90   }
91   revision 2017-12-15 {
92     description
93       "Version 2.2";
94   }
95   revision 2017-09-29 {
96     description
97       "Version 2.1";
98   }
99   revision 2017-06-26 {
100     description
101       "Version 2.0";
102   }
103   revision 2016-10-14 {
104     description
105       "Version 1.2";
106   }
107
108   grouping routing-constraints {
109     container hard-constraints {
110       uses constraints;
111     }
112     container soft-constraints {
113       uses constraints;
114     }
115   }
116
117   grouping constraints {
118     leaf-list customer-code {
119       type string;
120     }
121     leaf-list operational-mode {
122       type string;
123     }
124     container diversity {
125       uses diversity-existing-service-constraints;
126       uses diversity-constraints;
127       description
128         "Diversity constraints for single or bulk requests.
129         diversity-constraints provides more options for bulk requests";
130     }
131     container exclude {
132       uses common-constraints;
133       leaf-list supporting-service-name {
134         type string;
135         description
136           "Supporting service(s) to exclude from this route.";
137       }
138     }
139     container include {
140       uses common-constraints;
141       leaf-list supporting-service-name {
142         type string;
143         description
144           "Supporting service(s) to include in this route.";
145       }
146     }
147     container latency {
148       description
149         "Maximum allowed one-way latency in milliseconds";
150       leaf max-latency {
151         type decimal64 {
152           fraction-digits 3;
153         }
154         units "milliseconds";
155       }
156     }
157     container hop-count {
158       description
159         "Maximum hops allowed";
160       leaf max-wdm-hop-count {
161         type uint8;
162       }
163       leaf max-otn-hop-count {
164         type uint8;
165       }
166     }
167     container TE-metric {
168       description
169         "Maximum cost allowed";
170       leaf max-wdm-TE-metric {
171         type uint32;
172       }
173       leaf max-otn-TE-metric {
174         type uint32;
175       }
176     }
177     container distance {
178       description
179         "Maximum distance allowed";
180       leaf max-distance {
181         type decimal64 {
182           fraction-digits 2;
183         }
184         units "km";
185       }
186     }
187     container co-routing {
188       list service-identifier-list {
189         description
190           "Indicates that new services that are part of the bulk service request
191           should be co-routed";
192         key "service-identifier";
193         leaf service-identifier {
194           type string;
195           description
196             "This can be a service-name or a common-id";
197         }
198         uses service-applicability-g;
199       }
200     }
201   }
202
203
204   grouping common-constraints {
205     leaf-list fiber-bundle {
206       type string;
207     }
208     leaf-list srlg-id {
209       type uint32;
210       description
211         "unique identifier for SRLG";
212     }
213     leaf-list site {
214       type string;
215       description
216         "site identifies the clli.
217          clli from the device model; clli-network-ref + clli from the network model.";
218     }
219     leaf-list node-id {
220       type org-openroadm-common-node-types:node-id-type;
221       description
222         "node-id from the device model; openroadm-network-ref + node-id from the network model.";
223     }
224     list link-identifier {
225       key "link-network-id link-id";
226       description
227         "Refers to link-id(s) from the network model.
228          The openroadm-topology-ref + link-id identifies the link in the network model.";
229       uses org-openroadm-network-resource:network-link-name;
230     }
231   }
232
233   grouping equipment{
234     container equipment {
235       leaf roadm-srg {
236         type boolean;
237         description "ROADM shared-risk-group diversity";
238       }
239       leaf xponder-srg {
240         type boolean;
241         description "xponder eqpt-srg-id diversity";
242       }
243       description
244         "Equipment Diversity Contraints";
245     }
246   }
247
248   grouping existing-service-applicability-g {
249     container existing-service-applicability {
250       leaf site {
251         type boolean;
252       }
253       leaf node {
254         type boolean;
255       }
256       leaf srlg {
257         type boolean;
258       }
259       leaf link {
260         type boolean;
261       }
262       uses equipment;
263     }
264   }
265
266   grouping service-applicability-g {
267     container service-applicability {
268       leaf site {
269         type boolean;
270       }
271       leaf node {
272         type boolean;
273       }
274       leaf srlg {
275         type boolean;
276       }
277       leaf link {
278         type boolean;
279       }
280       uses equipment;
281     }
282   }
283
284   grouping diversity-existing-service-constraints {
285     list service-identifier-list {
286         description
287           "Indicates that new services that are part of the bulk service request
288           should be co-routed";
289         key "service-indentifier";
290         leaf service-indentifier {
291           type string;
292           description
293             "This can be a service-name or a common-id";
294         }
295         uses service-applicability-g;
296     }
297     /*
298     leaf-list existing-service {
299       type string;
300       description
301         "Diverse from existing services identified by facility CLFI";
302     }
303     uses existing-service-applicability-g;
304     */
305   }
306
307   grouping diversity-constraints {
308     leaf diversity-type {
309       type enumeration {
310         enum serial {
311           value 1;
312           description
313             "Indicates that new services that are part of the bulk service request 
314             should be routed serially for diversity.";
315         }
316         enum synchronous {
317           value 2;
318           description
319             "Indicates that new services that are part of the bulk service request 
320             should be routed synchronously for diversity.";
321         }
322       }
323       description 
324         "This is only used when creating services using service-create-bulk. 
325         It is expected that 'diversity-type' should be same for all services,
326         within the group. Which means it can be either 'serial' or 'synchronous'
327         but not both.";
328     }
329   }
330 }