blob: b79eef12779e254aefbe1fcc1ca2f5da0618332f [file] [log] [blame]
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -05001
2module ietf-voltha {
3
4
5 namespace "urn:opencord:params:xml:ns:voltha:ietf-voltha";
6 prefix voltha;
7
8 import ietf-openflow_13 { prefix openflow_13 ; }
9 import ietf-adapter { prefix adapter ; }
10 import ietf-health { prefix health ; }
11 import ietf-common { prefix common ; }
12 import ietf-device { prefix device ; }
13 import ietf-logical_device { prefix logical_device ; }
14 import ietf-empty { prefix empty ; }
15
16 organization "CORD";
17 contact
18 " Any name";
19
20 description
21 "";
22
23 revision "2016-11-15" {
24 description "Initial revision.";
25 reference "reference";
26 }
27
28
29 grouping DeviceGroup {
30 description
31 "";
32 leaf id {
33 type string;
34 description
35 "";
36 }
37
38 list logical_devices {
39 key "id";
40 uses logical_device:LogicalDevice;
41
42 description
43 "";
44 }
45
46 list devices {
47 key "id";
48 uses device:Device;
49
50 description
51 "";
52 }
53
54 }
55
56 grouping DeviceGroups {
57 description
58 "";
59 list items {
60 key "id";
61 uses DeviceGroup;
62
63 description
64 "";
65 }
66
67 }
68
69 grouping VolthaInstance {
70 description
71 "Top-level (root) node for a Voltha Instance";
72 leaf instance_id {
73 type string;
74 description
75 "";
76 }
77
78 leaf version {
79 type string;
80 description
81 "";
82 }
83
84 leaf log_level {
85 type common:LogLevel;
86
87 description
88 "";
89 }
90
91 container health {
92 uses health:HealthStatus;
93
94 description
95 "";
96 }
97
98 list adapters {
99 key "id";
100 uses adapter:Adapter;
101
102 description
103 "";
104 }
105
106 list logical_devices {
107 key "id";
108 uses logical_device:LogicalDevice;
109
110 description
111 "";
112 }
113
114 list devices {
115 key "id";
116 uses device:Device;
117
118 description
119 "";
120 }
121
122 list device_types {
123 key "id";
124 uses device:DeviceType;
125
126 description
127 "";
128 }
129
130 list device_groups {
131 key "id";
132 uses DeviceGroup;
133
134 description
135 "";
136 }
137
138 }
139
140 grouping VolthaInstances {
141 description
142 "";
143 list items {
144 key "items";
145 leaf items {
146 type string;
147 description
148 "";
149 }
150 description
151 "";
152 }
153
154 }
155
156 grouping Voltha {
157 description
158 "Voltha representing the entire Voltha cluster";
159 leaf version {
160 type string;
161 description
162 "";
163 }
164
165 leaf log_level {
166 type common:LogLevel;
167
168 description
169 "";
170 }
171
172 list instances {
173 key "instance_id";
174 uses VolthaInstance;
175
176 description
177 "";
178 }
179
180 list adapters {
181 key "id";
182 uses adapter:Adapter;
183
184 description
185 "";
186 }
187
188 list logical_devices {
189 key "id";
190 uses logical_device:LogicalDevice;
191
192 description
193 "";
194 }
195
196 list devices {
197 key "id";
198 uses device:Device;
199
200 description
201 "";
202 }
203
204 list device_groups {
205 key "id";
206 uses DeviceGroup;
207
208 description
209 "";
210 }
211
212 }
213
214 /* Cluster-wide Voltha APIs
215
216 These APIs are potentially dispatched to the leader of the Voltha cluster,
217 to a specific Voltha instance which owns the given device or logical device." */
218 rpc VolthaGlobalService-GetVoltha {
219 description
220 "Get high level information on the Voltha cluster";
221 input {
222 uses empty:Empty;
223
224 }
225 output {
226 uses Voltha;
227
228 }
229 }
230
231 rpc VolthaGlobalService-ListVolthaInstances {
232 description
233 "List all Voltha cluster instances";
234 input {
235 uses empty:Empty;
236
237 }
238 output {
239 uses VolthaInstances;
240
241 }
242 }
243
244 rpc VolthaGlobalService-GetVolthaInstance {
245 description
246 "Get details on a Voltha cluster instance";
247 input {
248 uses common:ID;
249
250 }
251 output {
252 uses VolthaInstance;
253
254 }
255 }
256
257 rpc VolthaGlobalService-ListLogicalDevices {
258 description
259 "List all logical devices managed by the Voltha cluster";
260 input {
261 uses empty:Empty;
262
263 }
264 output {
265 uses logical_device:LogicalDevices;
266
267 }
268 }
269
270 rpc VolthaGlobalService-GetLogicalDevice {
271 description
272 "Get additional information on a given logical device";
273 input {
274 uses common:ID;
275
276 }
277 output {
278 uses logical_device:LogicalDevice;
279
280 }
281 }
282
283 rpc VolthaGlobalService-ListLogicalDevicePorts {
284 description
285 "List ports of a logical device";
286 input {
287 uses common:ID;
288
289 }
290 output {
291 uses logical_device:LogicalPorts;
292
293 }
294 }
295
296 rpc VolthaGlobalService-ListLogicalDeviceFlows {
297 description
298 "List all flows of a logical device";
299 input {
300 uses common:ID;
301
302 }
303 output {
304 uses openflow_13:Flows;
305
306 }
307 }
308
309 rpc VolthaGlobalService-UpdateLogicalDeviceFlowTable {
310 description
311 "Update flow table for logical device";
312 input {
313 uses openflow_13:FlowTableUpdate;
314
315 }
316 output {
317 uses empty:Empty;
318
319 }
320 }
321
322 rpc VolthaGlobalService-ListLogicalDeviceFlowGroups {
323 description
324 "List all flow groups of a logical device";
325 input {
326 uses common:ID;
327
328 }
329 output {
330 uses openflow_13:FlowGroups;
331
332 }
333 }
334
335 rpc VolthaGlobalService-UpdateLogicalDeviceFlowGroupTable {
336 description
337 "Update group table for device";
338 input {
339 uses openflow_13:FlowGroupTableUpdate;
340
341 }
342 output {
343 uses empty:Empty;
344
345 }
346 }
347
348 rpc VolthaGlobalService-ListDevices {
349 description
350 "List all physical devices controlled by the Voltha cluster";
351 input {
352 uses empty:Empty;
353
354 }
355 output {
356 uses device:Devices;
357
358 }
359 }
360
361 rpc VolthaGlobalService-GetDevice {
362 description
363 "Get more information on a given physical device";
364 input {
365 uses common:ID;
366
367 }
368 output {
369 uses device:Device;
370
371 }
372 }
373
374 rpc VolthaGlobalService-CreateDevice {
375 description
376 "Pre-provision a new physical device";
377 input {
378 uses device:Device;
379
380 }
381 output {
382 uses device:Device;
383
384 }
385 }
386
387 rpc VolthaGlobalService-ActivateDevice {
388 description
389 "Activate a pre-provisioned device";
390 input {
391 uses common:ID;
392
393 }
394 output {
395 uses empty:Empty;
396
397 }
398 }
399
400 rpc VolthaGlobalService-ListDevicePorts {
401 description
402 "List ports of a device";
403 input {
404 uses common:ID;
405
406 }
407 output {
408 uses device:Ports;
409
410 }
411 }
412
413 rpc VolthaGlobalService-ListDeviceFlows {
414 description
415 "List all flows of a device";
416 input {
417 uses common:ID;
418
419 }
420 output {
421 uses openflow_13:Flows;
422
423 }
424 }
425
426 rpc VolthaGlobalService-ListDeviceFlowGroups {
427 description
428 "List all flow groups of a device";
429 input {
430 uses common:ID;
431
432 }
433 output {
434 uses openflow_13:FlowGroups;
435
436 }
437 }
438
439 rpc VolthaGlobalService-ListDeviceTypes {
440 description
441 "List device types known to Voltha";
442 input {
443 uses empty:Empty;
444
445 }
446 output {
447 uses device:DeviceTypes;
448
449 }
450 }
451
452 rpc VolthaGlobalService-GetDeviceType {
453 description
454 "Get additional information on a device type";
455 input {
456 uses common:ID;
457
458 }
459 output {
460 uses device:DeviceType;
461
462 }
463 }
464
465 rpc VolthaGlobalService-ListDeviceGroups {
466 description
467 "List all device sharding groups";
468 input {
469 uses empty:Empty;
470
471 }
472 output {
473 uses DeviceGroups;
474
475 }
476 }
477
478 rpc VolthaGlobalService-GetDeviceGroup {
479 description
480 "Get additional information on a device group";
481 input {
482 uses common:ID;
483
484 }
485 output {
486 uses DeviceGroup;
487
488 }
489 }
490
491
492 /* Per-instance APIs
493
494 These APIs are always served locally by the Voltha instance on which the
495 call is made." */
496 rpc VolthaLocalService-GetVolthaInstance {
497 description
498 "Get information on this Voltha instance";
499 input {
500 uses empty:Empty;
501
502 }
503 output {
504 uses VolthaInstance;
505
506 }
507 }
508
509 rpc VolthaLocalService-GetHealth {
510 description
511 "Get the health state of the Voltha instance";
512 input {
513 uses empty:Empty;
514
515 }
516 output {
517 uses health:HealthStatus;
518
519 }
520 }
521
522 rpc VolthaLocalService-ListAdapters {
523 description
524 "List all active adapters (plugins) in this Voltha instance";
525 input {
526 uses empty:Empty;
527
528 }
529 output {
530 uses adapter:Adapters;
531
532 }
533 }
534
535 rpc VolthaLocalService-ListLogicalDevices {
536 description
537 "List all logical devices managed by this Voltha instance";
538 input {
539 uses empty:Empty;
540
541 }
542 output {
543 uses logical_device:LogicalDevices;
544
545 }
546 }
547
548 rpc VolthaLocalService-GetLogicalDevice {
549 description
550 "Get additional information on given logical device";
551 input {
552 uses common:ID;
553
554 }
555 output {
556 uses logical_device:LogicalDevice;
557
558 }
559 }
560
561 rpc VolthaLocalService-ListLogicalDevicePorts {
562 description
563 "List ports of a logical device";
564 input {
565 uses common:ID;
566
567 }
568 output {
569 uses logical_device:LogicalPorts;
570
571 }
572 }
573
574 rpc VolthaLocalService-ListLogicalDeviceFlows {
575 description
576 "List all flows of a logical device";
577 input {
578 uses common:ID;
579
580 }
581 output {
582 uses openflow_13:Flows;
583
584 }
585 }
586
587 rpc VolthaLocalService-UpdateLogicalDeviceFlowTable {
588 description
589 "Update flow table for logical device";
590 input {
591 uses openflow_13:FlowTableUpdate;
592
593 }
594 output {
595 uses empty:Empty;
596
597 }
598 }
599
600 rpc VolthaLocalService-ListLogicalDeviceFlowGroups {
601 description
602 "List all flow groups of a logical device";
603 input {
604 uses common:ID;
605
606 }
607 output {
608 uses openflow_13:FlowGroups;
609
610 }
611 }
612
613 rpc VolthaLocalService-UpdateLogicalDeviceFlowGroupTable {
614 description
615 "Update group table for logical device";
616 input {
617 uses openflow_13:FlowGroupTableUpdate;
618
619 }
620 output {
621 uses empty:Empty;
622
623 }
624 }
625
626 rpc VolthaLocalService-ListDevices {
627 description
628 "List all physical devices managed by this Voltha instance";
629 input {
630 uses empty:Empty;
631
632 }
633 output {
634 uses device:Devices;
635
636 }
637 }
638
639 rpc VolthaLocalService-GetDevice {
640 description
641 "Get additional information on this device";
642 input {
643 uses common:ID;
644
645 }
646 output {
647 uses device:Device;
648
649 }
650 }
651
652 rpc VolthaLocalService-CreateDevice {
653 description
654 "Pre-provision a new physical device";
655 input {
656 uses device:Device;
657
658 }
659 output {
660 uses device:Device;
661
662 }
663 }
664
665 rpc VolthaLocalService-ActivateDevice {
666 description
667 "Activate a pre-provisioned device";
668 input {
669 uses common:ID;
670
671 }
672 output {
673 uses empty:Empty;
674
675 }
676 }
677
678 rpc VolthaLocalService-ListDevicePorts {
679 description
680 "List ports of a device";
681 input {
682 uses common:ID;
683
684 }
685 output {
686 uses device:Ports;
687
688 }
689 }
690
691 rpc VolthaLocalService-ListDeviceFlows {
692 description
693 "List all flows of a device";
694 input {
695 uses common:ID;
696
697 }
698 output {
699 uses openflow_13:Flows;
700
701 }
702 }
703
704 rpc VolthaLocalService-ListDeviceFlowGroups {
705 description
706 "List all flow groups of a device";
707 input {
708 uses common:ID;
709
710 }
711 output {
712 uses openflow_13:FlowGroups;
713
714 }
715 }
716
717 rpc VolthaLocalService-ListDeviceTypes {
718 description
719 "List device types know to Voltha instance";
720 input {
721 uses empty:Empty;
722
723 }
724 output {
725 uses device:DeviceTypes;
726
727 }
728 }
729
730 rpc VolthaLocalService-GetDeviceType {
731 description
732 "Get additional information on given device type";
733 input {
734 uses common:ID;
735
736 }
737 output {
738 uses device:DeviceType;
739
740 }
741 }
742
743 rpc VolthaLocalService-ListDeviceGroups {
744 description
745 "List device sharding groups managed by this Voltha instance";
746 input {
747 uses empty:Empty;
748
749 }
750 output {
751 uses DeviceGroups;
752
753 }
754 }
755
756 rpc VolthaLocalService-GetDeviceGroup {
757 description
758 "Get more information on given device shard";
759 input {
760 uses common:ID;
761
762 }
763 output {
764 uses DeviceGroup;
765
766 }
767 }
768
769 rpc VolthaLocalService-StreamPacketsOut {
770 description
771 "Stream control packets to the dataplane
772This does not have an HTTP representation";
773 input {
774 uses openflow_13:PacketOut;
775
776 }
777 output {
778 uses empty:Empty;
779
780 }
781 }
782
783 rpc VolthaLocalService-ReceivePacketsIn {
784 description
785 "Receive control packet stream
786This does not have an HTTP representation";
787 input {
788 uses empty:Empty;
789
790 }
791 output {
792 uses openflow_13:PacketIn;
793
794 }
795 }
796
797
798}