-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.proto
More file actions
1582 lines (944 loc) · 21.2 KB
/
openapi.proto
File metadata and controls
1582 lines (944 loc) · 21.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
syntax = "proto3";
package openapi;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
message Config {
repeated Port ports = 1;
repeated Lag lags = 2;
repeated Layer1 layer1 = 3;
repeated Capture captures = 4;
repeated Device devices = 5;
repeated Flow flows = 6;
ConfigOptions options = 7;
}
message ConfigOptions {
PortOptions port_options = 1;
}
message Port {
string location = 1;
string name = 2;
}
message PortOptions {
bool location_preemption = 1;
}
message Lag {
repeated string port_names = 1;
LagProtocol protocol = 2;
DeviceEthernet ethernet = 3;
string name = 4;
}
message LagProtocol {
Choice choice = 1;
LagLacp lacp = 2;
LagStatic static = 3;
enum Choice {
LACP = 0;
STATIC = 1;
}
}
message LagStatic {
DevicePattern lag_id = 1;
}
message LagLacp {
DevicePattern actor_key = 1;
DevicePattern actor_port_number = 2;
DevicePattern actor_port_priority = 3;
DevicePattern actor_system_id = 4;
DevicePattern actor_system_priority = 5;
}
message DeviceEthernet {
DevicePattern mac = 1;
DevicePattern mtu = 2;
repeated DeviceVlan vlans = 3;
DeviceIpv4 ipv4 = 4;
DeviceIpv6 ipv6 = 5;
string name = 6;
}
message DevicePattern {
Choice choice = 1;
string value = 2;
repeated string values = 3;
DeviceCounter increment = 4;
DeviceCounter decrement = 5;
enum Choice {
VALUE = 0;
VALUES = 1;
INCREMENT = 2;
DECREMENT = 3;
}
}
message DeviceCounter {
string start = 1;
string step = 2;
}
message DeviceVlan {
DevicePattern tpid = 1;
DevicePattern priority = 2;
DevicePattern id = 3;
string name = 4;
}
message DeviceIpv4 {
DevicePattern address = 1;
DevicePattern gateway = 2;
DevicePattern prefix = 3;
DeviceBgpv4 bgpv4 = 4;
string name = 5;
}
message DeviceIpv4Loopback {
DevicePattern address = 1;
DeviceBgpv4 bgpv4 = 2;
string name = 3;
}
message DeviceBgpv4 {
DevicePattern router_id = 1;
DevicePattern as_number = 2;
As_type as_type = 3;
DevicePattern hold_time_interval = 4;
DevicePattern keep_alive_interval = 5;
DevicePattern dut_ipv4_address = 6;
DevicePattern dut_as_number = 7;
repeated DeviceBgpv4RouteRange bgpv4_route_ranges = 8;
repeated DeviceBgpv6RouteRange bgpv6_route_ranges = 9;
string name = 10;
enum As_type {
IBGP = 0;
EBGP = 1;
}
}
message DeviceBgpv4RouteRange {
int64 range_count = 1;
int64 address_count = 2;
DevicePattern address = 3;
DevicePattern address_step = 4;
DevicePattern prefix = 5;
DevicePattern next_hop_address = 6;
repeated DeviceBgpCommunity community = 7;
DeviceBgpAsPath as_path = 8;
string name = 9;
}
message DeviceBgpCommunity {
Community_type community_type = 1;
DevicePattern as_number = 2;
DevicePattern as_custom = 3;
enum Community_type {
MANUAL_AS_NUMBER = 0;
NO_EXPORT = 1;
NO_ADVERTISED = 2;
NO_EXPORT_SUBCONFED = 3;
LLGR_STALE = 4;
NO_LLGR = 5;
}
}
message DeviceBgpAsPath {
DevicePattern override_peer_as_set_mode = 1;
As_set_mode as_set_mode = 2;
repeated DeviceBgpAsPathSegment as_path_segments = 3;
enum As_set_mode {
DO_NOT_INCLUDE_LOCAL_AS = 0;
INCLUDE_AS_SEQ = 1;
INCLUDE_AS_SET = 2;
INCLUDE_AS_CONFED_SEQ = 3;
INCLUDE_AS_CONFED_SET = 4;
PREPEND_TO_FIRST_SEGMENT = 5;
}
}
message DeviceBgpAsPathSegment {
Segment_type segment_type = 1;
repeated int64 as_numbers = 2;
enum Segment_type {
AS_SEQ = 0;
AS_SET = 1;
AS_CONFED_SEQ = 2;
AS_CONFED_SET = 3;
}
}
message DeviceBgpv6RouteRange {
int64 range_count = 1;
int64 address_count = 2;
DevicePattern address = 3;
DevicePattern address_step = 4;
DevicePattern prefix = 5;
DevicePattern next_hop_address = 6;
repeated DeviceBgpCommunity community = 7;
DeviceBgpAsPath as_path = 8;
string name = 9;
}
message DeviceIpv6 {
DevicePattern address = 1;
DevicePattern gateway = 2;
DevicePattern prefix = 3;
DeviceBgpv6 bgpv6 = 4;
string name = 5;
}
message DeviceIpv6Loopback {
DevicePattern address = 1;
DeviceBgpv6 bgpv6 = 2;
string name = 3;
}
message DeviceBgpv6 {
DevicePattern router_id = 1;
DevicePattern as_number = 2;
As_type as_type = 3;
DevicePattern hold_time_interval = 4;
DevicePattern keep_alive_interval = 5;
DevicePattern dut_ipv6_address = 6;
DevicePattern dut_as_number = 7;
repeated DeviceBgpv4RouteRange bgpv4_route_ranges = 8;
repeated DeviceBgpv6RouteRange bgpv6_route_ranges = 9;
string name = 10;
enum As_type {
IBGP = 0;
EBGP = 1;
}
}
message Layer1 {
repeated string port_names = 1;
Speed speed = 2;
Media media = 3;
bool promiscuous = 4;
int64 mtu = 5;
bool ieee_media_defaults = 6;
bool auto_negotiate = 7;
Layer1AutoNegotiation auto_negotiation = 8;
Layer1FlowControl flow_control = 9;
string name = 10;
enum Speed {
SPEED_10_FD_MBPS = 0;
SPEED_10_HD_MBPS = 1;
SPEED_100_FD_MBPS = 2;
SPEED_100_HD_MBPS = 3;
SPEED_1_GBPS = 4;
SPEED_10_GBPS = 5;
SPEED_25_GBPS = 6;
SPEED_40_GBPS = 7;
SPEED_100_GBPS = 8;
SPEED_200_GBPS = 9;
SPEED_400_GBPS = 10;
}
enum Media {
COPPER = 0;
FIBER = 1;
SGMII = 2;
}
}
message Layer1AutoNegotiation {
bool advertise_1000_mbps = 1;
bool advertise_100_fd_mbps = 2;
bool advertise_100_hd_mbps = 3;
bool advertise_10_fd_mbps = 4;
bool advertise_10_hd_mbps = 5;
bool link_training = 6;
bool rs_fec = 7;
}
message Layer1FlowControl {
string directed_address = 1;
Choice choice = 2;
Layer1Ieee8021qbb ieee_802_1qbb = 3;
Layer1Ieee8023x ieee_802_3x = 4;
enum Choice {
IEEE_802_1QBB = 0;
IEEE_802_3X = 1;
}
}
message Layer1Ieee8023x {
}
message Layer1Ieee8021qbb {
int64 pfc_delay = 1;
int64 pfc_class_0 = 2;
int64 pfc_class_1 = 3;
int64 pfc_class_2 = 4;
int64 pfc_class_3 = 5;
int64 pfc_class_4 = 6;
int64 pfc_class_5 = 7;
int64 pfc_class_6 = 8;
int64 pfc_class_7 = 9;
}
message Capture {
repeated string port_names = 1;
repeated CaptureFilter filters = 2;
bool overwrite = 3;
int64 packet_size = 4;
Format format = 5;
string name = 6;
enum Format {
PCAP = 0;
PCAPNG = 1;
}
}
message CaptureFilter {
Choice choice = 1;
CaptureCustom custom = 2;
CaptureEthernet ethernet = 3;
CaptureVlan vlan = 4;
CaptureIpv4 ipv4 = 5;
enum Choice {
CUSTOM = 0;
ETHERNET = 1;
VLAN = 2;
IPV4 = 3;
}
}
message CaptureCustom {
int64 offset = 1;
string value = 2;
string mask = 3;
bool negate = 4;
}
message CaptureField {
string value = 1;
string mask = 2;
bool negate = 3;
}
message CaptureEthernet {
CaptureField src = 1;
CaptureField dst = 2;
CaptureField ether_type = 3;
CaptureField pfc_queue = 4;
}
message CaptureVlan {
CaptureField priority = 1;
CaptureField cfi = 2;
CaptureField id = 3;
CaptureField protocol = 4;
}
message CaptureIpv4 {
CaptureField version = 1;
CaptureField headeer_length = 2;
CaptureField priority = 3;
CaptureField total_length = 4;
CaptureField identification = 5;
CaptureField reserved = 6;
CaptureField dont_fragment = 7;
CaptureField more_fragments = 8;
CaptureField fragment_offset = 9;
CaptureField time_to_live = 10;
CaptureField protocol = 11;
CaptureField header_checksum = 12;
CaptureField src = 13;
CaptureField dst = 14;
}
message Device {
string container_name = 1;
int64 device_count = 2;
DeviceEthernet ethernet = 3;
DeviceIpv4Loopback ipv4_loopback = 4;
DeviceIpv6Loopback ipv6_loopback = 5;
string name = 6;
}
message Flow {
FlowTxRx tx_rx = 1;
repeated FlowHeader packet = 2;
FlowSize size = 3;
FlowRate rate = 4;
FlowDuration duration = 5;
string name = 6;
}
message FlowTxRx {
Choice choice = 1;
FlowPort port = 2;
FlowDevice device = 3;
enum Choice {
PORT = 0;
DEVICE = 1;
}
}
message FlowPort {
string tx_name = 1;
string rx_name = 2;
}
message FlowDevice {
repeated string tx_names = 1;
repeated string rx_names = 2;
}
message FlowHeader {
Choice choice = 1;
FlowCustom custom = 2;
FlowEthernet ethernet = 3;
FlowVlan vlan = 4;
FlowVxlan vxlan = 5;
FlowIpv4 ipv4 = 6;
FlowIpv6 ipv6 = 7;
FlowPfcPause pfcpause = 8;
FlowEthernetPause ethernetpause = 9;
FlowTcp tcp = 10;
FlowUdp udp = 11;
FlowGre gre = 12;
FlowGtpv1 gtpv1 = 13;
FlowGtpv2 gtpv2 = 14;
FlowArp arp = 15;
enum Choice {
CUSTOM = 0;
ETHERNET = 1;
VLAN = 2;
VXLAN = 3;
IPV4 = 4;
IPV6 = 5;
PFCPAUSE = 6;
ETHERNETPAUSE = 7;
TCP = 8;
UDP = 9;
GRE = 10;
GTPV1 = 11;
GTPV2 = 12;
ARP = 13;
}
}
message FlowCustom {
string bytes = 1;
repeated FlowBitPattern patterns = 2;
}
message FlowBitPattern {
Choice choice = 1;
FlowBitList bitlist = 2;
FlowBitCounter bitcounter = 3;
enum Choice {
BITLIST = 0;
BITCOUNTER = 1;
}
}
message FlowBitList {
int64 offset = 1;
int64 length = 2;
int64 count = 3;
repeated string values = 4;
}
message FlowBitCounter {
int64 offset = 1;
int64 length = 2;
int64 count = 3;
string start = 4;
string step = 5;
}
message FlowEthernet {
FlowPattern dst = 1;
FlowPattern src = 2;
FlowPattern ether_type = 3;
FlowPattern pfc_queue = 4;
}
message FlowPattern {
Choice choice = 1;
string value = 2;
repeated string values = 3;
FlowCounter increment = 4;
FlowCounter decrement = 5;
string metric_group = 6;
enum Choice {
VALUE = 0;
VALUES = 1;
INCREMENT = 2;
DECREMENT = 3;
}
}
message FlowCounter {
string start = 1;
string step = 2;
int64 count = 3;
}
message FlowVlan {
FlowPattern priority = 1;
FlowPattern cfi = 2;
FlowPattern id = 3;
FlowPattern protocol = 4;
}
message FlowVxlan {
FlowPattern flags = 1;
FlowPattern reserved0 = 2;
FlowPattern vni = 3;
FlowPattern reserved1 = 4;
}
message FlowIpv4 {
FlowPattern version = 1;
FlowPattern header_length = 2;
FlowIpv4Priority priority = 3;
FlowPattern total_length = 4;
FlowPattern identification = 5;
FlowPattern reserved = 6;
FlowPattern dont_fragment = 7;
FlowPattern more_fragments = 8;
FlowPattern fragment_offset = 9;
FlowPattern time_to_live = 10;
FlowPattern protocol = 11;
FlowPattern header_checksum = 12;
FlowPattern src = 13;
FlowPattern dst = 14;
}
message FlowIpv4Priority {
Choice choice = 1;
FlowPattern raw = 2;
FlowIpv4Tos tos = 3;
FlowIpv4Dscp dscp = 4;
enum Choice {
RAW = 0;
TOS = 1;
DSCP = 2;
}
}
message FlowIpv4Dscp {
FlowPattern phb = 1;
FlowPattern ecn = 2;
}
message FlowIpv4Tos {
FlowPattern precedence = 1;
FlowPattern delay = 2;
FlowPattern throughput = 3;
FlowPattern reliability = 4;
FlowPattern monetary = 5;
FlowPattern unused = 6;
}
message FlowIpv6 {
FlowPattern version = 1;
FlowPattern traffic_class = 2;
FlowPattern flow_label = 3;
FlowPattern payload_length = 4;
FlowPattern next_header = 5;
FlowPattern hop_limit = 6;
FlowPattern src = 7;
FlowPattern dst = 8;
}
message FlowPfcPause {
FlowPattern dst = 1;
FlowPattern src = 2;
FlowPattern ether_type = 3;
FlowPattern control_op_code = 4;
FlowPattern class_enable_vector = 5;
FlowPattern pause_class_0 = 6;
FlowPattern pause_class_1 = 7;
FlowPattern pause_class_2 = 8;
FlowPattern pause_class_3 = 9;
FlowPattern pause_class_4 = 10;
FlowPattern pause_class_5 = 11;
FlowPattern pause_class_6 = 12;
FlowPattern pause_class_7 = 13;
}
message FlowEthernetPause {
FlowPattern dst = 1;
FlowPattern src = 2;
FlowPattern ether_type = 3;
FlowPattern control_op_code = 4;
FlowPattern time = 5;
}
message FlowTcp {
FlowPattern src_port = 1;
FlowPattern dst_port = 2;
FlowPattern seq_num = 3;
FlowPattern ack_num = 4;
FlowPattern data_offset = 5;
FlowPattern ecn_ns = 6;
FlowPattern ecn_cwr = 7;
FlowPattern ecn_echo = 8;
FlowPattern ctl_urg = 9;
FlowPattern ctl_ack = 10;
FlowPattern ctl_psh = 11;
FlowPattern ctl_rst = 12;
FlowPattern ctl_syn = 13;
FlowPattern ctl_fin = 14;
FlowPattern window = 15;
}
message FlowUdp {
FlowPattern src_port = 1;
FlowPattern dst_port = 2;
FlowPattern length = 3;
FlowPattern checksum = 4;
}
message FlowGre {
FlowPattern checksum_present = 1;
FlowPattern key_present = 2;
FlowPattern seq_number_present = 3;
FlowPattern reserved0 = 4;
FlowPattern version = 5;
FlowPattern protocol = 6;
FlowPattern checksum = 7;
FlowPattern reserved1 = 8;
FlowPattern key = 9;
FlowPattern sequence_number = 10;
}
message FlowGtpv1 {
FlowPattern version = 1;
FlowPattern protocol_type = 2;
FlowPattern reserved = 3;
FlowPattern e_flag = 4;
FlowPattern s_flag = 5;
FlowPattern pn_flag = 6;
FlowPattern message_type = 7;
FlowPattern message_length = 8;
FlowPattern teid = 9;
FlowPattern squence_number = 10;
FlowPattern n_pdu_number = 11;
FlowPattern next_extension_header_type = 12;
repeated FlowGtpExtension extension_headers = 13;
}
message FlowGtpExtension {
FlowPattern extension_length = 1;
FlowPattern contents = 2;
FlowPattern next_extension_header = 3;
}
message FlowGtpv2 {
FlowPattern version = 1;
FlowPattern piggybacking_flag = 2;
FlowPattern teid_flag = 3;