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