-
Notifications
You must be signed in to change notification settings - Fork 390
/
agent.sandesh
1997 lines (1794 loc) · 43.3 KB
/
agent.sandesh
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
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/**
* Message definitions for oper module
*
* The Oper-DB module holds operational state of different objects in Agent.
* operational state processes the configuration and creates different tables
* appropriate for agent.
*
* Some of the important tables in Oper-DB are:
* Virtual-Network: Table of all virtual networks with uuid as key.
* Vrf: Vrf table entries represent routing instance for a vrf.
* Virtual-machine: Table stores all virtual-machines spawned on the compute node.
* Interface: Table containing all interfaces in agent.
* Other Tables for routes, nexthops, mpls label, multicast routes, vxlan
*
*/
/**
* Max no of sandesh connections allowed
*/
enum AgentConsts {
MAX_SANDESH_COUNT = 256
}
/**
* Request for oper table
*/
request sandesh PageReq {
1: string key;
}
/**
* Sandesh definition for oper table entries in agent introspect
*/
struct PageReqData {
1: string prev_page (link="PageReq");
2: string next_page (link="PageReq");
3: string first_page (link="PageReq");
4: string all (link="PageReq");
5: u32 table_size;
6: string entries;
}
/**
* Response message fetching oper table entries
*/
response sandesh Pagination {
1: PageReqData req;
}
/**
* Sandesh definition for vlan entry in oper db
*/
struct ServiceVlanSandeshList {
1: i16 tag;
2: string vrf_name (link="VrfListReq"); // VRF name
3: string ip_addr;
6: string ip6_addr;
4: i16 label;
5: string installed;
7: string v4_route_installed;
8: string v6_route_installed;
}
/**
* Sandesh definition for floatingip entry in oper db
*/
struct FloatingIpSandeshList {
1: string ip_addr;
2: string vrf_name (link="VrfListReq"); // VRF name
3: string installed;
4: string fixed_ip;
}
/**
* Sandesh defenition for static route entry in oper db
*/
struct StaticRouteSandesh {
1: string vrf_name (link="VrfListReq"); // VRF name
2: string ip_addr;
3: i32 prefix;
4: optional string mac_addr;
5: optional list<string> communities;
}
/**
* Sandesh definition for security group list on interface
*/
struct VmIntfSgUuid {
1: string sg_uuid (link="SgListReq");
}
/**
* Sandesh defenition for interface in oper db
*/
struct ItfSandeshData {
1: i32 index;
2: string name; // interface name
3: string uuid; // intf uuid
4: string vrf_name (link="VrfListReq"); // VRF name
5: string active;
6: string dhcp_service;
7: string dns_service;
8: string type; // interface type : eth / vport / host
9: i32 label; // interface mpls label
10: string vn_name (link="VnListReq"); // VN uuid
11: string vm_uuid (link="VmListReq"); // VM uuid, in case of vport itf
12: string vm_name;
13: string ip_addr; // interface ip address
14: string mac_addr; // interface mac address
15: string policy; // policy enabled?
16: list<FloatingIpSandeshList> fip_list;// Floating IP List
17: string mdata_ip_addr;// meta-data ip address for interface
18: list<ServiceVlanSandeshList> service_vlan_list;// Service VLAN List
19: i32 os_ifindex;
20: string fabric_port;
21: string alloc_linklocal_ip;
22: string analyzer_name;
23: string config_name;
24: list<VmIntfSgUuid> sg_uuid_list;
25: i32 l2_label;
26: i32 vxlan_id;
27: list<StaticRouteSandesh> static_route_list; //Static route list
28: string l2_active;
30: string vm_project_uuid; // project uuid of the vm to which the interface belongs
31: string admin_state;
32: i32 flow_key_idx;
33: optional list<StaticRouteSandesh> allowed_address_pair_list;
34: optional string ip6_addr;
35: optional string ip6_active;
36: i32 local_preference;
37: i16 tx_vlan_id;
38: i16 rx_vlan_id;
39: string parent_interface;
40: optional string subnet;
41: optional string sub_type;
42: optional string vrf_assign_acl_uuid (link="AclReq"); //VRF assign acl
43: optional string vmi_type;
44: string transport;
45: string logical_interface_uuid;
46: optional bool flood_unknown_unicast;
47: string physical_device;
48: string physical_interface;
49: optional string ipv4_active;
50: list<string> fixed_ip4_list;
51: list<string> fixed_ip6_list;
52: list<string> fat_flow_list;
53: optional string health_check_active;
54: optional string metadata_ip_active;
55: optional string service_health_check_ip;
}
/**
* Sandesh defenition for vn ipam in oper db
*/
struct VnIpamData {
1: string ip_prefix;
2: i32 prefix_len;
3: string gateway;
4: string ipam_name;
5: string dhcp_enable;
6: string dns_server;
}
/**
* Sandesh defenition for vn ipam host routes
*/
struct VnIpamHostRoutes {
1: string ipam_name;
2: list<string> host_routes;
}
/**
* Sandesh defenition for virtual network in oper db
*/
struct VnSandeshData {
1: string name; // vn name
2: string uuid; // vn uuid
3: string acl_uuid (link="AclReq"); // acl uuid
4: string mirror_acl_uuid (link="AclReq"); // mirror acl uuid
5: string mirror_cfg_acl_uuid (link="AclReq"); // mirror cfg acl uuid
6: string vrf_name (link="VrfListReq"); // VRF name
7: list<VnIpamData> ipam_data;
8: list<VnIpamHostRoutes> ipam_host_routes;
9: bool layer2_forwarding;
10: bool ipv4_forwarding;
11: bool admin_state;
12: i32 vxlan_id;
13: i32 config_vxlan_id;
14: i32 vn_id;
15: bool enable_rpf;
16: bool bridging;
17: bool flood_unknown_unicast;
}
/**
* Sandesh defenition for security group
*/
struct SgSandeshData {
1: i32 ref_count;
2: i32 sg_id;
3: string sg_uuid;
4: string acl_uuid (link="AclReq");
5: string egress_acl_uuid (link="AclReq");
6: string ingress_acl_uuid (link="AclReq");
}
/**
* Sandesh defenition for security group list for vm
*/
struct VmSgUuid {
1: string sg_uuid (link="SgListReq");
}
/**
* Sandesh defenition for virtual machine in oper db
*/
struct VmSandeshData {
1: string uuid; // VM uuid
2: optional list<VmSgUuid> sg_uuid_list;
}
/**
* Sandesh defenition for multicast route in oper db
*/
struct McastData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional i32 label;
5: optional string itf (link="ItfReq");
6: optional i16 vlan_tag
}
/**
* Sandesh definition for FabricComposite next hop in oper db
*/
struct FabricCompositeData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional list <McastData> mc_list; //Multicast sub nh list
}
/**
* Sandesh definition for L2Composite next hop in oper db
*/
struct L2CompositeData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional FabricCompositeData fabric_comp; //Multicast sub nh list
5: optional list <McastData> mc_list; //Multicast sub nh list
}
/**
* Sandesh definition for L3Composite next hop in oper db
*/
struct L3CompositeData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional FabricCompositeData fabric_comp; //Multicast sub nh list
5: optional list <McastData> mc_list; //Multicast sub nh list
}
/**
* Sandesh definition for MulticastComposite next hop in oper db
*/
struct MulticastCompositeData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional list <McastData> mc_list; //Multicast sub nh list
}
/**
* Sandesh definition for MulticastFamilyComposite next hop in oper db
*/
struct MulticastFamilyCompositeData {
1: string type;
2: optional string sip;
3: optional string dip;
4: optional MulticastCompositeData fabric_comp; //Multicast sub nh list
5: optional MulticastCompositeData evpn_comp; //Multicast sub nh list
6: optional MulticastCompositeData interface_comp; //Multicast sub nh list
}
/**
* Sandesh definition for next hop in oper db
*/
struct NhSandeshData {
1: string type; // type : tunnel / interface / ...
2: i32 ref_count; // count of NH references
3: optional string valid; // Is Nexthop valid ???
4: optional string policy; // Policy enabled/disabled
5: optional string sip; // source IP, in case of tunnel NH
6: optional string dip; // dest IP, in case of tunnel NH
7: optional string vrf (link="VrfListReq"); // VRF, in case of tunnel NH
8: optional string itf (link="ItfReq"); // interface name, in case of itf NH
9: optional string mac; // mac, in case of itf NH
10: optional i32 sport; // Source port for Mirror NH
11: optional i32 dport; // Destination port for Mirror NH
12: optional string mcast; // Is multicast nh or not
13: optional i32 label;
14: optional list <McastData> mc_list; //Multicast sub nh list
15: optional i16 vlan_tag; // VLAN Tag for the interface
16: optional string tunnel_type; // Tunnel type : MPLSoGRE, MPLSoUDP, ...
17: optional string local_ecmp; //Is Nexthop for local ecmp
18: optional FabricCompositeData fabric_comp; //Multicast sub nh list
19: optional L2CompositeData l2_comp; //Multicast sub nh list
20: optional L3CompositeData l3_comp; //Multicast sub nh list
21: i32 nh_index;
22: optional MulticastCompositeData interface_comp; //Multicast sub nh list
23: optional MulticastCompositeData evpn_comp; //Multicast sub nh list
24: optional bool vxlan_flag;
25: optional bool flood_unknown_unicast;
}
/**
* Sandesh definition for NamespaceState in oper db
*/
struct NamespaceStateSandeshData {
1: i32 pid;
2: i32 status;
3: string cmd;
4: i32 status_type;
5: optional string errors;
}
/**
* Sandesh definition for PathPreference
*/
struct PathPreferenceSandeshData {
1: i32 sequence;
2: i32 preference;
3: bool ecmp;
4: bool wait_for_traffic;
5: optional string dependent_ip;
}
/**
* Sandesh definition for Path
*/
struct PathSandeshData {
1: NhSandeshData nh; // next hop info
2: i32 label; // mpls label
3: i32 vxlan_id; // VN ID/VXLAN
4: string peer; // peer originating the path
5: list<string> dest_vn_list (link="VnListReq"); // destination VN list
6: string unresolved; // true or false
7: optional string gw_ip; // GW IP
8: optional string vrf (link="VrfListReq"); // Vrf
10: optional list<i32> sg_list;
11: string supported_tunnel_type;
12: string active_tunnel_type;
13: bool stale;
14: optional PathPreferenceSandeshData path_preference_data;
15: optional string info;
16: optional i32 active_label;
17: optional string flood_dhcp;
18: optional string vm_name;
19: optional bool ecmp_suppressed;
20: optional string ecmp_hashing_fields;
21: optional list<string> communities;
}
/**
* Sandesh definition for unicast route in oper db
*/
struct RouteUcSandeshData {
1: string src_ip; // IP addr
2: i32 src_plen; // prefix length
3: string src_vrf (link="VrfListReq"); // VRF
4: list<PathSandeshData> path_list; // paths
5: optional bool ipam_subnet_route; // associated IPAM subnet
6: optional bool proxy_arp; // Proxy ARP
7: bool multicast;
}
/**
* Sandesh definition for multicast route in oper db
*/
struct RouteMcSandeshData {
1: string src; // S
2: string grp; // G
3: NhSandeshData nh; // The NH
}
/**
* Sandesh definition for L2 route in oper db
*/
struct RouteL2SandeshData {
1: string mac; // MAC addr
2: string src_vrf (link="VrfListReq"); // VRF
4: list<PathSandeshData> path_list; // paths
}
/**
* Sandesh definition for evpn route in oper db
*/
struct RouteEvpnSandeshData {
1: string mac; // MAC addr
2: string src_vrf (link="VrfListReq"); // VRF
3: string ip_addr;
4: list<PathSandeshData> path_list; // paths
}
/**
* Sandesh definition for Vrf in oper db
*/
struct VrfSandeshData {
1: string name; // VRF name
2: i32 ucindex (link="Inet4UcRouteReq"); // VRF Index INET4 UC Table
3: i32 mcindex (link="Inet4McRouteReq"); // VRF Index INET4 MC Table
4: i32 l2index (link="Layer2RouteReq"); // VRF Index L2 Table, DEPRECATED
5: string source; // config or gateway
6: i32 uc6index (link="Inet6UcRouteReq"); // VRF Index INET6 UC Table
7: string vn (link="VnListReq"); // VN-Name
8: i32 table_label; //Label for route lookup on this vrf
9: i32 vxlan_id; // VRF Label used for the VRF
10: i32 evpnindex (link="EvpnRouteReq"); // VRF Index evpn Table
11: i32 brindex (link="BridgeRouteReq"); // VRF Index L2 Table
}
/**
* Sandesh definition for mpls label in oper db
*/
struct MplsSandeshData {
1: i32 label; // mpls label
2: string type; // type - invalid or vport_nh or mcast_nh
3: NhSandeshData nh; // next hop info
}
/**
* Sandesh definition for mirror packet
*/
struct MirrorEntrySandeshData {
1: i32 ref_count; // count of Flow's referring to Mirror entry
2: string analyzer_name; // Analyzer name
3: optional string sip; // source IP
4: optional string dip; // dest IP of Analytics server
5: optional string vrf (link="VrfListReq"); // VRF
6: optional i32 sport; // Source port for Mirror NH
7: optional i32 dport; // Destination port for Mirror NH
8: NhSandeshData nh; // next hop info
}
/**
* Request message for agent init state
*/
request sandesh AgentInitStateReq {
}
/**
* Response message for agent init state
*/
response sandesh AgentInitState {
1: string state; // Agent's state
}
/**
* Sandessh definition for security group log
*/
struct SgObjectLogInfo {
1: string event;
2: string uuid;
3: u32 id;
4: string acl_uuid;
5: u32 ref_count;
6: string egress_acl_uuid;
7: string ingress_acl_uuid;
}
/**
* @description: Trace message for security group object
* @type: Trace
* @severity: DEBUG
* @object: SgEntry
*/
objectlog sandesh SgObjectLog {
1: SgObjectLogInfo sg;
}
/**
* @description: Trace log for security group object in vrouter-agent oper DB
* @type: Trace
* @severity: DEBUG
* @object: SgEntry
*/
traceobject sandesh SgObjectTrace {
1: SgObjectLogInfo sg;
}
/**
* Request message for security group request
*/
request sandesh SgListReq {
1: string name;
}
/**
* Response message for security group list from oper db
*/
response sandesh SgListResp {
1: list<SgSandeshData> sg_list;
}
/**
* Request message for virtual network list from oper db
*/
request sandesh VnListReq {
1: string name; // send data for given name substring
2: string uuid;
3: string vxlan_id;
4: string ipam_name;
}
/**
* Response message for virtual network list
*/
response sandesh VnListResp {
1: list<VnSandeshData> vn_list;
}
/**
* Request message for virtual machine list from oper db
*/
request sandesh VmListReq {
1: string uuid; // send data for given name substring
}
/**
* Response message for virtual machine list
*/
response sandesh VmListResp {
1: list<VmSandeshData> vm_list;
}
/**
* Request message for next hop list from oper db
*/
request sandesh NhListReq {
1: string type;
2: string nh_index;
3: string policy_enabled;
}
/**
* Response message for virtual nh list
*/
response sandesh NhListResp {
1: list<NhSandeshData> nh_list;
}
/**
* Request message for vrf list from oper db
*/
request sandesh VrfListReq {
1: string name; // send data for given name substring
}
/**
* Response message for vrf list
*/
response sandesh VrfListResp {
1: list<VrfSandeshData> vrf_list;
}
/**
* Request message for Inet4 Unicast routes from oper db
*/
request sandesh Inet4UcRouteReq {
1: i32 vrf_index = 0; // send route entries for the VRF index
2: string src_ip;
3: u16 prefix_len;
4: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for Inet4 Unicast routes
*/
response sandesh Inet4UcRouteResp {
1: list<RouteUcSandeshData> route_list; // routes
}
/**
* Request message for Inet6 Unicast routes from oper db
*/
request sandesh Inet6UcRouteReq {
1: i32 vrf_index = 0; // send route entries for the VRF index
2: string src_ip;
3: u16 prefix_len;
4: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for Inet6 Unicast routes
*/
response sandesh Inet6UcRouteResp {
1: list<RouteUcSandeshData> route_list; // routes
}
/**
* Request message for Inet4 multicast routes from oper db
*/
request sandesh Inet4McRouteReq {
1: i32 vrf_index = 0; // send route entries for the VRF index
2: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for Inet4 multicast routes
*/
response sandesh Inet4McRouteResp {
1: list<RouteMcSandeshData> route_list; // routes
}
/**
* Request message for L2 routes from oper db
*/
request sandesh Layer2RouteReq {
1: i32 vrf_index = 0;
2: string mac;
3: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for L2 routes
*/
response sandesh Layer2RouteResp {
1: list<RouteL2SandeshData> route_list; // routes
}
/**
* Request message for bridge routes from oper db
*/
request sandesh BridgeRouteReq {
1: i32 vrf_index = 0;
2: string mac;
3: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for bridge routes
*/
response sandesh BridgeRouteResp {
1: list<RouteL2SandeshData> route_list; // routes
}
/**
* Request message for evpn routes from oper db
*/
request sandesh EvpnRouteReq {
1: i32 vrf_index = 0;
2: string mac;
3: bool stale = 0; // Display stale entries only if set
}
/**
* Response message for evpn routes
*/
response sandesh EvpnRouteResp {
1: list<RouteEvpnSandeshData> route_list; // routes
}
/**
* Request message for interface details from oper db
*/
request sandesh ItfReq {
1: string name;
2: string type;
3: string uuid;
4: string vn;
5: string mac;
6: string ipv4_address;
7: string ipv6_address;
8: string parent_uuid;
9: string ip_active;
10: string ip6_active;
11: string l2_active;
}
/**
* Response message for interface details
*/
response sandesh ItfResp {
1: list<ItfSandeshData> itf_list;
}
/**
* Request message for mpls label list from oper db
*/
request sandesh MplsReq {
1: string type;
2: string label;
}
/**
* Response message for mpls label
*/
response sandesh MplsResp {
1: list<MplsSandeshData> mpls_list;
}
/**
* Sandesh definition for vrf assignment
*/
struct VrfAssignSandeshData {
1: string type;
2: u16 vlan_tag;
3: string itf (link="ItfReq"); // interface name
4: string vrf (link="VrfListReq"); // VRF
}
/**
* Request message for vrf assignment list
*/
request sandesh VrfAssignReq {
1: string uuid; // send data for given interface
}
/**
* Response message for vrf assignment
*/
response sandesh VrfAssignResp {
1: list<VrfAssignSandeshData> vrf_assign_list;
}
/**
* Request message for miror entry
*/
request sandesh MirrorEntryReq {
1: string analyzer_name;
}
/**
* Response message for miror entry
*/
response sandesh MirrorEntryResp {
1: list<MirrorEntrySandeshData> mirror_entry_list;
}
/**
* Response message for invalid input
*/
response sandesh ErrorResp {
1: string resp = " Invalid Input !!! ";
}
/**
* Request message for LinkLocalServiceInfo
*/
request sandesh LinkLocalServiceInfo {
}
/**
* Sandesh definition for Link Local Service
*/
struct LinkLocalServiceData {
1: string linklocal_service_name;
2: string linklocal_service_ip;
3: i32 linklocal_service_port;
4: string ipfabric_dns_name;
5: list<string> ipfabric_ip;
6: i32 ipfabric_port;
}
/**
* Response message for LinkLocalServiceInfo
*/
response sandesh LinkLocalServiceResponse {
1: list<LinkLocalServiceData> service_list;
}
/**
* Sandesh range for acl properties like protocol, port
*/
struct SandeshRange {
1: i32 min;
2: i32 max;
}
/**
* Sandesh definition of acl action string
*/
struct ActionStr {
1: string action;
}
/**
* Sandesh definition for acl action
*/
struct AclAction {
1: string acl_id;
// 2: bool sg;
3: list<ActionStr> action_l;
4: string acl_type;
}
/**
* Id for AclEntry
*/
struct AceId {
1: i32 id;
}
/**
* Sandesh definition for AclEntry
*/
struct AclEntrySandeshData {
1: string ace_id;
2: string rule_type;
3: string src;
4: string dst;
5: list <SandeshRange> src_port_l;
6: list <SandeshRange> dst_port_l;
7: list <SandeshRange> proto_l;
8: list <ActionStr> action_l;
9: string src_type;
10: string dst_type;
11: string uuid;
}
/**
* Sandesh definition for flow
*/
struct FlowSandeshData {
1: list <AceId> ace_l;
// Flow Key
2: string vrf;
3: string src;
4: string dst;
5: i32 src_port;
6: i32 dst_port;
7: i16 protocol;
// Flow Data
8: bool ingress;
9: list <ActionStr> action_l;
10: list <AclAction> acl_action_l;
11: string flow_uuid;
12: string flow_handle;
13: string dest_vrf;
14: string source_vn;
15: string dest_vn;
16: list<u32> source_sg_id_l;
17: list<u32> dest_sg_id_l;
18: string bytes;
19: string packets;
20: string setup_time;
21: string current_time;
22: string teardown_time;
23: string reverse_flow;
24: string nat;
25: string implicit_deny;
26: optional string short_flow;
27: optional u64 setup_time_utc;
28: bool l3_flow;
29: string smac;
30: string dmac;
31: list<string> source_vn_list;
32: list<string> dest_vn_list;
}
/**
* Sandesh definition for vxlan
*/
struct VxLanSandeshData {
1: i32 vxlan_id; // vxlan label
2: NhSandeshData nh; // next hop info
3: optional string vrf_name; // vrf name from nh
}
/**
* Sandesh definition for ServiceInstance
*/
struct ServiceInstanceSandeshData {
1: string uuid;
2: string service_type;
3: string virtualization_type;
4: string instance_id;
5: string vmi_inside;
6: string vmi_outside;
7: NamespaceStateSandeshData ns_state; // NamespaceState
}
/**
* acl entry and associated flow count definition
*/
struct AceIdFlowCnt {
1: i32 ace_id;
2: i32 flow_cnt;
}
/**
* Sandesh definition for Acl
*/
struct AclSandeshData {
1: string uuid (link="AclFlowReq");
2: bool dynamic_acl;
3: list<AclEntrySandeshData> entries;
4: string name;
}
/**
* Request Acl object with given uuid
*/
request sandesh AclReq {
1: string uuid;
}
/**
* Response for Acl list
*/
response sandesh AclResp {
1: list<AclSandeshData> acl_list;
}
/**
* Request message for flow_entries per acl
*/
request sandesh AclFlowReq {
1: string uuid;
}
/**
* Request message for next flow_entry with iteration_key
*/
request sandesh NextAclFlowReq {
1: string iteration_key;
}
/**
* Response message for flow_entry for an acl
*/
response sandesh AclFlowResp {
1: i32 flow_count;
2: i32 flow_miss;
3: list <FlowSandeshData> flow_entries;
4: string iteration_key (link="NextAclFlowReq");
}
/**
* Get flow count for an acl with given uuid
*/
request sandesh AclFlowCountReq {
1: string uuid;
}
/**
* Get next flow entry for an acl with given iteration_key
*/
request sandesh NextAclFlowCountReq {
1: string iteration_key;
}
/**
* Response message for flow count for an acl
*/
response sandesh AclFlowCountResp {
1: i32 flow_count;
2: i32 flow_miss;
3: list<AceIdFlowCnt> aceid_cnt_list;
4: string iteration_key (link="NextAclFlowCountReq");
}
// ACL Traces
/**
* @description: Trace message for acl error
* @type: Trace
* @severity: DEBUG
*/
trace sandesh AclErr {
1: string err;
}
/**
* @description: Trace message for acl info
* @type: Trace
* @severity: DEBUG
*/
trace sandesh AclInfo {
1: string str;
}
/**
* @description: Trace message for acl statistics
* @type: Trace
* @severity: DEBUG
*/
traceobject sandesh AclAclTrace {
1: string info;
2: string uuid;
3: AclSandeshData acl;
}