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