Initial commit for ServiceHandler
[transportpce.git] / ordmodels / src / main / yang / service_path_v1.5 / transportpce-common-service-path-types.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 org-openroadm-common-types {
18     prefix org-openroadm-common-types;
19   }
20   import org-openroadm-resource-types {
21     prefix org-openroadm-resource-types;
22   }
23   import org-openroadm-common-service-types {
24     prefix org-openroadm-common-service-types;
25   }
26
27   organization
28     "transportPCE";
29   contact
30     "transportPCE committers - ODL";
31   description
32     "YANG definitions of B & C interfaces (transportPCE). Adapted from service definition (openroadm).
33      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
34
35      This model is derived from the OpenROADM service definition that includes the following notice:
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   revision 2017-04-26 {
65     description
66       "Version 1.5";
67   }
68   typedef service-path-notification-types {
69     type enumeration {
70       enum "path-computation-request" {
71         value 1;
72       }
73       enum "cancel-resource-reserve" {
74         value 2;
75       }
76       enum "service-implementation-request" {
77         value 3;
78       }
79       enum "service-delete" {
80         value 4;
81       }
82     }
83   }
84
85   typedef rpc-status-ex {
86     description
87       "extended status of RPC ";
88     type enumeration {
89       enum "Successful" {
90         value 1;
91       }
92       enum "Failed" {
93         value 2;
94       }
95       enum "Pending" {
96           value 3;
97       }
98     }
99   }
100
101   grouping rpc-response-status-ex {
102     leaf status {
103       type rpc-status-ex;
104       mandatory true;
105       description
106         "Successful, Failed or Pending";
107
108         }
109      leaf status-message {
110       type string;
111       description
112         "Gives a more detailed reason for failure";
113       }
114   }
115
116   grouping response-parameters-sp {
117     container response-parameters {
118       uses transportpce-routing-constraints:routing-constraints-sp;
119       container path-description {
120           uses transportpce-pathDescription:path-description;
121       }
122     }
123   }
124
125   grouping service-endpoint-sp {
126     leaf service-format {
127       type org-openroadm-common-service-types:service-format;
128       mandatory true;
129       description
130         "Format of the requested service: Ethernet, OTU, etc.";
131     }
132     leaf service-rate {
133       when "../service-format!='OMS'"{
134         description "service rate not applicable when service
135         format is roadmline";
136       }
137       type uint32;
138       mandatory true;
139       description
140         "Rate of the requested service in GBps";
141     }
142     leaf clli {
143       type string;
144       mandatory true;
145       description
146         "CLLI";
147     }
148     leaf node-id {
149         type string;
150     }
151     container tx-direction {
152       uses org-openroadm-common-service-types:service-port;
153  //     uses service-lgx;
154  //     uses service-tail;
155     }
156     container rx-direction {
157       uses org-openroadm-common-service-types:service-port;
158  //     uses service-lgx;
159  //     uses service-tail;
160     }
161   }
162
163   grouping service-handler-header {
164     container service-handler-header {
165       leaf request-id {
166         type string;
167         mandatory true;
168       }
169     }
170   }
171
172   grouping service-path {
173     leaf service-path-name {
174       type string;
175       description
176         "Identifier for the service-path to be calculated by
177          the PCE";
178       mandatory true;
179     }
180     uses service-handler-header;
181
182     container service-a-end {
183       uses service-endpoint-sp;
184     }
185     container service-z-end {
186       uses service-endpoint-sp;
187     }
188     uses transportpce-routing-constraints:routing-constraints-sp;
189
190     leaf latency {
191       type uint32;
192       description
193         "Latency on service";
194     }
195     leaf-list fiber-span-srlgs {
196       type string;
197       description
198         "Shared risk link group identifiers";
199     }
200     list equipment-srgs {
201       key "srg-number";
202       uses org-openroadm-resource-types:srg-number;
203     }
204     leaf-list supporting-service-name {
205       description
206         "The service name that this runs over top. If connection-type is service, then this is the related
207          connection-type = infrastructure service, for example.";
208       type string;
209     }
210     container path-description {
211       uses transportpce-pathDescription:path-description;
212     }
213   }
214
215
216
217 }