blob: b558518f218d94d472bc07d2ce62b9d4fcf49250 [file] [log] [blame]
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001{
2 "swagger": "2.0",
3 "info": {
4 "title": "BBSim API",
5 "version": "1.0",
6 "contact": {
7 "url": "http://opencord.org"
8 }
9 },
10 "schemes": [
11 "http"
12 ],
13 "consumes": [
14 "application/json"
15 ],
16 "produces": [
17 "application/json"
18 ],
19 "paths": {
20 "/v0/olt": {
21 "get": {
22 "summary": "Get current status of OLT",
23 "operationId": "OLTStatus",
24 "responses": {
25 "200": {
26 "description": "A successful response.",
27 "schema": {
28 "$ref": "#/definitions/legacyOLTStatusResponse"
29 }
30 },
31 "404": {
32 "description": "Returned when the resource does not exist.",
33 "schema": {
34 "type": "string",
35 "format": "string"
36 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +053037 },
38 "default": {
39 "description": "An unexpected error response",
40 "schema": {
41 "$ref": "#/definitions/runtimeError"
42 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +020043 }
44 },
45 "tags": [
46 "BBSimService"
47 ]
48 }
49 },
50 "/v0/olt/flows": {
51 "get": {
52 "summary": "Get flows",
53 "operationId": "GetFlows",
54 "responses": {
55 "200": {
56 "description": "A successful response.",
57 "schema": {
58 "$ref": "#/definitions/legacyFlows"
59 }
60 },
61 "404": {
62 "description": "Returned when the resource does not exist.",
63 "schema": {
64 "type": "string",
65 "format": "string"
66 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +053067 },
68 "default": {
69 "description": "An unexpected error response",
70 "schema": {
71 "$ref": "#/definitions/runtimeError"
72 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +020073 }
74 },
75 "parameters": [
76 {
77 "name": "onu_id",
78 "in": "query",
79 "required": false,
80 "type": "integer",
81 "format": "int64"
82 },
83 {
84 "name": "pon_port_id",
85 "in": "query",
86 "required": false,
87 "type": "integer",
88 "format": "int64"
89 },
90 {
91 "name": "onu_serial",
92 "description": "ONU serial number.",
93 "in": "query",
94 "required": false,
95 "type": "string"
96 },
97 {
98 "name": "oper_state",
99 "description": "ONU oper state.",
100 "in": "query",
101 "required": false,
102 "type": "string"
103 },
104 {
105 "name": "onu_state",
106 "description": "ONU internal state.",
107 "in": "query",
108 "required": false,
109 "type": "string"
110 },
111 {
112 "name": "gemports",
113 "in": "query",
114 "required": false,
115 "type": "array",
116 "items": {
117 "type": "integer",
118 "format": "int64"
119 },
120 "collectionFormat": "multi"
121 },
122 {
123 "name": "tconts.uni_id",
124 "in": "query",
125 "required": false,
126 "type": "integer",
127 "format": "int64"
128 },
129 {
130 "name": "tconts.port_no",
131 "in": "query",
132 "required": false,
133 "type": "integer",
134 "format": "int64"
135 }
136 ],
137 "tags": [
138 "BBSimService"
139 ]
140 }
141 },
142 "/v0/olt/onu/{onu_serial}/flows": {
143 "get": {
144 "summary": "Get flows",
145 "operationId": "GetFlows2",
146 "responses": {
147 "200": {
148 "description": "A successful response.",
149 "schema": {
150 "$ref": "#/definitions/legacyFlows"
151 }
152 },
153 "404": {
154 "description": "Returned when the resource does not exist.",
155 "schema": {
156 "type": "string",
157 "format": "string"
158 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530159 },
160 "default": {
161 "description": "An unexpected error response",
162 "schema": {
163 "$ref": "#/definitions/runtimeError"
164 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200165 }
166 },
167 "parameters": [
168 {
169 "name": "onu_serial",
170 "description": "ONU serial number",
171 "in": "path",
172 "required": true,
173 "type": "string"
174 },
175 {
176 "name": "onu_id",
177 "in": "query",
178 "required": false,
179 "type": "integer",
180 "format": "int64"
181 },
182 {
183 "name": "pon_port_id",
184 "in": "query",
185 "required": false,
186 "type": "integer",
187 "format": "int64"
188 },
189 {
190 "name": "oper_state",
191 "description": "ONU oper state.",
192 "in": "query",
193 "required": false,
194 "type": "string"
195 },
196 {
197 "name": "onu_state",
198 "description": "ONU internal state.",
199 "in": "query",
200 "required": false,
201 "type": "string"
202 },
203 {
204 "name": "gemports",
205 "in": "query",
206 "required": false,
207 "type": "array",
208 "items": {
209 "type": "integer",
210 "format": "int64"
211 },
212 "collectionFormat": "multi"
213 },
214 {
215 "name": "tconts.uni_id",
216 "in": "query",
217 "required": false,
218 "type": "integer",
219 "format": "int64"
220 },
221 {
222 "name": "tconts.port_no",
223 "in": "query",
224 "required": false,
225 "type": "integer",
226 "format": "int64"
227 }
228 ],
229 "tags": [
230 "BBSimService"
231 ]
232 }
233 },
234 "/v0/olt/onus": {
235 "get": {
236 "summary": "Get status of all or specific ONUs",
237 "operationId": "ONUStatus",
238 "responses": {
239 "200": {
240 "description": "A successful response.",
241 "schema": {
242 "$ref": "#/definitions/legacyONUs"
243 }
244 },
245 "404": {
246 "description": "Returned when the resource does not exist.",
247 "schema": {
248 "type": "string",
249 "format": "string"
250 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530251 },
252 "default": {
253 "description": "An unexpected error response",
254 "schema": {
255 "$ref": "#/definitions/runtimeError"
256 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200257 }
258 },
259 "parameters": [
260 {
261 "name": "onu.onu_id",
262 "in": "query",
263 "required": false,
264 "type": "integer",
265 "format": "int64"
266 },
267 {
268 "name": "onu.pon_port_id",
269 "in": "query",
270 "required": false,
271 "type": "integer",
272 "format": "int64"
273 },
274 {
275 "name": "onu.onu_serial",
276 "description": "ONU serial number.",
277 "in": "query",
278 "required": false,
279 "type": "string"
280 },
281 {
282 "name": "onu.oper_state",
283 "description": "ONU oper state.",
284 "in": "query",
285 "required": false,
286 "type": "string"
287 },
288 {
289 "name": "onu.onu_state",
290 "description": "ONU internal state.",
291 "in": "query",
292 "required": false,
293 "type": "string"
294 },
295 {
296 "name": "onu.gemports",
297 "in": "query",
298 "required": false,
299 "type": "array",
300 "items": {
301 "type": "integer",
302 "format": "int64"
303 },
304 "collectionFormat": "multi"
305 },
306 {
307 "name": "onu.tconts.uni_id",
308 "in": "query",
309 "required": false,
310 "type": "integer",
311 "format": "int64"
312 },
313 {
314 "name": "onu.tconts.port_no",
315 "in": "query",
316 "required": false,
317 "type": "integer",
318 "format": "int64"
319 }
320 ],
321 "tags": [
322 "BBSimService"
323 ]
324 },
325 "delete": {
326 "summary": "Deactivate ONU(s) for specific PON port(s) specified by\na given onu_serial, onu_id, or pon_port_id",
327 "operationId": "ONUDeactivate",
328 "responses": {
329 "200": {
330 "description": "A successful response.",
331 "schema": {
332 "$ref": "#/definitions/legacyBBSimResponse"
333 }
334 },
335 "404": {
336 "description": "Returned when the resource does not exist.",
337 "schema": {
338 "type": "string",
339 "format": "string"
340 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530341 },
342 "default": {
343 "description": "An unexpected error response",
344 "schema": {
345 "$ref": "#/definitions/runtimeError"
346 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200347 }
348 },
349 "parameters": [
350 {
351 "name": "body",
352 "in": "body",
353 "required": true,
354 "schema": {
355 "$ref": "#/definitions/legacyONUs"
356 }
357 }
358 ],
359 "tags": [
360 "BBSimService"
361 ]
362 },
363 "post": {
364 "summary": "Single/bulk activate ONU(s) for specific PON port(s)",
365 "operationId": "ONUActivate",
366 "responses": {
367 "200": {
368 "description": "A successful response.",
369 "schema": {
370 "$ref": "#/definitions/legacyBBSimResponse"
371 }
372 },
373 "404": {
374 "description": "Returned when the resource does not exist.",
375 "schema": {
376 "type": "string",
377 "format": "string"
378 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530379 },
380 "default": {
381 "description": "An unexpected error response",
382 "schema": {
383 "$ref": "#/definitions/runtimeError"
384 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200385 }
386 },
387 "parameters": [
388 {
389 "name": "body",
390 "in": "body",
391 "required": true,
392 "schema": {
393 "$ref": "#/definitions/legacyONUs"
394 }
395 }
396 ],
397 "tags": [
398 "BBSimService"
399 ]
400 }
401 },
402 "/v0/olt/onus/{onu.onu_serial}": {
403 "get": {
404 "summary": "Get status of all or specific ONUs",
405 "operationId": "ONUStatus2",
406 "responses": {
407 "200": {
408 "description": "A successful response.",
409 "schema": {
410 "$ref": "#/definitions/legacyONUs"
411 }
412 },
413 "404": {
414 "description": "Returned when the resource does not exist.",
415 "schema": {
416 "type": "string",
417 "format": "string"
418 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530419 },
420 "default": {
421 "description": "An unexpected error response",
422 "schema": {
423 "$ref": "#/definitions/runtimeError"
424 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200425 }
426 },
427 "parameters": [
428 {
429 "name": "onu.onu_serial",
430 "description": "ONU serial number",
431 "in": "path",
432 "required": true,
433 "type": "string"
434 },
435 {
436 "name": "onu.onu_id",
437 "in": "query",
438 "required": false,
439 "type": "integer",
440 "format": "int64"
441 },
442 {
443 "name": "onu.pon_port_id",
444 "in": "query",
445 "required": false,
446 "type": "integer",
447 "format": "int64"
448 },
449 {
450 "name": "onu.oper_state",
451 "description": "ONU oper state.",
452 "in": "query",
453 "required": false,
454 "type": "string"
455 },
456 {
457 "name": "onu.onu_state",
458 "description": "ONU internal state.",
459 "in": "query",
460 "required": false,
461 "type": "string"
462 },
463 {
464 "name": "onu.gemports",
465 "in": "query",
466 "required": false,
467 "type": "array",
468 "items": {
469 "type": "integer",
470 "format": "int64"
471 },
472 "collectionFormat": "multi"
473 },
474 {
475 "name": "onu.tconts.uni_id",
476 "in": "query",
477 "required": false,
478 "type": "integer",
479 "format": "int64"
480 },
481 {
482 "name": "onu.tconts.port_no",
483 "in": "query",
484 "required": false,
485 "type": "integer",
486 "format": "int64"
487 }
488 ],
489 "tags": [
490 "BBSimService"
491 ]
492 },
493 "delete": {
494 "summary": "Deactivate ONU(s) for specific PON port(s) specified by\na given onu_serial, onu_id, or pon_port_id",
495 "operationId": "ONUDeactivate2",
496 "responses": {
497 "200": {
498 "description": "A successful response.",
499 "schema": {
500 "$ref": "#/definitions/legacyBBSimResponse"
501 }
502 },
503 "404": {
504 "description": "Returned when the resource does not exist.",
505 "schema": {
506 "type": "string",
507 "format": "string"
508 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530509 },
510 "default": {
511 "description": "An unexpected error response",
512 "schema": {
513 "$ref": "#/definitions/runtimeError"
514 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200515 }
516 },
517 "parameters": [
518 {
519 "name": "onu.onu_serial",
520 "description": "ONU serial number",
521 "in": "path",
522 "required": true,
523 "type": "string"
524 },
525 {
526 "name": "onu.onu_id",
527 "in": "query",
528 "required": false,
529 "type": "integer",
530 "format": "int64"
531 },
532 {
533 "name": "onu.pon_port_id",
534 "in": "query",
535 "required": false,
536 "type": "integer",
537 "format": "int64"
538 },
539 {
540 "name": "onu.oper_state",
541 "description": "ONU oper state.",
542 "in": "query",
543 "required": false,
544 "type": "string"
545 },
546 {
547 "name": "onu.onu_state",
548 "description": "ONU internal state.",
549 "in": "query",
550 "required": false,
551 "type": "string"
552 },
553 {
554 "name": "onu.gemports",
555 "in": "query",
556 "required": false,
557 "type": "array",
558 "items": {
559 "type": "integer",
560 "format": "int64"
561 },
562 "collectionFormat": "multi"
563 },
564 {
565 "name": "onu.tconts.uni_id",
566 "in": "query",
567 "required": false,
568 "type": "integer",
569 "format": "int64"
570 },
571 {
572 "name": "onu.tconts.port_no",
573 "in": "query",
574 "required": false,
575 "type": "integer",
576 "format": "int64"
577 }
578 ],
579 "tags": [
580 "BBSimService"
581 ]
582 }
583 },
584 "/v0/olt/onus/{onu_serial}/alarms/{alarm_type}/{status}": {
585 "post": {
586 "summary": "Generate ONU related alarms",
587 "operationId": "GenerateONUAlarm",
588 "responses": {
589 "200": {
590 "description": "A successful response.",
591 "schema": {
592 "$ref": "#/definitions/legacyBBSimResponse"
593 }
594 },
595 "404": {
596 "description": "Returned when the resource does not exist.",
597 "schema": {
598 "type": "string",
599 "format": "string"
600 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530601 },
602 "default": {
603 "description": "An unexpected error response",
604 "schema": {
605 "$ref": "#/definitions/runtimeError"
606 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200607 }
608 },
609 "parameters": [
610 {
611 "name": "onu_serial",
612 "description": "ONU serial number",
613 "in": "path",
614 "required": true,
615 "type": "string"
616 },
617 {
618 "name": "alarm_type",
619 "description": "Alarm types are:\n \"signaldegrade\"\n \"lossofomcichannel\"\n \"lossofploam\"",
620 "in": "path",
621 "required": true,
622 "type": "string"
623 },
624 {
625 "name": "status",
626 "description": "\"on\"/\"off\" indicates raised or cleared alarm",
627 "in": "path",
628 "required": true,
629 "type": "string"
630 }
631 ],
632 "tags": [
633 "BBSimService"
634 ]
635 }
636 },
637 "/v0/olt/ports/{onu.pon_port_id}/onus": {
638 "get": {
639 "summary": "Get status of all or specific ONUs",
640 "operationId": "ONUStatus4",
641 "responses": {
642 "200": {
643 "description": "A successful response.",
644 "schema": {
645 "$ref": "#/definitions/legacyONUs"
646 }
647 },
648 "404": {
649 "description": "Returned when the resource does not exist.",
650 "schema": {
651 "type": "string",
652 "format": "string"
653 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530654 },
655 "default": {
656 "description": "An unexpected error response",
657 "schema": {
658 "$ref": "#/definitions/runtimeError"
659 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200660 }
661 },
662 "parameters": [
663 {
664 "name": "onu.pon_port_id",
665 "in": "path",
666 "required": true,
667 "type": "integer",
668 "format": "int64"
669 },
670 {
671 "name": "onu.onu_id",
672 "in": "query",
673 "required": false,
674 "type": "integer",
675 "format": "int64"
676 },
677 {
678 "name": "onu.onu_serial",
679 "description": "ONU serial number.",
680 "in": "query",
681 "required": false,
682 "type": "string"
683 },
684 {
685 "name": "onu.oper_state",
686 "description": "ONU oper state.",
687 "in": "query",
688 "required": false,
689 "type": "string"
690 },
691 {
692 "name": "onu.onu_state",
693 "description": "ONU internal state.",
694 "in": "query",
695 "required": false,
696 "type": "string"
697 },
698 {
699 "name": "onu.gemports",
700 "in": "query",
701 "required": false,
702 "type": "array",
703 "items": {
704 "type": "integer",
705 "format": "int64"
706 },
707 "collectionFormat": "multi"
708 },
709 {
710 "name": "onu.tconts.uni_id",
711 "in": "query",
712 "required": false,
713 "type": "integer",
714 "format": "int64"
715 },
716 {
717 "name": "onu.tconts.port_no",
718 "in": "query",
719 "required": false,
720 "type": "integer",
721 "format": "int64"
722 }
723 ],
724 "tags": [
725 "BBSimService"
726 ]
727 },
728 "delete": {
729 "summary": "Deactivate ONU(s) for specific PON port(s) specified by\na given onu_serial, onu_id, or pon_port_id",
730 "operationId": "ONUDeactivate3",
731 "responses": {
732 "200": {
733 "description": "A successful response.",
734 "schema": {
735 "$ref": "#/definitions/legacyBBSimResponse"
736 }
737 },
738 "404": {
739 "description": "Returned when the resource does not exist.",
740 "schema": {
741 "type": "string",
742 "format": "string"
743 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530744 },
745 "default": {
746 "description": "An unexpected error response",
747 "schema": {
748 "$ref": "#/definitions/runtimeError"
749 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200750 }
751 },
752 "parameters": [
753 {
754 "name": "onu.pon_port_id",
755 "in": "path",
756 "required": true,
757 "type": "integer",
758 "format": "int64"
759 },
760 {
761 "name": "onu.onu_id",
762 "in": "query",
763 "required": false,
764 "type": "integer",
765 "format": "int64"
766 },
767 {
768 "name": "onu.onu_serial",
769 "description": "ONU serial number.",
770 "in": "query",
771 "required": false,
772 "type": "string"
773 },
774 {
775 "name": "onu.oper_state",
776 "description": "ONU oper state.",
777 "in": "query",
778 "required": false,
779 "type": "string"
780 },
781 {
782 "name": "onu.onu_state",
783 "description": "ONU internal state.",
784 "in": "query",
785 "required": false,
786 "type": "string"
787 },
788 {
789 "name": "onu.gemports",
790 "in": "query",
791 "required": false,
792 "type": "array",
793 "items": {
794 "type": "integer",
795 "format": "int64"
796 },
797 "collectionFormat": "multi"
798 },
799 {
800 "name": "onu.tconts.uni_id",
801 "in": "query",
802 "required": false,
803 "type": "integer",
804 "format": "int64"
805 },
806 {
807 "name": "onu.tconts.port_no",
808 "in": "query",
809 "required": false,
810 "type": "integer",
811 "format": "int64"
812 }
813 ],
814 "tags": [
815 "BBSimService"
816 ]
817 },
818 "post": {
819 "summary": "Single/bulk activate ONU(s) for specific PON port(s)",
820 "operationId": "ONUActivate2",
821 "responses": {
822 "200": {
823 "description": "A successful response.",
824 "schema": {
825 "$ref": "#/definitions/legacyBBSimResponse"
826 }
827 },
828 "404": {
829 "description": "Returned when the resource does not exist.",
830 "schema": {
831 "type": "string",
832 "format": "string"
833 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530834 },
835 "default": {
836 "description": "An unexpected error response",
837 "schema": {
838 "$ref": "#/definitions/runtimeError"
839 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200840 }
841 },
842 "parameters": [
843 {
844 "name": "onu.pon_port_id",
845 "in": "path",
846 "required": true,
847 "type": "integer",
848 "format": "int64"
849 }
850 ],
851 "tags": [
852 "BBSimService"
853 ]
854 }
855 },
856 "/v0/olt/ports/{onu.pon_port_id}/onus/{onu.onu_id}": {
857 "get": {
858 "summary": "Get status of all or specific ONUs",
859 "operationId": "ONUStatus3",
860 "responses": {
861 "200": {
862 "description": "A successful response.",
863 "schema": {
864 "$ref": "#/definitions/legacyONUs"
865 }
866 },
867 "404": {
868 "description": "Returned when the resource does not exist.",
869 "schema": {
870 "type": "string",
871 "format": "string"
872 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530873 },
874 "default": {
875 "description": "An unexpected error response",
876 "schema": {
877 "$ref": "#/definitions/runtimeError"
878 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200879 }
880 },
881 "parameters": [
882 {
883 "name": "onu.pon_port_id",
884 "in": "path",
885 "required": true,
886 "type": "integer",
887 "format": "int64"
888 },
889 {
890 "name": "onu.onu_id",
891 "in": "path",
892 "required": true,
893 "type": "integer",
894 "format": "int64"
895 },
896 {
897 "name": "onu.onu_serial",
898 "description": "ONU serial number.",
899 "in": "query",
900 "required": false,
901 "type": "string"
902 },
903 {
904 "name": "onu.oper_state",
905 "description": "ONU oper state.",
906 "in": "query",
907 "required": false,
908 "type": "string"
909 },
910 {
911 "name": "onu.onu_state",
912 "description": "ONU internal state.",
913 "in": "query",
914 "required": false,
915 "type": "string"
916 },
917 {
918 "name": "onu.gemports",
919 "in": "query",
920 "required": false,
921 "type": "array",
922 "items": {
923 "type": "integer",
924 "format": "int64"
925 },
926 "collectionFormat": "multi"
927 },
928 {
929 "name": "onu.tconts.uni_id",
930 "in": "query",
931 "required": false,
932 "type": "integer",
933 "format": "int64"
934 },
935 {
936 "name": "onu.tconts.port_no",
937 "in": "query",
938 "required": false,
939 "type": "integer",
940 "format": "int64"
941 }
942 ],
943 "tags": [
944 "BBSimService"
945 ]
946 },
947 "delete": {
948 "summary": "Deactivate ONU(s) for specific PON port(s) specified by\na given onu_serial, onu_id, or pon_port_id",
949 "operationId": "ONUDeactivate4",
950 "responses": {
951 "200": {
952 "description": "A successful response.",
953 "schema": {
954 "$ref": "#/definitions/legacyBBSimResponse"
955 }
956 },
957 "404": {
958 "description": "Returned when the resource does not exist.",
959 "schema": {
960 "type": "string",
961 "format": "string"
962 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +0530963 },
964 "default": {
965 "description": "An unexpected error response",
966 "schema": {
967 "$ref": "#/definitions/runtimeError"
968 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200969 }
970 },
971 "parameters": [
972 {
973 "name": "onu.pon_port_id",
974 "in": "path",
975 "required": true,
976 "type": "integer",
977 "format": "int64"
978 },
979 {
980 "name": "onu.onu_id",
981 "in": "path",
982 "required": true,
983 "type": "integer",
984 "format": "int64"
985 },
986 {
987 "name": "onu.onu_serial",
988 "description": "ONU serial number.",
989 "in": "query",
990 "required": false,
991 "type": "string"
992 },
993 {
994 "name": "onu.oper_state",
995 "description": "ONU oper state.",
996 "in": "query",
997 "required": false,
998 "type": "string"
999 },
1000 {
1001 "name": "onu.onu_state",
1002 "description": "ONU internal state.",
1003 "in": "query",
1004 "required": false,
1005 "type": "string"
1006 },
1007 {
1008 "name": "onu.gemports",
1009 "in": "query",
1010 "required": false,
1011 "type": "array",
1012 "items": {
1013 "type": "integer",
1014 "format": "int64"
1015 },
1016 "collectionFormat": "multi"
1017 },
1018 {
1019 "name": "onu.tconts.uni_id",
1020 "in": "query",
1021 "required": false,
1022 "type": "integer",
1023 "format": "int64"
1024 },
1025 {
1026 "name": "onu.tconts.port_no",
1027 "in": "query",
1028 "required": false,
1029 "type": "integer",
1030 "format": "int64"
1031 }
1032 ],
1033 "tags": [
1034 "BBSimService"
1035 ]
1036 }
1037 },
1038 "/v0/olt/ports/{onu.pon_port_id}/onus/{onu.onu_serial}": {
1039 "post": {
1040 "summary": "Single/bulk activate ONU(s) for specific PON port(s)",
1041 "operationId": "ONUActivate3",
1042 "responses": {
1043 "200": {
1044 "description": "A successful response.",
1045 "schema": {
1046 "$ref": "#/definitions/legacyBBSimResponse"
1047 }
1048 },
1049 "404": {
1050 "description": "Returned when the resource does not exist.",
1051 "schema": {
1052 "type": "string",
1053 "format": "string"
1054 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301055 },
1056 "default": {
1057 "description": "An unexpected error response",
1058 "schema": {
1059 "$ref": "#/definitions/runtimeError"
1060 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001061 }
1062 },
1063 "parameters": [
1064 {
1065 "name": "onu.pon_port_id",
1066 "in": "path",
1067 "required": true,
1068 "type": "integer",
1069 "format": "int64"
1070 },
1071 {
1072 "name": "onu.onu_serial",
1073 "description": "ONU serial number",
1074 "in": "path",
1075 "required": true,
1076 "type": "string"
1077 }
1078 ],
1079 "tags": [
1080 "BBSimService"
1081 ]
1082 }
1083 },
1084 "/v0/olt/ports/{port_type}/{port_id}/alarms/los/{status}": {
1085 "post": {
1086 "summary": "Generate OLT related alarms",
1087 "operationId": "GenerateOLTAlarm",
1088 "responses": {
1089 "200": {
1090 "description": "A successful response.",
1091 "schema": {
1092 "$ref": "#/definitions/legacyBBSimResponse"
1093 }
1094 },
1095 "404": {
1096 "description": "Returned when the resource does not exist.",
1097 "schema": {
1098 "type": "string",
1099 "format": "string"
1100 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301101 },
1102 "default": {
1103 "description": "An unexpected error response",
1104 "schema": {
1105 "$ref": "#/definitions/runtimeError"
1106 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001107 }
1108 },
1109 "parameters": [
1110 {
1111 "name": "port_type",
1112 "in": "path",
1113 "required": true,
1114 "type": "string"
1115 },
1116 {
1117 "name": "port_id",
1118 "in": "path",
1119 "required": true,
1120 "type": "integer",
1121 "format": "int64"
1122 },
1123 {
1124 "name": "status",
1125 "in": "path",
1126 "required": true,
1127 "type": "string"
1128 }
1129 ],
1130 "tags": [
1131 "BBSimService"
1132 ]
1133 }
1134 },
1135 "/v0/olt/ports/{port_type}/{port_id}/status": {
1136 "get": {
1137 "summary": "Get status of a PON/NNI port",
1138 "operationId": "PortStatus",
1139 "responses": {
1140 "200": {
1141 "description": "A successful response.",
1142 "schema": {
1143 "$ref": "#/definitions/legacyPorts"
1144 }
1145 },
1146 "404": {
1147 "description": "Returned when the resource does not exist.",
1148 "schema": {
1149 "type": "string",
1150 "format": "string"
1151 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301152 },
1153 "default": {
1154 "description": "An unexpected error response",
1155 "schema": {
1156 "$ref": "#/definitions/runtimeError"
1157 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001158 }
1159 },
1160 "parameters": [
1161 {
1162 "name": "port_type",
1163 "in": "path",
1164 "required": true,
1165 "type": "string"
1166 },
1167 {
1168 "name": "port_id",
1169 "in": "path",
1170 "required": true,
1171 "type": "integer",
1172 "format": "int64"
1173 },
1174 {
1175 "name": "pon_port_max_onus",
1176 "in": "query",
1177 "required": false,
1178 "type": "integer",
1179 "format": "int64"
1180 },
1181 {
1182 "name": "pon_port_active_onus",
1183 "in": "query",
1184 "required": false,
1185 "type": "integer",
1186 "format": "int64"
1187 },
1188 {
1189 "name": "port_state",
1190 "in": "query",
1191 "required": false,
1192 "type": "string"
1193 },
1194 {
1195 "name": "alarm_state",
1196 "in": "query",
1197 "required": false,
1198 "type": "string"
1199 }
1200 ],
1201 "tags": [
1202 "BBSimService"
1203 ]
1204 }
1205 },
1206 "/v0/olt/status": {
1207 "get": {
1208 "summary": "Get current status of OLT",
1209 "operationId": "OLTStatus2",
1210 "responses": {
1211 "200": {
1212 "description": "A successful response.",
1213 "schema": {
1214 "$ref": "#/definitions/legacyOLTStatusResponse"
1215 }
1216 },
1217 "404": {
1218 "description": "Returned when the resource does not exist.",
1219 "schema": {
1220 "type": "string",
1221 "format": "string"
1222 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301223 },
1224 "default": {
1225 "description": "An unexpected error response",
1226 "schema": {
1227 "$ref": "#/definitions/runtimeError"
1228 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001229 }
1230 },
1231 "tags": [
1232 "BBSimService"
1233 ]
1234 }
1235 },
1236 "/v0/olt/{device_type}/{serial_number}/action/{action}": {
1237 "patch": {
1238 "summary": "Perform actions on OLT/ONU devices (e.g. reboot)",
1239 "operationId": "PerformDeviceAction2",
1240 "responses": {
1241 "200": {
1242 "description": "A successful response.",
1243 "schema": {
1244 "$ref": "#/definitions/legacyBBSimResponse"
1245 }
1246 },
1247 "404": {
1248 "description": "Returned when the resource does not exist.",
1249 "schema": {
1250 "type": "string",
1251 "format": "string"
1252 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301253 },
1254 "default": {
1255 "description": "An unexpected error response",
1256 "schema": {
1257 "$ref": "#/definitions/runtimeError"
1258 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001259 }
1260 },
1261 "parameters": [
1262 {
1263 "name": "device_type",
1264 "in": "path",
1265 "required": true,
1266 "type": "string"
1267 },
1268 {
1269 "name": "serial_number",
1270 "in": "path",
1271 "required": true,
1272 "type": "string"
1273 },
1274 {
1275 "name": "action",
1276 "in": "path",
1277 "required": true,
1278 "type": "string"
1279 }
1280 ],
1281 "tags": [
1282 "BBSimService"
1283 ]
1284 }
1285 },
1286 "/v0/{device_type}/action/{action}": {
1287 "patch": {
1288 "summary": "Perform actions on OLT/ONU devices (e.g. reboot)",
1289 "operationId": "PerformDeviceAction",
1290 "responses": {
1291 "200": {
1292 "description": "A successful response.",
1293 "schema": {
1294 "$ref": "#/definitions/legacyBBSimResponse"
1295 }
1296 },
1297 "404": {
1298 "description": "Returned when the resource does not exist.",
1299 "schema": {
1300 "type": "string",
1301 "format": "string"
1302 }
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301303 },
1304 "default": {
1305 "description": "An unexpected error response",
1306 "schema": {
1307 "$ref": "#/definitions/runtimeError"
1308 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001309 }
1310 },
1311 "parameters": [
1312 {
1313 "name": "device_type",
1314 "in": "path",
1315 "required": true,
1316 "type": "string"
1317 },
1318 {
1319 "name": "action",
1320 "in": "path",
1321 "required": true,
1322 "type": "string"
1323 }
1324 ],
1325 "tags": [
1326 "BBSimService"
1327 ]
1328 }
1329 }
1330 },
1331 "definitions": {
1332 "legacyBBSimResponse": {
1333 "type": "object",
1334 "properties": {
1335 "status_msg": {
1336 "type": "string"
1337 }
1338 },
1339 "title": "BBSim response message"
1340 },
1341 "legacyFlows": {
1342 "type": "object",
1343 "properties": {
1344 "flows": {
1345 "type": "array",
1346 "items": {
1347 "$ref": "#/definitions/openoltFlow"
1348 }
1349 }
1350 }
1351 },
1352 "legacyOLTInfo": {
1353 "type": "object",
1354 "properties": {
1355 "olt_id": {
1356 "type": "string",
1357 "format": "int64"
1358 },
1359 "olt_serial": {
1360 "type": "string"
1361 },
1362 "olt_ip": {
1363 "type": "string"
1364 },
1365 "olt_state": {
1366 "type": "string"
1367 },
1368 "olt_vendor": {
1369 "type": "string"
1370 }
1371 },
1372 "title": "OLT information"
1373 },
1374 "legacyOLTStatusResponse": {
1375 "type": "object",
1376 "properties": {
1377 "olt": {
1378 "$ref": "#/definitions/legacyOLTInfo"
1379 },
1380 "ports": {
1381 "type": "array",
1382 "items": {
1383 "$ref": "#/definitions/legacyPortInfo"
1384 }
1385 }
1386 },
1387 "title": "BBSim status"
1388 },
1389 "legacyONUInfo": {
1390 "type": "object",
1391 "properties": {
1392 "onu_id": {
1393 "type": "integer",
1394 "format": "int64"
1395 },
1396 "pon_port_id": {
1397 "type": "integer",
1398 "format": "int64"
1399 },
1400 "onu_serial": {
1401 "type": "string",
1402 "title": "ONU serial number"
1403 },
1404 "oper_state": {
1405 "type": "string",
1406 "title": "ONU oper state"
1407 },
1408 "onu_state": {
1409 "type": "string",
1410 "title": "ONU internal state"
1411 },
1412 "gemports": {
1413 "type": "array",
1414 "items": {
1415 "type": "integer",
1416 "format": "int64"
1417 }
1418 },
1419 "tconts": {
1420 "$ref": "#/definitions/legacyTconts"
1421 }
1422 },
1423 "title": "ONU information"
1424 },
1425 "legacyONUs": {
1426 "type": "object",
1427 "properties": {
1428 "onus": {
1429 "type": "array",
1430 "items": {
1431 "$ref": "#/definitions/legacyONUInfo"
1432 }
1433 }
1434 },
1435 "title": "Bulk ONU operations"
1436 },
1437 "legacyPortInfo": {
1438 "type": "object",
1439 "properties": {
1440 "port_type": {
1441 "type": "string"
1442 },
1443 "port_id": {
1444 "type": "integer",
1445 "format": "int64"
1446 },
1447 "pon_port_max_onus": {
1448 "type": "integer",
1449 "format": "int64"
1450 },
1451 "pon_port_active_onus": {
1452 "type": "integer",
1453 "format": "int64"
1454 },
1455 "port_state": {
1456 "type": "string"
1457 },
1458 "alarm_state": {
1459 "type": "string"
1460 }
1461 },
1462 "title": "Port information"
1463 },
1464 "legacyPorts": {
1465 "type": "object",
1466 "properties": {
1467 "ports": {
1468 "type": "array",
1469 "items": {
1470 "$ref": "#/definitions/legacyPortInfo"
1471 }
1472 }
1473 },
1474 "title": "Bulk port information"
1475 },
1476 "legacyTconts": {
1477 "type": "object",
1478 "properties": {
1479 "uni_id": {
1480 "type": "integer",
1481 "format": "int64"
1482 },
1483 "port_no": {
1484 "type": "integer",
1485 "format": "int64"
1486 },
1487 "tconts": {
1488 "type": "array",
1489 "items": {
1490 "$ref": "#/definitions/tech_profileTrafficScheduler"
1491 }
1492 }
1493 }
1494 },
1495 "openoltAction": {
1496 "type": "object",
1497 "properties": {
1498 "cmd": {
1499 "$ref": "#/definitions/openoltActionCmd"
1500 },
1501 "o_vid": {
1502 "type": "integer",
1503 "format": "int64"
1504 },
1505 "o_pbits": {
1506 "type": "integer",
1507 "format": "int64"
1508 },
1509 "o_tpid": {
1510 "type": "integer",
1511 "format": "int64"
1512 },
1513 "i_vid": {
1514 "type": "integer",
1515 "format": "int64"
1516 },
1517 "i_pbits": {
1518 "type": "integer",
1519 "format": "int64"
1520 },
1521 "i_tpid": {
1522 "type": "integer",
1523 "format": "int64"
1524 }
1525 }
1526 },
1527 "openoltActionCmd": {
1528 "type": "object",
1529 "properties": {
1530 "add_outer_tag": {
1531 "type": "boolean",
1532 "format": "boolean"
1533 },
1534 "remove_outer_tag": {
1535 "type": "boolean",
1536 "format": "boolean"
1537 },
1538 "trap_to_host": {
1539 "type": "boolean",
1540 "format": "boolean"
1541 }
1542 }
1543 },
1544 "openoltClassifier": {
1545 "type": "object",
1546 "properties": {
1547 "o_tpid": {
1548 "type": "integer",
1549 "format": "int64"
1550 },
1551 "o_vid": {
1552 "type": "integer",
1553 "format": "int64"
1554 },
1555 "i_tpid": {
1556 "type": "integer",
1557 "format": "int64"
1558 },
1559 "i_vid": {
1560 "type": "integer",
1561 "format": "int64"
1562 },
1563 "o_pbits": {
1564 "type": "integer",
1565 "format": "int64"
1566 },
1567 "i_pbits": {
1568 "type": "integer",
1569 "format": "int64"
1570 },
1571 "eth_type": {
1572 "type": "integer",
1573 "format": "int64"
1574 },
1575 "dst_mac": {
1576 "type": "string",
1577 "format": "byte"
1578 },
1579 "src_mac": {
1580 "type": "string",
1581 "format": "byte"
1582 },
1583 "ip_proto": {
1584 "type": "integer",
1585 "format": "int64"
1586 },
1587 "dst_ip": {
1588 "type": "integer",
1589 "format": "int64"
1590 },
1591 "src_ip": {
1592 "type": "integer",
1593 "format": "int64"
1594 },
1595 "src_port": {
1596 "type": "integer",
1597 "format": "int64"
1598 },
1599 "dst_port": {
1600 "type": "integer",
1601 "format": "int64"
1602 },
1603 "pkt_tag_type": {
1604 "type": "string"
1605 }
1606 }
1607 },
1608 "openoltFlow": {
1609 "type": "object",
1610 "properties": {
1611 "access_intf_id": {
1612 "type": "integer",
1613 "format": "int32"
1614 },
1615 "onu_id": {
1616 "type": "integer",
1617 "format": "int32"
1618 },
1619 "uni_id": {
1620 "type": "integer",
1621 "format": "int32"
1622 },
1623 "flow_id": {
1624 "type": "integer",
1625 "format": "int64"
1626 },
1627 "flow_type": {
1628 "type": "string"
1629 },
1630 "alloc_id": {
1631 "type": "integer",
1632 "format": "int32"
1633 },
1634 "network_intf_id": {
1635 "type": "integer",
1636 "format": "int32"
1637 },
1638 "gemport_id": {
1639 "type": "integer",
1640 "format": "int32"
1641 },
1642 "classifier": {
1643 "$ref": "#/definitions/openoltClassifier"
1644 },
1645 "action": {
1646 "$ref": "#/definitions/openoltAction"
1647 },
1648 "priority": {
1649 "type": "integer",
1650 "format": "int32"
1651 },
1652 "cookie": {
1653 "type": "string",
1654 "format": "uint64"
1655 },
1656 "port_no": {
1657 "type": "integer",
1658 "format": "int64"
1659 }
1660 }
1661 },
Pragya Arya3f8fdc62020-03-16 11:12:27 +05301662 "protobufAny": {
1663 "type": "object",
1664 "properties": {
1665 "type_url": {
1666 "type": "string",
1667 "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
1668 },
1669 "value": {
1670 "type": "string",
1671 "format": "byte",
1672 "description": "Must be a valid serialized protocol buffer of the above specified type."
1673 }
1674 },
1675 "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
1676 },
1677 "runtimeError": {
1678 "type": "object",
1679 "properties": {
1680 "error": {
1681 "type": "string"
1682 },
1683 "code": {
1684 "type": "integer",
1685 "format": "int32"
1686 },
1687 "message": {
1688 "type": "string"
1689 },
1690 "details": {
1691 "type": "array",
1692 "items": {
1693 "$ref": "#/definitions/protobufAny"
1694 }
1695 }
1696 }
1697 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +02001698 "tech_profileAdditionalBW": {
1699 "type": "string",
1700 "enum": [
1701 "AdditionalBW_None",
1702 "AdditionalBW_NA",
1703 "AdditionalBW_BestEffort",
1704 "AdditionalBW_Auto"
1705 ],
1706 "default": "AdditionalBW_None"
1707 },
1708 "tech_profileDirection": {
1709 "type": "string",
1710 "enum": [
1711 "UPSTREAM",
1712 "DOWNSTREAM",
1713 "BIDIRECTIONAL"
1714 ],
1715 "default": "UPSTREAM"
1716 },
1717 "tech_profileInferredAdditionBWIndication": {
1718 "type": "string",
1719 "enum": [
1720 "InferredAdditionBWIndication_None",
1721 "InferredAdditionBWIndication_Assured",
1722 "InferredAdditionBWIndication_BestEffort"
1723 ],
1724 "default": "InferredAdditionBWIndication_None"
1725 },
1726 "tech_profileSchedulerConfig": {
1727 "type": "object",
1728 "properties": {
1729 "direction": {
1730 "$ref": "#/definitions/tech_profileDirection"
1731 },
1732 "additional_bw": {
1733 "$ref": "#/definitions/tech_profileAdditionalBW"
1734 },
1735 "priority": {
1736 "type": "integer",
1737 "format": "int64"
1738 },
1739 "weight": {
1740 "type": "integer",
1741 "format": "int64"
1742 },
1743 "sched_policy": {
1744 "$ref": "#/definitions/tech_profileSchedulingPolicy"
1745 }
1746 }
1747 },
1748 "tech_profileSchedulingPolicy": {
1749 "type": "string",
1750 "enum": [
1751 "WRR",
1752 "StrictPriority",
1753 "Hybrid"
1754 ],
1755 "default": "WRR"
1756 },
1757 "tech_profileTrafficScheduler": {
1758 "type": "object",
1759 "properties": {
1760 "direction": {
1761 "$ref": "#/definitions/tech_profileDirection"
1762 },
1763 "alloc_id": {
1764 "type": "integer",
1765 "format": "int64"
1766 },
1767 "scheduler": {
1768 "$ref": "#/definitions/tech_profileSchedulerConfig"
1769 },
1770 "traffic_shaping_info": {
1771 "$ref": "#/definitions/tech_profileTrafficShapingInfo"
1772 }
1773 }
1774 },
1775 "tech_profileTrafficShapingInfo": {
1776 "type": "object",
1777 "properties": {
1778 "cir": {
1779 "type": "integer",
1780 "format": "int64"
1781 },
1782 "cbs": {
1783 "type": "integer",
1784 "format": "int64"
1785 },
1786 "pir": {
1787 "type": "integer",
1788 "format": "int64"
1789 },
1790 "pbs": {
1791 "type": "integer",
1792 "format": "int64"
1793 },
1794 "gir": {
1795 "type": "integer",
1796 "format": "int64"
1797 },
1798 "add_bw_ind": {
1799 "$ref": "#/definitions/tech_profileInferredAdditionBWIndication"
1800 }
1801 }
1802 }
1803 }
1804}