blob: 2dfc23542018b3a7d988342c9a4ca4780931cccb [file] [log] [blame]
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001{
2 "swagger": "2.0",
3 "info": {
4 "title": "bbsim/bbsim.proto",
5 "version": "version not set"
6 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +02007 "consumes": [
8 "application/json"
9 ],
10 "produces": [
11 "application/json"
12 ],
13 "paths": {
14 "/v1/olt": {
15 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +053016 "summary": "Get current status of OLT",
Zdravko Bozakov2da76342019-10-21 09:47:35 +020017 "operationId": "GetOlt",
18 "responses": {
19 "200": {
20 "description": "A successful response.",
21 "schema": {
22 "$ref": "#/definitions/bbsimOlt"
23 }
24 }
25 },
26 "tags": [
27 "BBSim"
28 ]
29 }
30 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -070031 "/v1/olt/flows": {
32 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +053033 "summary": "Get all flows or ONU specific flows",
Matteo Scandolo9d08be52020-03-12 09:43:53 -070034 "operationId": "GetFlows2",
35 "responses": {
36 "200": {
37 "description": "A successful response.",
38 "schema": {
39 "$ref": "#/definitions/bbsimFlows"
40 }
41 }
42 },
43 "parameters": [
44 {
45 "name": "SerialNumber",
46 "in": "query",
47 "required": false,
48 "type": "string"
49 }
50 ],
51 "tags": [
52 "BBSim"
53 ]
54 }
55 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +020056 "/v1/olt/onus": {
57 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +053058 "summary": "Get status of all ONUs",
Zdravko Bozakov2da76342019-10-21 09:47:35 +020059 "operationId": "GetONUs",
60 "responses": {
61 "200": {
62 "description": "A successful response.",
63 "schema": {
64 "$ref": "#/definitions/bbsimONUs"
65 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +053066 }
67 },
68 "tags": [
69 "BBSim"
70 ]
71 },
72 "delete": {
73 "summary": "Shutdown all ONUs in OLT",
74 "operationId": "ShutdownAllONUs",
75 "responses": {
76 "200": {
77 "description": "A successful response.",
78 "schema": {
79 "$ref": "#/definitions/bbsimResponse"
80 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +053081 }
82 },
83 "tags": [
84 "BBSim"
85 ]
86 },
87 "post": {
88 "summary": "Poweron all ONUs in OLT",
89 "operationId": "PoweronAllONUs",
90 "responses": {
91 "200": {
92 "description": "A successful response.",
93 "schema": {
94 "$ref": "#/definitions/bbsimResponse"
95 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +020096 }
97 },
98 "tags": [
99 "BBSim"
100 ]
101 }
102 },
103 "/v1/olt/onus/{SerialNumber}": {
104 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530105 "summary": "Get status of an ONU by serial number",
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200106 "operationId": "GetONU",
107 "responses": {
108 "200": {
109 "description": "A successful response.",
110 "schema": {
111 "$ref": "#/definitions/bbsimONU"
112 }
113 }
114 },
115 "parameters": [
116 {
117 "name": "SerialNumber",
118 "in": "path",
119 "required": true,
120 "type": "string"
121 }
122 ],
123 "tags": [
124 "BBSim"
125 ]
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700126 },
127 "delete": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530128 "summary": "Shutdown an ONU by serial number",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700129 "operationId": "ShutdownONU",
130 "responses": {
131 "200": {
132 "description": "A successful response.",
133 "schema": {
134 "$ref": "#/definitions/bbsimResponse"
135 }
136 }
137 },
138 "parameters": [
139 {
140 "name": "SerialNumber",
141 "in": "path",
142 "required": true,
143 "type": "string"
144 }
145 ],
146 "tags": [
147 "BBSim"
148 ]
149 },
150 "post": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530151 "summary": "Poweron an ONU by serial number",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700152 "operationId": "PoweronONU",
153 "responses": {
154 "200": {
155 "description": "A successful response.",
156 "schema": {
157 "$ref": "#/definitions/bbsimResponse"
158 }
159 }
160 },
161 "parameters": [
162 {
163 "name": "SerialNumber",
164 "in": "path",
165 "required": true,
166 "type": "string"
167 }
168 ],
169 "tags": [
170 "BBSim"
171 ]
172 }
173 },
174 "/v1/olt/onus/{SerialNumber}/alarms/{AlarmType}/{Status}": {
175 "post": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530176 "summary": "Send ONU alarm indication",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700177 "operationId": "SetOnuAlarmIndication",
178 "responses": {
179 "200": {
180 "description": "A successful response.",
181 "schema": {
182 "$ref": "#/definitions/bbsimResponse"
183 }
184 }
185 },
186 "parameters": [
187 {
188 "name": "SerialNumber",
189 "in": "path",
190 "required": true,
191 "type": "string"
192 },
193 {
194 "name": "AlarmType",
195 "in": "path",
196 "required": true,
197 "type": "string"
198 },
199 {
200 "name": "Status",
201 "in": "path",
202 "required": true,
203 "type": "string"
204 }
205 ],
206 "tags": [
207 "BBSim"
208 ]
209 }
210 },
211 "/v1/olt/onus/{SerialNumber}/flows": {
212 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530213 "summary": "Get all flows or ONU specific flows",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700214 "operationId": "GetFlows",
215 "responses": {
216 "200": {
217 "description": "A successful response.",
218 "schema": {
219 "$ref": "#/definitions/bbsimFlows"
220 }
221 }
222 },
223 "parameters": [
224 {
225 "name": "SerialNumber",
226 "in": "path",
227 "required": true,
228 "type": "string"
229 }
230 ],
231 "tags": [
232 "BBSim"
233 ]
234 }
235 },
236 "/v1/olt/onus/{SerialNumber}/trafficschedulers": {
237 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530238 "summary": "Get Traffic scheduler information for ONU",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700239 "operationId": "GetOnuTrafficSchedulers",
240 "responses": {
241 "200": {
242 "description": "A successful response.",
243 "schema": {
244 "$ref": "#/definitions/bbsimONUTrafficSchedulers"
245 }
246 }
247 },
248 "parameters": [
249 {
250 "name": "SerialNumber",
251 "in": "path",
252 "required": true,
253 "type": "string"
254 }
255 ],
256 "tags": [
257 "BBSim"
258 ]
259 }
260 },
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530261 "/v1/olt/port/{PonPortId}/onus": {
262 "delete": {
263 "summary": "Shutdown all ONUs under a PON by pon-port-ID",
264 "operationId": "ShutdownONUsOnPON",
265 "responses": {
266 "200": {
267 "description": "A successful response.",
268 "schema": {
269 "$ref": "#/definitions/bbsimResponse"
270 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530271 }
272 },
273 "parameters": [
274 {
275 "name": "PonPortId",
276 "in": "path",
277 "required": true,
278 "type": "integer",
279 "format": "int64"
280 }
281 ],
282 "tags": [
283 "BBSim"
284 ]
285 },
286 "post": {
287 "summary": "Poweron all ONUs under a PON by pon-port-ID",
288 "operationId": "PoweronONUsOnPON",
289 "responses": {
290 "200": {
291 "description": "A successful response.",
292 "schema": {
293 "$ref": "#/definitions/bbsimResponse"
294 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530295 }
296 },
297 "parameters": [
298 {
299 "name": "PonPortId",
300 "in": "path",
301 "required": true,
302 "type": "integer",
303 "format": "int64"
304 }
305 ],
306 "tags": [
307 "BBSim"
308 ]
309 }
310 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700311 "/v1/olt/ports/{InterfaceType}/{InterfaceID}/alarms/los/{Status}": {
312 "post": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530313 "summary": "Send OLT alarm indication for Interface type NNI or PON",
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700314 "operationId": "SetOltAlarmIndication",
315 "responses": {
316 "200": {
317 "description": "A successful response.",
318 "schema": {
319 "$ref": "#/definitions/bbsimResponse"
320 }
321 }
322 },
323 "parameters": [
324 {
325 "name": "InterfaceType",
326 "in": "path",
327 "required": true,
328 "type": "string"
329 },
330 {
331 "name": "InterfaceID",
332 "in": "path",
333 "required": true,
334 "type": "integer",
335 "format": "int64"
336 },
337 {
338 "name": "Status",
339 "in": "path",
340 "required": true,
341 "type": "string"
342 }
343 ],
344 "tags": [
345 "BBSim"
346 ]
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200347 }
348 },
Zack Williams66d6a2c2020-04-09 08:42:24 -0700349 "/v1/olt/reboot": {
350 "post": {
351 "summary": "Reboot OLT",
352 "operationId": "RebootOlt",
353 "responses": {
354 "200": {
355 "description": "A successful response.",
356 "schema": {
357 "$ref": "#/definitions/bbsimResponse"
358 }
359 }
360 },
361 "tags": [
362 "BBSim"
363 ]
364 }
365 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200366 "/v1/olt/status": {
367 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530368 "summary": "Get current status of OLT",
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200369 "operationId": "GetOlt2",
370 "responses": {
371 "200": {
372 "description": "A successful response.",
373 "schema": {
374 "$ref": "#/definitions/bbsimOlt"
375 }
376 }
377 },
378 "tags": [
379 "BBSim"
380 ]
381 }
382 },
383 "/v1/version": {
384 "get": {
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530385 "summary": "Get BBSim version",
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200386 "operationId": "Version",
387 "responses": {
388 "200": {
389 "description": "A successful response.",
390 "schema": {
391 "$ref": "#/definitions/bbsimVersionNumber"
392 }
393 }
394 },
395 "tags": [
396 "BBSim"
397 ]
398 }
399 }
400 },
401 "definitions": {
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700402 "bbsimAlarmParameter": {
403 "type": "object",
404 "properties": {
405 "Key": {
406 "type": "string"
407 },
408 "Value": {
409 "type": "string"
410 }
411 }
412 },
413 "bbsimFlows": {
414 "type": "object",
415 "properties": {
416 "flow_count": {
417 "type": "integer",
418 "format": "int64"
419 },
420 "flows": {
421 "type": "array",
422 "items": {
423 "$ref": "#/definitions/openoltFlow"
424 }
425 }
426 }
427 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200428 "bbsimLogLevel": {
429 "type": "object",
430 "properties": {
431 "level": {
432 "type": "string"
433 },
434 "caller": {
435 "type": "boolean",
436 "format": "boolean"
437 }
438 }
439 },
440 "bbsimNNIPort": {
441 "type": "object",
442 "properties": {
443 "ID": {
444 "type": "integer",
445 "format": "int32"
446 },
447 "OperState": {
448 "type": "string"
449 }
450 }
451 },
452 "bbsimONU": {
453 "type": "object",
454 "properties": {
455 "ID": {
456 "type": "integer",
457 "format": "int32"
458 },
459 "SerialNumber": {
460 "type": "string"
461 },
462 "OperState": {
463 "type": "string"
464 },
465 "InternalState": {
466 "type": "string"
467 },
468 "PonPortID": {
469 "type": "integer",
470 "format": "int32"
471 },
472 "STag": {
473 "type": "integer",
474 "format": "int32"
475 },
476 "CTag": {
477 "type": "integer",
478 "format": "int32"
479 },
480 "HwAddress": {
481 "type": "string"
482 },
483 "PortNo": {
484 "type": "integer",
485 "format": "int32"
486 }
487 }
488 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700489 "bbsimONURequest": {
490 "type": "object",
491 "properties": {
492 "SerialNumber": {
493 "type": "string"
494 }
495 }
496 },
497 "bbsimONUTrafficSchedulers": {
498 "type": "object",
499 "properties": {
500 "traffSchedulers": {
501 "$ref": "#/definitions/tech_profileTrafficSchedulers"
502 }
503 }
504 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200505 "bbsimONUs": {
506 "type": "object",
507 "properties": {
508 "items": {
509 "type": "array",
510 "items": {
511 "$ref": "#/definitions/bbsimONU"
512 }
513 }
514 }
515 },
516 "bbsimOlt": {
517 "type": "object",
518 "properties": {
519 "ID": {
520 "type": "integer",
521 "format": "int32"
522 },
523 "SerialNumber": {
524 "type": "string"
525 },
526 "OperState": {
527 "type": "string"
528 },
529 "InternalState": {
530 "type": "string"
531 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700532 "IP": {
533 "type": "string"
534 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200535 "NNIPorts": {
536 "type": "array",
537 "items": {
538 "$ref": "#/definitions/bbsimNNIPort"
539 }
540 },
541 "PONPorts": {
542 "type": "array",
543 "items": {
544 "$ref": "#/definitions/bbsimPONPort"
545 }
546 }
547 }
548 },
549 "bbsimPONPort": {
550 "type": "object",
551 "properties": {
552 "ID": {
553 "type": "integer",
554 "format": "int32"
555 },
556 "OperState": {
557 "type": "string"
558 }
559 }
560 },
561 "bbsimResponse": {
562 "type": "object",
563 "properties": {
564 "status_code": {
565 "type": "integer",
566 "format": "int32"
567 },
568 "message": {
569 "type": "string"
570 }
571 }
572 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700573 "bbsimSubActionTypes": {
574 "type": "string",
575 "enum": [
576 "JOIN",
577 "LEAVE",
578 "JOINV3"
579 ],
580 "default": "JOIN"
581 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200582 "bbsimVersionNumber": {
583 "type": "object",
584 "properties": {
585 "version": {
586 "type": "string"
587 },
588 "buildTime": {
589 "type": "string"
590 },
591 "commitHash": {
592 "type": "string"
593 },
594 "gitStatus": {
595 "type": "string"
596 }
597 }
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700598 },
599 "openoltAction": {
600 "type": "object",
601 "properties": {
602 "cmd": {
603 "$ref": "#/definitions/openoltActionCmd"
604 },
605 "o_vid": {
606 "type": "integer",
607 "format": "int64"
608 },
609 "o_pbits": {
610 "type": "integer",
611 "format": "int64"
612 },
613 "o_tpid": {
614 "type": "integer",
615 "format": "int64"
616 },
617 "i_vid": {
618 "type": "integer",
619 "format": "int64"
620 },
621 "i_pbits": {
622 "type": "integer",
623 "format": "int64"
624 },
625 "i_tpid": {
626 "type": "integer",
627 "format": "int64"
628 }
629 }
630 },
631 "openoltActionCmd": {
632 "type": "object",
633 "properties": {
634 "add_outer_tag": {
635 "type": "boolean",
636 "format": "boolean"
637 },
638 "remove_outer_tag": {
639 "type": "boolean",
640 "format": "boolean"
641 },
642 "trap_to_host": {
643 "type": "boolean",
644 "format": "boolean"
645 }
646 }
647 },
648 "openoltClassifier": {
649 "type": "object",
650 "properties": {
651 "o_tpid": {
652 "type": "integer",
653 "format": "int64"
654 },
655 "o_vid": {
656 "type": "integer",
657 "format": "int64"
658 },
659 "i_tpid": {
660 "type": "integer",
661 "format": "int64"
662 },
663 "i_vid": {
664 "type": "integer",
665 "format": "int64"
666 },
667 "o_pbits": {
668 "type": "integer",
669 "format": "int64"
670 },
671 "i_pbits": {
672 "type": "integer",
673 "format": "int64"
674 },
675 "eth_type": {
676 "type": "integer",
677 "format": "int64"
678 },
679 "dst_mac": {
680 "type": "string",
681 "format": "byte"
682 },
683 "src_mac": {
684 "type": "string",
685 "format": "byte"
686 },
687 "ip_proto": {
688 "type": "integer",
689 "format": "int64"
690 },
691 "dst_ip": {
692 "type": "integer",
693 "format": "int64"
694 },
695 "src_ip": {
696 "type": "integer",
697 "format": "int64"
698 },
699 "src_port": {
700 "type": "integer",
701 "format": "int64"
702 },
703 "dst_port": {
704 "type": "integer",
705 "format": "int64"
706 },
707 "pkt_tag_type": {
708 "type": "string"
709 }
710 }
711 },
712 "openoltFlow": {
713 "type": "object",
714 "properties": {
715 "access_intf_id": {
716 "type": "integer",
717 "format": "int32"
718 },
719 "onu_id": {
720 "type": "integer",
721 "format": "int32"
722 },
723 "uni_id": {
724 "type": "integer",
725 "format": "int32"
726 },
727 "flow_id": {
728 "type": "integer",
729 "format": "int64"
730 },
731 "flow_type": {
732 "type": "string"
733 },
734 "alloc_id": {
735 "type": "integer",
736 "format": "int32"
737 },
738 "network_intf_id": {
739 "type": "integer",
740 "format": "int32"
741 },
742 "gemport_id": {
743 "type": "integer",
744 "format": "int32"
745 },
746 "classifier": {
747 "$ref": "#/definitions/openoltClassifier"
748 },
749 "action": {
750 "$ref": "#/definitions/openoltAction"
751 },
752 "priority": {
753 "type": "integer",
754 "format": "int32"
755 },
756 "cookie": {
757 "type": "string",
758 "format": "uint64"
759 },
760 "port_no": {
761 "type": "integer",
762 "format": "int64"
763 }
764 }
765 },
766 "tech_profileAdditionalBW": {
767 "type": "string",
768 "enum": [
769 "AdditionalBW_None",
770 "AdditionalBW_NA",
771 "AdditionalBW_BestEffort",
772 "AdditionalBW_Auto"
773 ],
774 "default": "AdditionalBW_None"
775 },
776 "tech_profileDirection": {
777 "type": "string",
778 "enum": [
779 "UPSTREAM",
780 "DOWNSTREAM",
781 "BIDIRECTIONAL"
782 ],
783 "default": "UPSTREAM"
784 },
785 "tech_profileInferredAdditionBWIndication": {
786 "type": "string",
787 "enum": [
788 "InferredAdditionBWIndication_None",
789 "InferredAdditionBWIndication_Assured",
790 "InferredAdditionBWIndication_BestEffort"
791 ],
792 "default": "InferredAdditionBWIndication_None"
793 },
794 "tech_profileSchedulerConfig": {
795 "type": "object",
796 "properties": {
797 "direction": {
798 "$ref": "#/definitions/tech_profileDirection"
799 },
800 "additional_bw": {
801 "$ref": "#/definitions/tech_profileAdditionalBW"
802 },
803 "priority": {
804 "type": "integer",
805 "format": "int64"
806 },
807 "weight": {
808 "type": "integer",
809 "format": "int64"
810 },
811 "sched_policy": {
812 "$ref": "#/definitions/tech_profileSchedulingPolicy"
813 }
814 }
815 },
816 "tech_profileSchedulingPolicy": {
817 "type": "string",
818 "enum": [
819 "WRR",
820 "StrictPriority",
821 "Hybrid"
822 ],
823 "default": "WRR"
824 },
825 "tech_profileTrafficScheduler": {
826 "type": "object",
827 "properties": {
828 "direction": {
829 "$ref": "#/definitions/tech_profileDirection"
830 },
831 "alloc_id": {
832 "type": "integer",
833 "format": "int64"
834 },
835 "scheduler": {
836 "$ref": "#/definitions/tech_profileSchedulerConfig"
837 },
838 "traffic_shaping_info": {
839 "$ref": "#/definitions/tech_profileTrafficShapingInfo"
840 }
841 }
842 },
843 "tech_profileTrafficSchedulers": {
844 "type": "object",
845 "properties": {
846 "intf_id": {
847 "type": "integer",
848 "format": "int64"
849 },
850 "onu_id": {
851 "type": "integer",
852 "format": "int64"
853 },
854 "uni_id": {
855 "type": "integer",
856 "format": "int64"
857 },
858 "port_no": {
859 "type": "integer",
860 "format": "int64"
861 },
862 "traffic_scheds": {
863 "type": "array",
864 "items": {
865 "$ref": "#/definitions/tech_profileTrafficScheduler"
866 }
867 }
868 }
869 },
870 "tech_profileTrafficShapingInfo": {
871 "type": "object",
872 "properties": {
873 "cir": {
874 "type": "integer",
875 "format": "int64"
876 },
877 "cbs": {
878 "type": "integer",
879 "format": "int64"
880 },
881 "pir": {
882 "type": "integer",
883 "format": "int64"
884 },
885 "pbs": {
886 "type": "integer",
887 "format": "int64"
888 },
889 "gir": {
890 "type": "integer",
891 "format": "int64"
892 },
893 "add_bw_ind": {
894 "$ref": "#/definitions/tech_profileInferredAdditionBWIndication"
895 }
896 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200897 }
898 }
899}