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