Commit efb4530 1 parent d82874d commit efb4530 Copy full SHA for efb4530
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
#include " converter.h"
6
6
#include " ipprefix.h"
7
7
#include " swssnet.h"
8
+ #include " directory.h"
9
+ #include " vrforch.h"
8
10
9
11
using namespace std ;
10
12
using namespace swss ;
@@ -13,6 +15,7 @@ extern sai_switch_api_t* sai_switch_api;
13
15
extern sai_dtel_api_t * sai_dtel_api;
14
16
extern sai_object_id_t gVirtualRouterId ;
15
17
extern sai_object_id_t gSwitchId ;
18
+ extern Directory<Orch*> gDirectory ;
16
19
17
20
dtelEventLookup_t dTelEventLookup =
18
21
{
@@ -1152,9 +1155,14 @@ void DTelOrch::doDtelReportSessionTableTask(Consumer &consumer)
1152
1155
}
1153
1156
else if (fvField (i) == VRF)
1154
1157
{
1155
- rs_attr.id = SAI_DTEL_REPORT_SESSION_ATTR_VIRTUAL_ROUTER_ID;
1156
- /* TODO: find a way to convert vrf to oid */
1158
+ string vrf_name = fvValue (i);
1157
1159
rs_attr.value .oid = gVirtualRouterId ;
1160
+ if (vrf_name != " default" )
1161
+ {
1162
+ VRFOrch* vrf_orch = gDirectory .get <VRFOrch*>();
1163
+ rs_attr.value .oid = vrf_orch->getVRFid (vrf_name);
1164
+ }
1165
+ rs_attr.id = SAI_DTEL_REPORT_SESSION_ATTR_VIRTUAL_ROUTER_ID;
1158
1166
report_session_attr.push_back (rs_attr);
1159
1167
}
1160
1168
else if (fvField (i) == TRUNCATE_SIZE)
You can’t perform that action at this time.
0 commit comments