2140a27463cb10ed54c58aa8203ad307925cb191
[transportpce.git] / api / src / main / yang / service_path / transportpce-renderer@2021-09-15.yang
1 module transportpce-renderer {
2   namespace "http://org/opendaylight/transportpce/renderer";
3   prefix org-opendaylight-transportpce-renderer;
4
5   import org-openroadm-common-service-types {
6     prefix org-openroadm-common-service-types;
7   }
8   import transportpce-common-service-path-types {
9     prefix transportpce-common-service-path-types;
10   }
11   import org-openroadm-topology {
12     prefix org-openroadm-topology;
13   }
14   import transportpce-pathDescription {
15     prefix transportpce-pathDescription;
16   }
17   import transportpce-common-types {
18       prefix org-transportpce-common-types;
19     }
20
21   organization
22     "transportPCE";
23   contact
24     "transportPCE committers - ODL";
25   description
26     "YANG definitions of C interface (transportPCE). Adapted from service definition (openroadm)
27      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
28
29      openroadm copyright:
30       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
31       AT&T Intellectual Property.  All other rights reserved.
32
33       Redistribution and use in source and binary forms, with or without modification,
34       are permitted provided that the following conditions are met:
35
36       * Redistributions of source code must retain the above copyright notice, this
37         list of conditions and the following disclaimer.
38       * Redistributions in binary form must reproduce the above copyright notice,
39         this list of conditions and the following disclaimer in the documentation and/or
40         other materials provided with the distribution.
41       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
42         contributors may be used to endorse or promote products derived from this software
43         without specific prior written permission.
44
45       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
46       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
48       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
49       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
50       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
51       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
52       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54       POSSIBILITY OF SUCH DAMAGE";
55
56   revision 2021-09-15 {
57       description
58         "Version 1.6.4.
59          Add list of link-id to the notification";
60     }
61   revision 2021-06-18 {
62       description
63         "Version 1.6.3.
64          Add optical-renderer-nodes to the notification";
65     }
66   revision 2020-11-25 {
67     description
68       "Version 1.6.2";
69   }
70   revision 2020-05-20 {
71     description
72       "Version 1.6.1";
73   }
74   revision 2017-10-17 {
75     description
76       "Version 1.6";
77   }
78   revision 2017-02-28 {
79     description
80       "Initial revision of renderer model version 1.5";
81   }
82
83   grouping link-for-notif {
84     description
85       "In most of the cases, only 2 link-termination-points exists.
86        It reveals that the service is supported by a single otn-link
87        to configure. Its properties can be easily transmited by this way.";
88     container a-termination {
89       leaf node-id {
90         type string;
91       }
92       leaf tp-id {
93         type string;
94       }
95     }
96     container z-termination {
97       leaf node-id {
98         type string;
99       }
100       leaf tp-id {
101         type string;
102       }
103     }
104   }
105
106   rpc service-implementation-request {
107     input {
108       leaf service-name {
109         type string;
110         mandatory true;
111         description
112           "Identifier for the service to be created in
113            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.";
114       }
115       leaf connection-type {
116         type org-openroadm-common-service-types:connection-type;
117       }
118       uses transportpce-common-service-path-types:service-handler-header;
119       container service-a-end {
120         uses transportpce-common-service-path-types:service-endpoint-sp;
121       }
122       container service-z-end {
123         uses transportpce-common-service-path-types:service-endpoint-sp;
124       }
125       container path-description {
126         uses transportpce-pathDescription:path-description;
127       }
128     }
129     output {
130       uses org-openroadm-common-service-types:configuration-response-common;
131     }
132   }
133
134   rpc service-delete {
135     input {
136       leaf service-name {
137         type string;
138         mandatory true;
139         description
140           "Identifier for the service to be created in
141            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.";
142       }
143       uses transportpce-common-service-path-types:service-handler-header;
144     }
145     output {
146       uses org-openroadm-common-service-types:configuration-response-common;
147     }
148   }
149
150   notification renderer-rpc-result-sp {
151     description
152       "This Notification indicates result of renderer RPC and provides the topology";
153     leaf notification-type {
154       type transportpce-common-service-path-types:service-path-notification-types;
155     }
156     container path-topology {
157       uses org-openroadm-topology:topology;
158     }
159     uses transportpce-pathDescription:path-description;
160     uses transportpce-common-service-path-types:rpc-response-status-ex;
161     uses org-openroadm-common-service-types:service-notification-result;
162     container link {
163       uses link-for-notif;
164     }
165     leaf-list link-id {
166       type string;
167       description
168         "when more than 2 link-termination-points exists,
169          it reveals that the service is supported by multiple
170          links (typically, OTU4). In such a case, it is more appropriated
171          to transmit the list of supported links with their link-id";
172     }
173     leaf service-type {
174         type string;
175     }
176   }
177 }