blob: 951d187379e3506b4cb6026f25c7e6dfdbd5dc8d [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": {
16 "operationId": "GetOlt",
17 "responses": {
18 "200": {
19 "description": "A successful response.",
20 "schema": {
21 "$ref": "#/definitions/bbsimOlt"
22 }
23 }
24 },
25 "tags": [
26 "BBSim"
27 ]
28 }
29 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -070030 "/v1/olt/flows": {
31 "get": {
32 "operationId": "GetFlows2",
33 "responses": {
34 "200": {
35 "description": "A successful response.",
36 "schema": {
37 "$ref": "#/definitions/bbsimFlows"
38 }
39 }
40 },
41 "parameters": [
42 {
43 "name": "SerialNumber",
44 "in": "query",
45 "required": false,
46 "type": "string"
47 }
48 ],
49 "tags": [
50 "BBSim"
51 ]
52 }
53 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +020054 "/v1/olt/onus": {
55 "get": {
56 "operationId": "GetONUs",
57 "responses": {
58 "200": {
59 "description": "A successful response.",
60 "schema": {
61 "$ref": "#/definitions/bbsimONUs"
62 }
63 }
64 },
65 "tags": [
66 "BBSim"
67 ]
68 }
69 },
70 "/v1/olt/onus/{SerialNumber}": {
71 "get": {
72 "operationId": "GetONU",
73 "responses": {
74 "200": {
75 "description": "A successful response.",
76 "schema": {
77 "$ref": "#/definitions/bbsimONU"
78 }
79 }
80 },
81 "parameters": [
82 {
83 "name": "SerialNumber",
84 "in": "path",
85 "required": true,
86 "type": "string"
87 }
88 ],
89 "tags": [
90 "BBSim"
91 ]
Matteo Scandolo9d08be52020-03-12 09:43:53 -070092 },
93 "delete": {
94 "operationId": "ShutdownONU",
95 "responses": {
96 "200": {
97 "description": "A successful response.",
98 "schema": {
99 "$ref": "#/definitions/bbsimResponse"
100 }
101 }
102 },
103 "parameters": [
104 {
105 "name": "SerialNumber",
106 "in": "path",
107 "required": true,
108 "type": "string"
109 }
110 ],
111 "tags": [
112 "BBSim"
113 ]
114 },
115 "post": {
116 "operationId": "PoweronONU",
117 "responses": {
118 "200": {
119 "description": "A successful response.",
120 "schema": {
121 "$ref": "#/definitions/bbsimResponse"
122 }
123 }
124 },
125 "parameters": [
126 {
127 "name": "SerialNumber",
128 "in": "path",
129 "required": true,
130 "type": "string"
131 }
132 ],
133 "tags": [
134 "BBSim"
135 ]
136 }
137 },
138 "/v1/olt/onus/{SerialNumber}/alarms/{AlarmType}/{Status}": {
139 "post": {
140 "operationId": "SetOnuAlarmIndication",
141 "responses": {
142 "200": {
143 "description": "A successful response.",
144 "schema": {
145 "$ref": "#/definitions/bbsimResponse"
146 }
147 }
148 },
149 "parameters": [
150 {
151 "name": "SerialNumber",
152 "in": "path",
153 "required": true,
154 "type": "string"
155 },
156 {
157 "name": "AlarmType",
158 "in": "path",
159 "required": true,
160 "type": "string"
161 },
162 {
163 "name": "Status",
164 "in": "path",
165 "required": true,
166 "type": "string"
167 }
168 ],
169 "tags": [
170 "BBSim"
171 ]
172 }
173 },
174 "/v1/olt/onus/{SerialNumber}/flows": {
175 "get": {
176 "operationId": "GetFlows",
177 "responses": {
178 "200": {
179 "description": "A successful response.",
180 "schema": {
181 "$ref": "#/definitions/bbsimFlows"
182 }
183 }
184 },
185 "parameters": [
186 {
187 "name": "SerialNumber",
188 "in": "path",
189 "required": true,
190 "type": "string"
191 }
192 ],
193 "tags": [
194 "BBSim"
195 ]
196 }
197 },
198 "/v1/olt/onus/{SerialNumber}/trafficschedulers": {
199 "get": {
200 "operationId": "GetOnuTrafficSchedulers",
201 "responses": {
202 "200": {
203 "description": "A successful response.",
204 "schema": {
205 "$ref": "#/definitions/bbsimONUTrafficSchedulers"
206 }
207 }
208 },
209 "parameters": [
210 {
211 "name": "SerialNumber",
212 "in": "path",
213 "required": true,
214 "type": "string"
215 }
216 ],
217 "tags": [
218 "BBSim"
219 ]
220 }
221 },
222 "/v1/olt/ports/{InterfaceType}/{InterfaceID}/alarms/los/{Status}": {
223 "post": {
224 "operationId": "SetOltAlarmIndication",
225 "responses": {
226 "200": {
227 "description": "A successful response.",
228 "schema": {
229 "$ref": "#/definitions/bbsimResponse"
230 }
231 }
232 },
233 "parameters": [
234 {
235 "name": "InterfaceType",
236 "in": "path",
237 "required": true,
238 "type": "string"
239 },
240 {
241 "name": "InterfaceID",
242 "in": "path",
243 "required": true,
244 "type": "integer",
245 "format": "int64"
246 },
247 {
248 "name": "Status",
249 "in": "path",
250 "required": true,
251 "type": "string"
252 }
253 ],
254 "tags": [
255 "BBSim"
256 ]
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200257 }
258 },
259 "/v1/olt/status": {
260 "get": {
261 "operationId": "GetOlt2",
262 "responses": {
263 "200": {
264 "description": "A successful response.",
265 "schema": {
266 "$ref": "#/definitions/bbsimOlt"
267 }
268 }
269 },
270 "tags": [
271 "BBSim"
272 ]
273 }
274 },
275 "/v1/version": {
276 "get": {
277 "operationId": "Version",
278 "responses": {
279 "200": {
280 "description": "A successful response.",
281 "schema": {
282 "$ref": "#/definitions/bbsimVersionNumber"
283 }
284 }
285 },
286 "tags": [
287 "BBSim"
288 ]
289 }
290 }
291 },
292 "definitions": {
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700293 "bbsimAlarmParameter": {
294 "type": "object",
295 "properties": {
296 "Key": {
297 "type": "string"
298 },
299 "Value": {
300 "type": "string"
301 }
302 }
303 },
304 "bbsimFlows": {
305 "type": "object",
306 "properties": {
307 "flow_count": {
308 "type": "integer",
309 "format": "int64"
310 },
311 "flows": {
312 "type": "array",
313 "items": {
314 "$ref": "#/definitions/openoltFlow"
315 }
316 }
317 }
318 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200319 "bbsimLogLevel": {
320 "type": "object",
321 "properties": {
322 "level": {
323 "type": "string"
324 },
325 "caller": {
326 "type": "boolean",
327 "format": "boolean"
328 }
329 }
330 },
331 "bbsimNNIPort": {
332 "type": "object",
333 "properties": {
334 "ID": {
335 "type": "integer",
336 "format": "int32"
337 },
338 "OperState": {
339 "type": "string"
340 }
341 }
342 },
343 "bbsimONU": {
344 "type": "object",
345 "properties": {
346 "ID": {
347 "type": "integer",
348 "format": "int32"
349 },
350 "SerialNumber": {
351 "type": "string"
352 },
353 "OperState": {
354 "type": "string"
355 },
356 "InternalState": {
357 "type": "string"
358 },
359 "PonPortID": {
360 "type": "integer",
361 "format": "int32"
362 },
363 "STag": {
364 "type": "integer",
365 "format": "int32"
366 },
367 "CTag": {
368 "type": "integer",
369 "format": "int32"
370 },
371 "HwAddress": {
372 "type": "string"
373 },
374 "PortNo": {
375 "type": "integer",
376 "format": "int32"
377 }
378 }
379 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700380 "bbsimONURequest": {
381 "type": "object",
382 "properties": {
383 "SerialNumber": {
384 "type": "string"
385 }
386 }
387 },
388 "bbsimONUTrafficSchedulers": {
389 "type": "object",
390 "properties": {
391 "traffSchedulers": {
392 "$ref": "#/definitions/tech_profileTrafficSchedulers"
393 }
394 }
395 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200396 "bbsimONUs": {
397 "type": "object",
398 "properties": {
399 "items": {
400 "type": "array",
401 "items": {
402 "$ref": "#/definitions/bbsimONU"
403 }
404 }
405 }
406 },
407 "bbsimOlt": {
408 "type": "object",
409 "properties": {
410 "ID": {
411 "type": "integer",
412 "format": "int32"
413 },
414 "SerialNumber": {
415 "type": "string"
416 },
417 "OperState": {
418 "type": "string"
419 },
420 "InternalState": {
421 "type": "string"
422 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700423 "IP": {
424 "type": "string"
425 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200426 "NNIPorts": {
427 "type": "array",
428 "items": {
429 "$ref": "#/definitions/bbsimNNIPort"
430 }
431 },
432 "PONPorts": {
433 "type": "array",
434 "items": {
435 "$ref": "#/definitions/bbsimPONPort"
436 }
437 }
438 }
439 },
440 "bbsimPONPort": {
441 "type": "object",
442 "properties": {
443 "ID": {
444 "type": "integer",
445 "format": "int32"
446 },
447 "OperState": {
448 "type": "string"
449 }
450 }
451 },
452 "bbsimResponse": {
453 "type": "object",
454 "properties": {
455 "status_code": {
456 "type": "integer",
457 "format": "int32"
458 },
459 "message": {
460 "type": "string"
461 }
462 }
463 },
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700464 "bbsimSubActionTypes": {
465 "type": "string",
466 "enum": [
467 "JOIN",
468 "LEAVE",
469 "JOINV3"
470 ],
471 "default": "JOIN"
472 },
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200473 "bbsimVersionNumber": {
474 "type": "object",
475 "properties": {
476 "version": {
477 "type": "string"
478 },
479 "buildTime": {
480 "type": "string"
481 },
482 "commitHash": {
483 "type": "string"
484 },
485 "gitStatus": {
486 "type": "string"
487 }
488 }
Matteo Scandolo9d08be52020-03-12 09:43:53 -0700489 },
490 "openoltAction": {
491 "type": "object",
492 "properties": {
493 "cmd": {
494 "$ref": "#/definitions/openoltActionCmd"
495 },
496 "o_vid": {
497 "type": "integer",
498 "format": "int64"
499 },
500 "o_pbits": {
501 "type": "integer",
502 "format": "int64"
503 },
504 "o_tpid": {
505 "type": "integer",
506 "format": "int64"
507 },
508 "i_vid": {
509 "type": "integer",
510 "format": "int64"
511 },
512 "i_pbits": {
513 "type": "integer",
514 "format": "int64"
515 },
516 "i_tpid": {
517 "type": "integer",
518 "format": "int64"
519 }
520 }
521 },
522 "openoltActionCmd": {
523 "type": "object",
524 "properties": {
525 "add_outer_tag": {
526 "type": "boolean",
527 "format": "boolean"
528 },
529 "remove_outer_tag": {
530 "type": "boolean",
531 "format": "boolean"
532 },
533 "trap_to_host": {
534 "type": "boolean",
535 "format": "boolean"
536 }
537 }
538 },
539 "openoltClassifier": {
540 "type": "object",
541 "properties": {
542 "o_tpid": {
543 "type": "integer",
544 "format": "int64"
545 },
546 "o_vid": {
547 "type": "integer",
548 "format": "int64"
549 },
550 "i_tpid": {
551 "type": "integer",
552 "format": "int64"
553 },
554 "i_vid": {
555 "type": "integer",
556 "format": "int64"
557 },
558 "o_pbits": {
559 "type": "integer",
560 "format": "int64"
561 },
562 "i_pbits": {
563 "type": "integer",
564 "format": "int64"
565 },
566 "eth_type": {
567 "type": "integer",
568 "format": "int64"
569 },
570 "dst_mac": {
571 "type": "string",
572 "format": "byte"
573 },
574 "src_mac": {
575 "type": "string",
576 "format": "byte"
577 },
578 "ip_proto": {
579 "type": "integer",
580 "format": "int64"
581 },
582 "dst_ip": {
583 "type": "integer",
584 "format": "int64"
585 },
586 "src_ip": {
587 "type": "integer",
588 "format": "int64"
589 },
590 "src_port": {
591 "type": "integer",
592 "format": "int64"
593 },
594 "dst_port": {
595 "type": "integer",
596 "format": "int64"
597 },
598 "pkt_tag_type": {
599 "type": "string"
600 }
601 }
602 },
603 "openoltFlow": {
604 "type": "object",
605 "properties": {
606 "access_intf_id": {
607 "type": "integer",
608 "format": "int32"
609 },
610 "onu_id": {
611 "type": "integer",
612 "format": "int32"
613 },
614 "uni_id": {
615 "type": "integer",
616 "format": "int32"
617 },
618 "flow_id": {
619 "type": "integer",
620 "format": "int64"
621 },
622 "flow_type": {
623 "type": "string"
624 },
625 "alloc_id": {
626 "type": "integer",
627 "format": "int32"
628 },
629 "network_intf_id": {
630 "type": "integer",
631 "format": "int32"
632 },
633 "gemport_id": {
634 "type": "integer",
635 "format": "int32"
636 },
637 "classifier": {
638 "$ref": "#/definitions/openoltClassifier"
639 },
640 "action": {
641 "$ref": "#/definitions/openoltAction"
642 },
643 "priority": {
644 "type": "integer",
645 "format": "int32"
646 },
647 "cookie": {
648 "type": "string",
649 "format": "uint64"
650 },
651 "port_no": {
652 "type": "integer",
653 "format": "int64"
654 }
655 }
656 },
657 "tech_profileAdditionalBW": {
658 "type": "string",
659 "enum": [
660 "AdditionalBW_None",
661 "AdditionalBW_NA",
662 "AdditionalBW_BestEffort",
663 "AdditionalBW_Auto"
664 ],
665 "default": "AdditionalBW_None"
666 },
667 "tech_profileDirection": {
668 "type": "string",
669 "enum": [
670 "UPSTREAM",
671 "DOWNSTREAM",
672 "BIDIRECTIONAL"
673 ],
674 "default": "UPSTREAM"
675 },
676 "tech_profileInferredAdditionBWIndication": {
677 "type": "string",
678 "enum": [
679 "InferredAdditionBWIndication_None",
680 "InferredAdditionBWIndication_Assured",
681 "InferredAdditionBWIndication_BestEffort"
682 ],
683 "default": "InferredAdditionBWIndication_None"
684 },
685 "tech_profileSchedulerConfig": {
686 "type": "object",
687 "properties": {
688 "direction": {
689 "$ref": "#/definitions/tech_profileDirection"
690 },
691 "additional_bw": {
692 "$ref": "#/definitions/tech_profileAdditionalBW"
693 },
694 "priority": {
695 "type": "integer",
696 "format": "int64"
697 },
698 "weight": {
699 "type": "integer",
700 "format": "int64"
701 },
702 "sched_policy": {
703 "$ref": "#/definitions/tech_profileSchedulingPolicy"
704 }
705 }
706 },
707 "tech_profileSchedulingPolicy": {
708 "type": "string",
709 "enum": [
710 "WRR",
711 "StrictPriority",
712 "Hybrid"
713 ],
714 "default": "WRR"
715 },
716 "tech_profileTrafficScheduler": {
717 "type": "object",
718 "properties": {
719 "direction": {
720 "$ref": "#/definitions/tech_profileDirection"
721 },
722 "alloc_id": {
723 "type": "integer",
724 "format": "int64"
725 },
726 "scheduler": {
727 "$ref": "#/definitions/tech_profileSchedulerConfig"
728 },
729 "traffic_shaping_info": {
730 "$ref": "#/definitions/tech_profileTrafficShapingInfo"
731 }
732 }
733 },
734 "tech_profileTrafficSchedulers": {
735 "type": "object",
736 "properties": {
737 "intf_id": {
738 "type": "integer",
739 "format": "int64"
740 },
741 "onu_id": {
742 "type": "integer",
743 "format": "int64"
744 },
745 "uni_id": {
746 "type": "integer",
747 "format": "int64"
748 },
749 "port_no": {
750 "type": "integer",
751 "format": "int64"
752 },
753 "traffic_scheds": {
754 "type": "array",
755 "items": {
756 "$ref": "#/definitions/tech_profileTrafficScheduler"
757 }
758 }
759 }
760 },
761 "tech_profileTrafficShapingInfo": {
762 "type": "object",
763 "properties": {
764 "cir": {
765 "type": "integer",
766 "format": "int64"
767 },
768 "cbs": {
769 "type": "integer",
770 "format": "int64"
771 },
772 "pir": {
773 "type": "integer",
774 "format": "int64"
775 },
776 "pbs": {
777 "type": "integer",
778 "format": "int64"
779 },
780 "gir": {
781 "type": "integer",
782 "format": "int64"
783 },
784 "add_bw_ind": {
785 "$ref": "#/definitions/tech_profileInferredAdditionBWIndication"
786 }
787 }
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200788 }
789 }
790}