Introduce s/d ApiInfo in otn-service-path
[transportpce.git] / api / src / main / yang / service_path / transportpce-device-renderer@2021-10-04.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 2021-10-04 {
24     description
25       "Add source and destinatin API info in service-path";
26   }
27   revision 2021-06-18 {
28     description
29       "Replace service-type by service-format.
30        Change service-rate type";
31   }
32   revision 2020-01-28 {
33       description
34         "Complement rpc otn-service-path";
35   }
36   revision 2019-12-12 {
37     description
38       "Add rpc otn-service-path";
39   }
40   revision 2017-02-28 {
41     description
42       "Initial revision of renderer model version 1.5";
43   }
44
45   typedef action {
46     type enumeration {
47       enum create {
48         value 1;
49       }
50       enum delete {
51         value 2;
52       }
53     }
54   }
55
56   grouping az-api-info {
57     container a-end-api-info {
58       leaf node-id {
59         type string;
60       }
61       uses org-transportpce-common-types:api-info;
62     }
63     container z-end-api-info {
64       leaf node-id {
65         type string;
66       }
67       uses org-transportpce-common-types:api-info;
68     }
69   }
70
71   rpc service-path {
72     input {
73       leaf modulation-format {
74         type string;
75       }
76       leaf operation {
77         type action;
78       }
79       uses az-api-info;
80       uses org-transportpce-common-types:optical-renderer-input;
81     }
82     output {
83       leaf success {
84         type boolean;
85       }
86       leaf result {
87         type string;
88       }
89       uses org-transportpce-common-types:node-interfaces;
90       uses org-transportpce-common-types:link-tp;
91     }
92   }
93
94   rpc otn-service-path {
95     input {
96       leaf service-rate {
97         type uint32;
98       }
99       leaf service-format {
100         type string;
101       }
102       leaf ethernet-encoding {
103         type string;
104       }
105       leaf trib-slot {
106         type int16;
107       }
108       leaf-list complex-trib-slots {
109         type int16;
110         description
111           "Used in case trib-slot allocation policy of an equipment would
112            not correspond to contiguous trib-slots";
113       }
114       leaf-list opucn-trib-slots {
115         type org-openroadm-otn-common-types:opucn-trib-slot-def;
116       }
117       leaf trib-port-number {
118         type int16;
119       }
120       leaf operation {
121         type action;
122       }
123       uses az-api-info;
124       uses org-transportpce-common-types:otn-renderer-input;
125     }
126     output {
127       leaf success {
128         type boolean;
129       }
130       leaf result {
131         type string;
132       }
133       uses org-transportpce-common-types:node-interfaces;
134       uses org-transportpce-common-types:link-tp;
135     }
136   }
137
138   rpc renderer-rollback {
139     input {
140       uses org-transportpce-common-types:node-interfaces;
141     }
142     output {
143       leaf success {
144         type boolean;
145       }
146       list failed-to-rollback {
147         key "node-id";
148         leaf node-id {
149           type string;
150         }
151         leaf-list interface {
152           type string;
153         }
154       }
155     }
156   }
157
158   rpc create-ots-oms {
159     input {
160       leaf node-id {
161         type string;
162       }
163       leaf logical-connection-point {
164         type string;
165       }
166     }
167     output {
168       leaf success {
169         type boolean;
170       }
171       leaf result {
172         type string;
173       }
174     }
175   }
176 }