Clean up API YANG models with the help of pyang
[transportpce.git] / api / src / main / yang / service_path / transportpce-renderer@2020-05-20.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
20   organization
21     "transportPCE";
22   contact
23     "transportPCE committers - ODL";
24   description
25     "YANG definitions of C interface (transportPCE). Adapted from service definition (openroadm)
26      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
27
28      openroadm copyright:
29       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
30       AT&T Intellectual Property.  All other rights reserved.
31
32       Redistribution and use in source and binary forms, with or without modification,
33       are permitted provided that the following conditions are met:
34
35       * Redistributions of source code must retain the above copyright notice, this
36         list of conditions and the following disclaimer.
37       * Redistributions in binary form must reproduce the above copyright notice,
38         this list of conditions and the following disclaimer in the documentation and/or
39         other materials provided with the distribution.
40       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
41         contributors may be used to endorse or promote products derived from this software
42         without specific prior written permission.
43
44       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
45       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
48       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
50       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53       POSSIBILITY OF SUCH DAMAGE";
54
55   revision 2020-05-20 {
56     description
57       "Version 1.6.1";
58   }
59
60   revision 2017-10-17 {
61     description
62       "Version 1.6";
63   }
64   revision 2017-02-28 {
65     description
66       "Initial revision of renderer model version 1.5";
67   }
68
69   rpc service-implementation-request {
70     input {
71       leaf service-name {
72         type string;
73         mandatory true;
74         description
75           "Identifier for the service to be created in
76            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.";
77       }
78       leaf connection-type {
79         type org-openroadm-common-service-types:connection-type;
80       }
81       uses transportpce-common-service-path-types:service-handler-header;
82       container service-a-end {
83         uses transportpce-common-service-path-types:service-endpoint-sp;
84       }
85       container service-z-end {
86         uses transportpce-common-service-path-types:service-endpoint-sp;
87       }
88       container path-description {
89         uses transportpce-pathDescription:path-description;
90       }
91     }
92     output {
93       uses org-openroadm-common-service-types:configuration-response-common;
94     }
95   }
96
97   rpc service-delete {
98     input {
99       leaf service-name {
100         type string;
101         mandatory true;
102         description
103           "Identifier for the service to be created in
104            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.";
105       }
106       uses transportpce-common-service-path-types:service-handler-header;
107     }
108     output {
109       uses org-openroadm-common-service-types:configuration-response-common;
110     }
111   }
112
113   notification service-rpc-result-sp {
114     description
115       "This Notification indicates result of  service RPC and provides the topology";
116     leaf notification-type {
117       type transportpce-common-service-path-types:service-path-notification-types;
118     }
119     container path-topology {
120       uses org-openroadm-topology:topology;
121     }
122     uses transportpce-common-service-path-types:rpc-response-status-ex;
123     uses org-openroadm-common-service-types:service-notification-result;
124   }
125 }