Fix pylint issue in pce functional tests
[transportpce.git] / api / src / main / yang / service_path / transportpce-common-service-path-types@2020-01-28.yang
1 module transportpce-common-service-path-types {
2   namespace "http://org/transportpce/B-C-interface/service/types";
3   prefix transportpce-common-service-path-types;
4
5   import transportpce-routing-constraints {
6     prefix transportpce-routing-constraints;
7   }
8   import transportpce-pathDescription {
9     prefix transportpce-pathDescription;
10   }
11   import org-openroadm-otn-common-types {
12     prefix org-openroadm-otn-common-types;
13   }
14   import org-openroadm-resource-types {
15     prefix org-openroadm-resource-types;
16     revision-date 2018-11-30;
17   }
18   import org-openroadm-common-service-types {
19     prefix org-openroadm-common-service-types;
20   }
21   import org-openroadm-service-format {
22     prefix org-openroadm-service-format;
23     revision-date 2019-05-31;
24   }
25
26   organization
27     "transportPCE";
28   contact
29     "transportPCE committers - ODL";
30   description
31     "YANG definitions of B & C interfaces (transportPCE). Adapted from service definition (openroadm)
32      Copyright ©  2017 Orange, Inc. and others.  All rights reserved.
33
34      openroadm copyright:
35       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
36       AT&T Intellectual Property.  All other rights reserved.
37
38       Redistribution and use in source and binary forms, with or without modification,
39       are permitted provided that the following conditions are met:
40
41       * Redistributions of source code must retain the above copyright notice, this
42         list of conditions and the following disclaimer.
43       * Redistributions in binary form must reproduce the above copyright notice,
44         this list of conditions and the following disclaimer in the documentation and/or
45         other materials provided with the distribution.
46       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
47         contributors may be used to endorse or promote products derived from this software
48         without specific prior written permission.
49
50       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
51       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
52       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
54       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
55       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
56       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
57       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
58       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
59       POSSIBILITY OF SUCH DAMAGE";
60
61   revision 2020-01-28 {
62     description
63       "Version 1.7";
64     // General consolidation to handle OTN and ONAP MDONS use case
65   }
66   revision 2019-10-09 {
67     description
68       "Version 1.6.1";
69   }
70   revision 2017-10-16 {
71     description
72       "Version 1.6";
73   }
74   revision 2017-04-26 {
75     description
76       "Version 1.5";
77   }
78
79   typedef service-path-notification-types {
80     type enumeration {
81       enum path-computation-request {
82         value 1;
83       }
84       enum cancel-resource-reserve {
85         value 2;
86       }
87       enum service-implementation-request {
88         value 3;
89       }
90       enum service-delete {
91         value 4;
92       }
93     }
94   }
95
96   typedef rpc-status-ex {
97     type enumeration {
98       enum Successful {
99         value 1;
100       }
101       enum Failed {
102         value 2;
103       }
104       enum Pending {
105         value 3;
106       }
107     }
108     description
109       "extended status of RPC ";
110   }
111
112   grouping rpc-response-status-ex {
113     leaf status {
114       type rpc-status-ex;
115       mandatory true;
116       description
117         "Successful, Failed or Pending";
118     }
119     leaf status-message {
120       type string;
121       description
122         "Gives a more detailed reason for failure";
123     }
124   }
125
126   grouping response-parameters-sp {
127     container response-parameters {
128       uses transportpce-routing-constraints:routing-constraints-sp;
129       container path-description {
130         uses transportpce-pathDescription:path-description;
131       }
132     }
133   }
134
135   grouping service-endpoint-sp {
136     leaf service-format {
137       type org-openroadm-service-format:service-format;
138       mandatory true;
139       description
140         "Format of the requested service: Ethernet, OTU, etc.";
141     }
142     leaf service-rate {
143       when "../service-format!='OMS'" {
144         description
145           "service rate not applicable when service format is roadmline";
146       }
147       type uint32;
148       mandatory true;
149       description
150         "Rate of the requested service in GBps";
151     }
152     leaf otu-service-rate {
153       when "../service-format='OTU'" {
154         description
155           "service rate not applicable when service format is OTU";
156       }
157       type identityref {
158         base org-openroadm-otn-common-types:otu-rate-identity;
159       }
160       mandatory false;
161       description
162         "OTU Rate of the requested service";
163     }
164     leaf odu-service-rate {
165       when "../service-format='ODU'" {
166         description
167           "service rate not applicable when service format is ODU";
168       }
169       type identityref {
170         base org-openroadm-otn-common-types:odu-rate-identity;
171       }
172       mandatory false;
173       description
174         "OTU Rate of the requested service";
175     }
176     leaf other-service-format-and-rate {
177       type string;
178       description
179         "This value encodes both the service format and the rate supported.
180          This field should not be specified when service format != other.";
181     }
182     leaf clli {
183       type string;
184       mandatory true;
185       description
186         "CLLI";
187     }
188     leaf node-id {
189       type string;
190     }
191     container tx-direction {
192       leaf logical-connection-point {
193         type string;
194         description
195           "PCE works on topology --> change from port (device) to node-id+logical-connection-point
196            (topology) assuming Portmapping will be used by both the Renderer
197            and the SH to make the conversion from device to topology";
198       }
199       uses org-openroadm-common-service-types:service-port;
200       //     uses service-lgx;
201       //     uses service-tail;
202     }
203     container rx-direction {
204       leaf logical-connection-point {
205         type string;
206         description
207           "PCE works on topology --> change from port (device) to node-id+logical-connection-point
208            (topology) assuming Portmapping will be used by both the Renderer
209            and the SH to make the conversion from device to topology";
210       }
211       uses org-openroadm-common-service-types:service-port;
212       //     uses service-lgx;
213       //     uses service-tail;
214     }
215   }
216
217   grouping service-handler-header {
218     container service-handler-header {
219       leaf request-id {
220         type string;
221         mandatory true;
222       }
223     }
224   }
225
226   grouping service-path {
227     leaf service-path-name {
228       type string;
229       mandatory true;
230       description
231         "Identifier for the service-path to be calculated by the PCE";
232     }
233     uses service-handler-header;
234     container service-a-end {
235       uses service-endpoint-sp;
236     }
237     container service-z-end {
238       uses service-endpoint-sp;
239     }
240     uses transportpce-routing-constraints:routing-constraints-sp;
241     leaf latency {
242       type uint32;
243       description
244         "Latency on service";
245     }
246     leaf-list fiber-span-srlgs {
247       type string;
248       description
249         "Shared risk link group identifiers";
250     }
251     list equipment-srgs {
252       key "srg-number";
253       uses org-openroadm-resource-types:srg-number;
254     }
255     leaf-list supporting-service-name {
256       type string;
257       description
258         "The service name that this runs over top. If connection-type is service, then this is the related
259          connection-type = infrastructure service, for example.";
260     }
261     container path-description {
262       uses transportpce-pathDescription:path-description;
263     }
264   }
265 }