Add allure-pytest tox profiles for local use
[transportpce.git] / api / src / main / yang / service_path / transportpce-pce@2022-06-15.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 2022-06-15 {
58     description
59       "change fraction digits from 2 to 6 for accumulative-value leaf, from 2 to 6 to be compliant with Gnpy";
60   }
61   revision 2022-01-18 {
62     description
63       "Add in path-computation-request input the pce-routing-metric.
64        Replace transportpce-routing-constraints by org-openroadm-routing-constraints";
65   }
66   revision 2021-07-01 {
67     description
68       "Version 1.8";
69   }
70   revision 2020-01-28 {
71     description
72       "Version 1.7";
73   }
74   revision 2019-06-24 {
75     description
76       "Version 1.6.1";
77   }
78   revision 2017-10-17 {
79     description
80       "Version 1.6";
81   }
82   revision 2017-04-26 {
83     description
84       "Version 1.5";
85   }
86
87   grouping stubpce-path-description {
88     leaf path-name {
89       type string;
90       mandatory true;
91       description
92         "Identifier for the pathDescription to be created in the ROADM
93          network, e.g., CLFI, CLCI, etc.";
94     }
95     uses transportpce-pathDescription:path-description;
96   }
97
98   grouping gnpy {
99     list gnpy-response {
100       key "path-dir";
101       config false;
102       description
103         "GNPy response";
104       leaf path-dir {
105         type string;
106         description
107           "A-to-Z or Z-to-A";
108       }
109       leaf feasibility {
110         type boolean;
111         description
112           "true : feasible path / False : non-feasible.";
113       }
114       choice response-type {
115         config false;
116         description
117           "response-type";
118         case no-path-case {
119           uses gnpypc:no-path-info;
120         }
121         case path-case {
122           description
123             "Path computation service.";
124           uses path-performance;
125         }
126       }
127     }
128   }
129
130   grouping path-performance {
131     description
132       "TE generic path properties grouping";
133     container path-properties {
134       config false;
135       description
136         "The TE path properties";
137       list path-metric {
138         key "metric-type";
139         description
140           "TE path metric type";
141         leaf metric-type {
142           type identityref {
143             base gnpypc:path-metric-type;
144           }
145         }
146         leaf accumulative-value {
147           type decimal64 {
148             fraction-digits 6;
149           }
150         }
151       }
152     }
153   }
154
155   rpc path-computation-request {
156     input {
157       leaf service-name {
158         type string;
159         mandatory true;
160         description
161           "Identifier for the service to be created in the ROADM network,
162            e.g., CLFI, CLCI, etc. This is reported against the service, but
163            may not get reflected in the service in the network.";
164       }
165       leaf resource-reserve {
166         type boolean;
167         mandatory true;
168         description
169           "indicates if resources (from local PCE topology) must be reserved
170            until further notice (cancel-resource-reserve or topology update)";
171       }
172       leaf pce-routing-metric {
173         type transportpce-common-service-path-types:pce-metric;
174       }
175       uses transportpce-common-service-path-types:service-handler-header;
176       container service-a-end {
177         uses transportpce-common-service-path-types:service-endpoint-sp;
178       }
179       container service-z-end {
180         uses transportpce-common-service-path-types:service-endpoint-sp;
181       }
182       uses org-openroadm-routing-constraints:routing-constraints;
183       uses org-openroadm-common-service-types:routing-metric;
184     }
185     output {
186       uses org-openroadm-common-service-types:configuration-response-common;
187       uses transportpce-common-service-path-types:response-parameters-sp;
188       uses gnpy;
189     }
190   }
191
192   rpc cancel-resource-reserve {
193     input {
194       leaf service-name {
195         type string;
196         mandatory true;
197       }
198       uses transportpce-common-service-path-types:service-handler-header;
199     }
200     output {
201       uses org-openroadm-common-service-types:configuration-response-common;
202     }
203   }
204
205   notification service-path-rpc-result {
206     description
207       "This Notification indicates result of  service RPC";
208     leaf notification-type {
209       type transportpce-common-service-path-types:service-path-notification-types;
210     }
211     container path-description {
212       uses transportpce-pathDescription:path-description;
213     }
214     uses transportpce-common-service-path-types:rpc-response-status-ex;
215     uses org-openroadm-common-service-types:service-notification-result;
216     uses org-openroadm-common-service-types:routing-metric;
217   }
218
219   container path-description-list {
220     description
221       "List of pathDescription. Can only be created, deleted, modified,
222        etc. using special RPCs.";
223     list pathDescriptions {
224       key "path-name";
225       uses stubpce-path-description;
226     }
227   }
228
229   container spectrum-assignment {
230     description
231       "Spectrum assignment management using index steps and flexgrid property";
232     leaf begin-index {
233       type uint16;
234       mandatory true;
235       description
236         "Begin index of spectrum assignment";
237     }
238     leaf stop-index {
239       type uint16;
240       mandatory true;
241       description
242         "End index of spectrum assignment";
243     }
244     leaf flex-grid {
245       type boolean;
246       mandatory true;
247       description
248         "Set it to true for flexgrid, false otherwise";
249     }
250   }
251 }