upgrade models to OpenROADM service 5.1.0
[transportpce.git] / api / src / main / yang / service_path / transportpce-pce@2019-06-24.yang
1 module transportpce-pce {
2     namespace "http://org/opendaylight/transportpce/pce";
3     prefix "org-opendaylight-transportpce-pce";
4
5   import ietf-yang-types {
6     prefix yang;
7   }
8   import transportpce-routing-constraints {
9     prefix transportpce-routing-constraints;
10     revision-date 2017-10-17;
11   }
12   import org-openroadm-common-service-types {
13     prefix org-openroadm-common-service-types;
14   }
15   import transportpce-common-service-path-types {
16     prefix transportpce-common-service-path-types;
17   }
18   import transportpce-pathDescription {
19     prefix transportpce-pathDescription;
20     revision-date 2017-10-17;
21   }
22   import gnpy-path-computation-simplified {
23     prefix "gnpypc";
24     revision-date 2019-05-02;
25   }
26
27   organization
28     "transportPCE";
29   contact
30     "transportPCE committers - ODL";
31   description
32     "YANG definitions of B interface (transportPCE). Adapted from service definition (openroadm)
33      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
34
35      openroadm copyright:
36       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
37       AT&T Intellectual Property.  All other rights reserved.
38
39       Redistribution and use in source and binary forms, with or without modification,
40       are permitted provided that the following conditions are met:
41
42       * Redistributions of source code must retain the above copyright notice, this
43         list of conditions and the following disclaimer.
44       * Redistributions in binary form must reproduce the above copyright notice,
45         this list of conditions and the following disclaimer in the documentation and/or
46         other materials provided with the distribution.
47       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
48         contributors may be used to endorse or promote products derived from this software
49         without specific prior written permission.
50
51       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
52       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
55       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
57       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
59       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60       POSSIBILITY OF SUCH DAMAGE";
61
62   revision 2017-04-26 {
63       description
64         "Version 1.5";
65   }
66
67   revision 2017-10-17 {
68     description
69       "Version 1.6";
70   }
71
72   revision 2019-06-24 {
73     description
74       "Version 1.6.1";
75   }
76
77   rpc path-computation-request {
78     input {
79       leaf service-name {
80         type string;
81         description
82           "Identifier for the service to be created in
83            the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
84         mandatory true;
85       }
86       leaf resource-reserve {
87            type boolean;
88            description
89                 "indicates if resources (from local PCE topology) must be reserved until further notice (cancel-resource-reserve or topology update)";
90            mandatory true;
91       }
92       uses transportpce-common-service-path-types:service-handler-header;
93       container service-a-end {
94         uses transportpce-common-service-path-types:service-endpoint-sp;
95       }
96       container service-z-end {
97         uses transportpce-common-service-path-types:service-endpoint-sp;
98       }
99       uses transportpce-routing-constraints:routing-constraints-sp;
100     }
101     output {
102       uses org-openroadm-common-service-types:configuration-response-common;
103       uses transportpce-common-service-path-types:response-parameters-sp;
104       uses gnpy;
105     }
106   }
107
108   rpc cancel-resource-reserve {
109     input {
110       leaf service-name {
111         type string;
112         mandatory true;
113       }
114       uses transportpce-common-service-path-types:service-handler-header;
115     }
116     output {
117       uses org-openroadm-common-service-types:configuration-response-common;
118     }
119   }
120
121 notification service-path-rpc-result {
122     description
123       "This Notification indicates result of  service RPC";
124     leaf notification-type {
125       type transportpce-common-service-path-types:service-path-notification-types;
126     }
127     container path-description {
128            uses transportpce-pathDescription:path-description;
129     }
130     uses transportpce-common-service-path-types:rpc-response-status-ex;
131     uses org-openroadm-common-service-types:service-notification-result;
132   }
133
134   grouping stubpce-path-description {
135       leaf path-name {
136           type string;
137           description
138             "Identifier for the pathDescription to be created in
139              the ROADM network, e.g., CLFI, CLCI, etc.";
140           mandatory true;
141         }
142       uses transportpce-pathDescription:path-description;
143   }
144
145   container path-description-list {
146     description
147       "List of pathDescription. Can only be created, deleted, modified, etc. using special RPCs.";
148     list pathDescriptions {
149       key "path-name";
150       uses stubpce-path-description;
151     }
152   }
153
154   grouping gnpy {
155     list gnpy-response {
156       key path-dir;
157       config false;
158       description "GNPy response";
159       leaf path-dir{
160         type string;
161         description "A-to-Z or Z-to-A";
162       }
163       leaf feasibility {
164         type boolean;
165         description
166           "true : feasible path / False : non-feasible.";
167       }
168       choice response-type {
169         config false;
170         description "response-type";
171         case no-path-case {
172           uses gnpypc:no-path-info;
173         }
174         case path-case {
175           uses path-performance;
176           description "Path computation service.";
177         }
178       }
179     }
180   }
181
182   grouping path-performance {
183     description "TE generic path properties grouping";
184     container path-properties {
185       config false;
186       description "The TE path properties";
187       list path-metric {
188         key metric-type;
189         description "TE path metric type";
190         leaf metric-type {
191           type identityref {
192             base gnpypc:path-metric-type;
193           }
194         }
195         leaf accumulative-value {
196           type decimal64 {
197             fraction-digits 2;
198           }
199         }
200       }
201     }
202   }
203 }