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