upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-routing-constraints@2019-03-29.yang
1 module org-openroadm-routing-constraints {
2   namespace "http://org/openroadm/routing/constrains";
3   prefix org-openroadm-routing-constraints;
4
5   import org-openroadm-common-node-types {
6     prefix org-openroadm-common-node-types;
7     revision-date 2018-11-30;
8   }
9   import org-openroadm-network-resource {
10     prefix org-openroadm-network-resource;
11     revision-date 2018-11-30;
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 2019-03-29 {
48     description
49       "Version 5.0.0";
50   }
51   revision 2018-11-30 {
52     description
53       "Version 4.1.0";
54   }
55   revision 2018-09-28 {
56     description
57       "Version 4.0.0";
58   }
59   revision 2018-03-30 {
60     description
61       "Version 3.0.0";
62   }
63   revision 2017-12-15 {
64     description
65       "Version 2.2";
66   }
67   revision 2017-09-29 {
68     description
69       "Version 2.1";
70   }
71   revision 2017-06-26 {
72     description
73       "Version 2.0";
74   }
75   revision 2016-10-14 {
76     description
77       "Version 1.2";
78   }
79
80   grouping routing-constraints {
81     container hard-constraints {
82       uses constraints;
83     }
84     container soft-constraints {
85       uses constraints;
86     }
87   }
88
89   grouping constraints {
90     leaf-list customer-code {
91       type string;
92     }
93     choice co-routing-or-general {
94       case general {
95         container diversity {
96           uses diversity-existing-service-constraints;
97         }
98         container exclude {
99           uses common-constraints;
100           leaf-list supporting-service-name {
101             type string;
102             description
103               "Supporting service(s) to exclude from this route.";
104           }
105         }
106         container include {
107           uses common-constraints;
108           leaf-list supporting-service-name {
109             type string;
110             description
111               "Supporting service(s) to include in this route.";
112           }
113         }
114         container latency {
115           description
116             "Maximum latency allowed";
117           leaf max-latency {
118             type uint32;
119             units "ms";
120           }
121         }
122     container hop-count {
123           description
124             "Maximum hops allowed";
125           leaf max-wdm-hop-count {
126             type uint8;
127           }
128       leaf max-otn-hop-count {
129             type uint8;
130           }
131         }
132     container TE-metric {
133           description
134             "Maximum cost allowed";
135           leaf max-wdm-TE-metric {
136             type uint32;
137           }
138           leaf max-otn-TE-metric {
139             type uint32;
140           }
141          }
142     container distance {
143           description
144             "Maximum distance allowed";
145           leaf max-distance {
146                type decimal64 {
147                fraction-digits 2;
148                }
149          units "km";
150           }
151         }
152       }
153       case co-routing {
154         container co-routing {
155           leaf-list existing-service {
156             type string;
157             description
158               "Diverse from existing services identified by facility CLFI";
159           }
160         }
161       }
162     }
163   }
164
165   grouping common-constraints {
166     leaf-list fiber-bundle {
167       type string;
168     }
169     leaf-list srlg-id {
170       type uint32;
171       description
172         "unique identifier for SRLG";
173     }
174     leaf-list site {
175       type string;
176       description
177         "site identifies the clli.
178          clli from the device model; clli-network-ref + clli from the network model.";
179     }
180     leaf-list node-id {
181       type org-openroadm-common-node-types:node-id-type;
182       description
183         "node-id from the device model; openroadm-network-ref + node-id from the network model.";
184     }
185     list link-identifier {
186       key "link-network-id link-id";
187       description
188         "Refers to link-id(s) from the network model.
189          The openroadm-topology-ref + link-id identifies the link in the network model.";
190       uses org-openroadm-network-resource:network-link-name;
191     }
192   }
193
194   grouping diversity-existing-service-constraints {
195     leaf-list existing-service {
196       type string;
197       description
198         "Diverse from existing services identified by facility CLFI";
199     }
200     container existing-service-applicability {
201       leaf site {
202         type boolean;
203       }
204       leaf node {
205         type boolean;
206       }
207       leaf srlg {
208         type boolean;
209       }
210       leaf link {
211         type boolean;
212       }
213     }
214   }
215 }