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