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