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