Clean up API YANG models with the help of pyang
[transportpce.git] / api / src / main / yang / service_path / transportpce-device-renderer@2020-01-28.yang
1 module transportpce-device-renderer {
2   namespace "http://org/opendaylight/transportpce/device/renderer";
3   prefix org-opendaylight-transportpce-device-renderer;
4
5   import transportpce-common-types {
6     prefix org-transportpce-common-types;
7   }
8   import org-openroadm-otn-common-types {
9     prefix org-openroadm-otn-common-types;
10     revision-date 2018-11-30;
11   }
12
13   organization
14     "transportPCE";
15   contact
16     "transportPCE committers - ODL";
17   description
18     "YANG definitions of RPCs supported by renderer.
19      Copyright (c) 2017 AT&T and others.  All rights reserved.
20      authors: Dhruv Bhardwaj ( db929a@att.com )
21               Shweta Vachhani ( sv111y@att.com )";
22
23   revision 2020-01-28 {
24     description
25       "Complement rpc otn-service-path";
26   }
27   revision 2019-12-12 {
28     description
29       "Add rpc otn-service-path";
30   }
31   revision 2017-02-28 {
32     description
33       "Initial revision of renderer model version 1.5";
34   }
35
36   rpc service-path {
37     input {
38       leaf modulation-format {
39         type string;
40       }
41       leaf operation {
42         type enumeration {
43           enum create {
44             value 1;
45           }
46           enum delete {
47             value 2;
48           }
49         }
50       }
51       uses org-transportpce-common-types:olm-renderer-input;
52     }
53     output {
54       leaf success {
55         type boolean;
56       }
57       leaf result {
58         type string;
59       }
60       uses org-transportpce-common-types:node-interfaces;
61     }
62   }
63
64   rpc otn-service-path {
65     input {
66       leaf service-rate {
67         type string;
68       }
69       leaf service-type {
70         type string;
71       }
72       leaf ethernet-encoding {
73         type string;
74       }
75       leaf trib-slot {
76         type int16;
77       }
78       leaf-list complex-trib-slots {
79         type int16;
80         description
81           "Used in case trib-slot allocation policy of an equipment would
82            not correspond to contiguous trib-slots";
83       }
84       leaf-list opucn-trib-slots {
85         type org-openroadm-otn-common-types:opucn-trib-slot-def;
86       }
87       leaf trib-port-number {
88         type int16;
89       }
90       leaf operation {
91         type enumeration {
92           enum create {
93             value 1;
94           }
95           enum delete {
96             value 2;
97           }
98         }
99       }
100       container a-end-api-info {
101         leaf node-id {
102           type string;
103         }
104         uses org-transportpce-common-types:api-info;
105       }
106       container z-end-api-info {
107         leaf node-id {
108           type string;
109         }
110         uses org-transportpce-common-types:api-info;
111       }
112       uses org-transportpce-common-types:otn-renderer-input;
113     }
114     output {
115       leaf success {
116         type boolean;
117       }
118       leaf result {
119         type string;
120       }
121       uses org-transportpce-common-types:node-interfaces;
122     }
123   }
124
125   rpc renderer-rollback {
126     input {
127       uses org-transportpce-common-types:node-interfaces;
128     }
129     output {
130       leaf success {
131         type boolean;
132       }
133       list failed-to-rollback {
134         key "node-id";
135         leaf node-id {
136           type string;
137         }
138         leaf-list interface {
139           type string;
140         }
141       }
142     }
143   }
144
145   rpc create-ots-oms {
146     input {
147       leaf node-id {
148         type string;
149       }
150       leaf logical-connection-point {
151         type string;
152       }
153     }
154     output {
155       leaf success {
156         type boolean;
157       }
158       leaf result {
159         type string;
160       }
161     }
162   }
163 }