Refactor: update transportpce yang models
[transportpce.git] / api / src / main / yang / service_path / transportpce-renderer@2021-06-18.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-06-18 {
59     description
60       "Version 1.6.3.
61        Add optical-renderer-nodes to the notification";
62   }
63   revision 2020-11-25 {
64     description
65       "Version 1.6.2";
66   }
67   revision 2020-05-20 {
68     description
69       "Version 1.6.1";
70   }
71   revision 2017-10-17 {
72     description
73       "Version 1.6";
74   }
75   revision 2017-02-28 {
76     description
77       "Initial revision of renderer model version 1.5";
78   }
79
80   grouping link-for-notif {
81     container a-termination {
82       leaf node-id {
83         type string;
84       }
85       leaf tp-id {
86         type string;
87       }
88     }
89     container z-termination {
90       leaf node-id {
91         type string;
92       }
93       leaf tp-id {
94         type string;
95       }
96     }
97   }
98
99   rpc service-implementation-request {
100     input {
101       leaf service-name {
102         type string;
103         mandatory true;
104         description
105           "Identifier for the service to be created in
106            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.";
107       }
108       leaf connection-type {
109         type org-openroadm-common-service-types:connection-type;
110       }
111       uses transportpce-common-service-path-types:service-handler-header;
112       container service-a-end {
113         uses transportpce-common-service-path-types:service-endpoint-sp;
114       }
115       container service-z-end {
116         uses transportpce-common-service-path-types:service-endpoint-sp;
117       }
118       container path-description {
119         uses transportpce-pathDescription:path-description;
120       }
121     }
122     output {
123       uses org-openroadm-common-service-types:configuration-response-common;
124     }
125   }
126
127   rpc service-delete {
128     input {
129       leaf service-name {
130         type string;
131         mandatory true;
132         description
133           "Identifier for the service to be created in
134            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.";
135       }
136       uses transportpce-common-service-path-types:service-handler-header;
137     }
138     output {
139       uses org-openroadm-common-service-types:configuration-response-common;
140     }
141   }
142
143   notification renderer-rpc-result-sp {
144     description
145       "This Notification indicates result of renderer RPC and provides the topology";
146     leaf notification-type {
147       type transportpce-common-service-path-types:service-path-notification-types;
148     }
149     container path-topology {
150       uses org-openroadm-topology:topology;
151     }
152     uses transportpce-pathDescription:path-description;
153     uses transportpce-common-service-path-types:rpc-response-status-ex;
154     uses org-openroadm-common-service-types:service-notification-result;
155     container link {
156       uses link-for-notif;
157     }
158     leaf service-type {
159         type string;
160     }
161   }
162 }