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