Merge "Add customer name to pathComputationRequest input"
[transportpce.git] / api / src / main / yang / service_path / transportpce-pce@2024-02-05.yang
1 module transportpce-pce {
2   namespace "http://org/opendaylight/transportpce/pce";
3   prefix org-opendaylight-transportpce-pce;
4
5   import org-openroadm-routing-constraints {
6     prefix org-openroadm-routing-constraints;
7   }
8   import org-openroadm-common-service-types {
9     prefix org-openroadm-common-service-types;
10   }
11   import transportpce-common-service-path-types {
12     prefix transportpce-common-service-path-types;
13   }
14   import transportpce-pathDescription {
15     prefix transportpce-pathDescription;
16   }
17   import gnpy-path-computation-simplified {
18     prefix gnpypc;
19   }
20
21   organization
22     "transportPCE";
23   contact
24     "transportPCE committers - ODL";
25   description
26     "YANG definitions of B interface (transportPCE). Adapted from service definition (openroadm)
27      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
28
29      openroadm copyright:
30       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
31       AT&T Intellectual Property.  All other rights reserved.
32
33       Redistribution and use in source and binary forms, with or without modification,
34       are permitted provided that the following conditions are met:
35
36       * Redistributions of source code must retain the above copyright notice, this
37         list of conditions and the following disclaimer.
38       * Redistributions in binary form must reproduce the above copyright notice,
39         this list of conditions and the following disclaimer in the documentation and/or
40         other materials provided with the distribution.
41       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
42         contributors may be used to endorse or promote products derived from this software
43         without specific prior written permission.
44
45       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
46       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
48       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
49       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
50       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
51       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
52       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54       POSSIBILITY OF SUCH DAMAGE";
55
56
57   revision 2024-02-05 {
58       description
59         "Add customer-name to path-computation-request input to check in controller-customization if the customer's
60         services need specific handling";
61   }
62   revision 2023-09-25 {
63       description
64         "Add pce-constraint-mode enum to be able to disinguish the way to manage node include constraints inside the
65          PCE module";
66   }
67   revision 2022-08-08 {
68       description
69         "Implement the RPC path-computation-reroute-request (only for reroute purposes) that computes a service path of
70         an existing service in order to reroute it";
71   }
72   revision 2022-06-15 {
73     description
74       "change fraction digits from 2 to 6 for accumulative-value leaf, from 2 to 6 to be compliant with Gnpy";
75   }
76   revision 2022-01-18 {
77     description
78       "Add in path-computation-request input the pce-routing-metric.
79        Replace transportpce-routing-constraints by org-openroadm-routing-constraints";
80   }
81   revision 2021-07-01 {
82     description
83       "Version 1.8";
84   }
85   revision 2020-01-28 {
86     description
87       "Version 1.7";
88   }
89   revision 2019-06-24 {
90     description
91       "Version 1.6.1";
92   }
93   revision 2017-10-17 {
94     description
95       "Version 1.6";
96   }
97   revision 2017-04-26 {
98     description
99       "Version 1.5";
100   }
101
102   typedef pce-constraint-mode {
103     type enumeration {
104       enum loose {
105         value 1;
106       }
107       enum strict {
108         value 2;
109       }
110     }
111   }
112
113   grouping stubpce-path-description {
114     leaf path-name {
115       type string;
116       mandatory true;
117       description
118         "Identifier for the pathDescription to be created in the ROADM
119          network, e.g., CLFI, CLCI, etc.";
120     }
121     uses transportpce-pathDescription:path-description;
122   }
123
124   grouping gnpy {
125     list gnpy-response {
126       key "path-dir";
127       config false;
128       description
129         "GNPy response";
130       leaf path-dir {
131         type string;
132         description
133           "A-to-Z or Z-to-A";
134       }
135       leaf feasibility {
136         type boolean;
137         description
138           "true : feasible path / False : non-feasible.";
139       }
140       choice response-type {
141         config false;
142         description
143           "response-type";
144         case no-path-case {
145           uses gnpypc:no-path-info;
146         }
147         case path-case {
148           description
149             "Path computation service.";
150           uses path-performance;
151         }
152       }
153     }
154   }
155
156   grouping path-performance {
157     description
158       "TE generic path properties grouping";
159     container path-properties {
160       config false;
161       description
162         "The TE path properties";
163       list path-metric {
164         key "metric-type";
165         description
166           "TE path metric type";
167         leaf metric-type {
168           type identityref {
169             base gnpypc:path-metric-type;
170           }
171         }
172         leaf accumulative-value {
173           type decimal64 {
174             fraction-digits 6;
175           }
176         }
177       }
178     }
179   }
180
181   rpc path-computation-request {
182     input {
183       leaf service-name {
184         type string;
185         mandatory true;
186         description
187           "Identifier for the service to be created in the ROADM network,
188            e.g., CLFI, CLCI, etc. This is reported against the service, but
189            may not get reflected in the service in the network.";
190       }
191       leaf customer-name {
192         type string;
193         description
194           "name of the customer that may be declared in controller-customization,
195           to define a specific way to handle constraints associated with this
196           customer.";
197       }
198       leaf resource-reserve {
199         type boolean;
200         mandatory true;
201         description
202           "indicates if resources (from local PCE topology) must be reserved
203            until further notice (cancel-resource-reserve or topology update)";
204       }
205       leaf pce-routing-metric {
206         type transportpce-common-service-path-types:pce-metric;
207       }
208       uses transportpce-common-service-path-types:service-handler-header;
209       container service-a-end {
210         uses transportpce-common-service-path-types:service-endpoint-sp;
211       }
212       container service-z-end {
213         uses transportpce-common-service-path-types:service-endpoint-sp;
214       }
215       uses org-openroadm-routing-constraints:routing-constraints;
216       uses org-openroadm-common-service-types:routing-metric;
217     }
218     output {
219       uses org-openroadm-common-service-types:configuration-response-common;
220       uses transportpce-common-service-path-types:response-parameters-sp;
221       uses gnpy;
222     }
223   }
224
225   rpc path-computation-reroute-request {
226     input {
227       container endpoints {
228         description
229           "Indicates the endpoints termination-point of the service to reroute";
230         leaf a-end-tp {
231           mandatory true;
232           type string;
233         }
234         leaf z-end-tp {
235           mandatory true;
236           type string;
237         }
238       }
239       leaf pce-routing-metric {
240         type transportpce-common-service-path-types:pce-metric;
241       }
242       uses transportpce-common-service-path-types:service-handler-header;
243       container service-a-end {
244         uses transportpce-common-service-path-types:service-endpoint-sp;
245       }
246       container service-z-end {
247         uses transportpce-common-service-path-types:service-endpoint-sp;
248       }
249       uses org-openroadm-routing-constraints:routing-constraints;
250       uses org-openroadm-common-service-types:routing-metric;
251     }
252     output {
253        uses org-openroadm-common-service-types:configuration-response-common;
254     }
255   }
256
257   rpc cancel-resource-reserve {
258     input {
259       leaf service-name {
260         type string;
261         mandatory true;
262       }
263       uses transportpce-common-service-path-types:service-handler-header;
264     }
265     output {
266       uses org-openroadm-common-service-types:configuration-response-common;
267     }
268   }
269
270   notification service-path-rpc-result {
271     description
272       "This Notification indicates result of  service RPC";
273     leaf notification-type {
274       type transportpce-common-service-path-types:service-path-notification-types;
275     }
276     container path-description {
277       uses transportpce-pathDescription:path-description;
278     }
279     uses transportpce-common-service-path-types:rpc-response-status-ex;
280     uses org-openroadm-common-service-types:service-notification-result;
281     uses org-openroadm-common-service-types:routing-metric;
282   }
283
284   container path-description-list {
285     description
286       "List of pathDescription. Can only be created, deleted, modified,
287        etc. using special RPCs.";
288     list pathDescriptions {
289       key "path-name";
290       uses stubpce-path-description;
291     }
292   }
293
294   container spectrum-assignment {
295     description
296       "Spectrum assignment management using index steps and flexgrid property";
297     leaf begin-index {
298       type uint16;
299       mandatory true;
300       description
301         "Begin index of spectrum assignment";
302     }
303     leaf stop-index {
304       type uint16;
305       mandatory true;
306       description
307         "End index of spectrum assignment";
308     }
309     leaf flex-grid {
310       type boolean;
311       mandatory true;
312       description
313         "Set it to true for flexgrid, false otherwise";
314     }
315   }
316 }