blob: 0a37cf332d733e95ef662079d57655d1acd0ab7c [file] [log] [blame]
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -05001
2module ietf-device {
3
4
5 namespace "urn:opencord:params:xml:ns:voltha:ietf-device";
6 prefix device;
7
8 import ietf-openflow_13 { prefix openflow_13 ; }
9 import ietf-common { prefix common ; }
10 import ietf-any { prefix any ; }
11
12 organization "CORD";
13 contact
14 " Any name";
15
16 description
17 "";
18
19 revision "2016-11-15" {
20 description "Initial revision.";
21 reference "reference";
22 }
23
24
25 grouping DeviceType {
26 description
27 "A Device Type";
28 leaf id {
29 type string;
30 description
31 "Unique name for the device type";
32 }
33
34 leaf adapter {
35 type string;
36 description
37 "Name of the adapter that handles device type";
38 }
39
40 leaf accepts_bulk_flow_update {
41 type boolean;
42 description
43 "Capabilitities";
44 }
45
46 leaf accepts_add_remove_flow_updates {
47 type boolean;
48 description
49 "";
50 }
51
52 }
53
54 grouping DeviceTypes {
55 description
56 "A plurality of device types";
57 list items {
58 key "id";
59 uses DeviceType;
60
61 description
62 "";
63 }
64
65 }
66
67 grouping Port {
68 description
69 "";
70 leaf port_no {
71 type uint32;
72 description
73 "Device-unique port number";
74 }
75
76 leaf label {
77 type string;
78 description
79 "Arbitrary port label";
80 }
81
82 leaf type {
83 type PortType;
84 description
85 "Type of port";
86 }
87
88 leaf admin_state {
89 type common:AdminState;
90
91 description
92 "";
93 }
94
95 leaf oper_status {
96 type common:OperStatus;
97
98 description
99 "";
100 }
101
102 leaf device_id {
103 type string;
104 description
105 "Unique .id of device that owns this port";
106 }
107
108
109 typedef PortType {
110 type enumeration {
111 enum UNKNOWN {
112 description "";
113 }
114 enum ETHERNET_NNI {
115 description "";
116 }
117 enum ETHERNET_UNI {
118 description "";
119 }
120 enum PON_OLT {
121 description "";
122 }
123 enum PON_ONU {
124 description "";
125 }
126 }
127 description
128 "";
129 }
130
131 grouping PeerPort {
132 description
133 "";
134 leaf device_id {
135 type string;
136 description
137 "";
138 }
139
140 leaf port_no {
141 type uint32;
142 description
143 "";
144 }
145
146 }
147
148 }
149
150 grouping Ports {
151 description
152 "";
153 list items {
154 key "port_no";
155 uses Port;
156
157 description
158 "";
159 }
160
161 }
162
163 grouping Device {
164 description
165 "A Physical Device instance";
166 leaf id {
167 type string;
168 description
169 "Voltha's device identifier";
170 }
171
172 leaf type {
173 type string;
174 description
175 "Device type, refers to one of the registered device types";
176 }
177
178 leaf root {
179 type boolean;
180 description
181 "Is this device a root device. Each logical switch has one root
182 device that is associated with the logical flow switch.";
183 }
184
185 leaf parent_id {
186 type string;
187 description
188 "Parent device id, in the device tree (for a root device, the parent_id
189 is the logical_device.id)";
190 }
191
192 leaf parent_port_no {
193 type uint32;
194 description
195 "";
196 }
197
198 leaf vendor {
199 type string;
200 description
201 "Vendor, version, serial number, etc.";
202 }
203
204 leaf model {
205 type string;
206 description
207 "";
208 }
209
210 leaf hardware_version {
211 type string;
212 description
213 "";
214 }
215
216 leaf firmware_version {
217 type string;
218 description
219 "";
220 }
221
222 leaf software_version {
223 type string;
224 description
225 "";
226 }
227
228 leaf serial_number {
229 type string;
230 description
231 "";
232 }
233
234 leaf adapter {
235 type string;
236 description
237 "Addapter that takes care of device";
238 }
239
240 leaf vlan {
241 type uint32;
242 description
243 "Device contact on vlan (if 0, no vlan)";
244 }
245
246 leaf mac_address {
247 type string;
248 description
249 "Device contact MAC address (format: xx:xx:xx:xx:xx:xx )";
250 }
251
252 leaf ipv4_address {
253 type string;
254 description
255 "Device contact IPv4 address (format: a.b.c.d or can use hostname too)";
256 }
257
258 leaf ipv6_address {
259 type string;
260 description
261 "Device contact IPv6 address using the canonical string form
262 ( xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx )";
263 }
264
265
266 leaf admin_state {
267 type common:AdminState;
268
269 description
270 "";
271 }
272
273 leaf oper_status {
274 type common:OperStatus;
275
276 description
277 "";
278 }
279
280 leaf connect_status {
281 type common:ConnectStatus;
282
283 description
284 "";
285 }
286
287 container custom {
288 uses any:Any;
289
290 description
291 "Device type specific attributes
292TODO additional common attribute here";
293 }
294
295 list ports {
296 key "port_no";
297 uses Port;
298
299 description
300 "";
301 }
302
303 container flows {
304 uses openflow_13:Flows;
305
306 description
307 "";
308 }
309
310 container flow_groups {
311 uses openflow_13:FlowGroups;
312
313 description
314 "";
315 }
316
317 grouping ProxyAddress {
318 description
319 "";
320 leaf device_id {
321 type string;
322 description
323 "Which device to use as proxy to this device";
324 }
325
326 leaf channel_id {
327 type uint32;
328 description
329 "Sub-address within proxy device";
330 }
331
332 }
333
334 }
335
336 grouping Devices {
337 description
338 "";
339 list items {
340 key "id";
341 uses Device;
342
343 description
344 "";
345 }
346
347 }
348
349}