@@ -41,9 +41,20 @@ def config_inbandif(self, vct, inbandif_name, inband_type):
41
41
if cfg_switch_type == "voq" :
42
42
if inband_type == "port" :
43
43
dvs .runcmd (f"config interface startup { inbandif_name } " )
44
- config_db .create_entry ("VOQ_INBAND_INTERFACE" , f"{ inbandif_name } " , {"inband_type" : f"{ inband_type } " })
44
+ config_db .create_entry ("VOQ_INBAND_INTERFACE" , f"{ inbandif_name } " , {"inband_type" : f"{ inband_type } " })
45
+ else
46
+ config_db .create_entry ("VOQ_INBAND_INTERFACE" , f"{ inbandif_name } " ,
47
+ {"inband_type" : f"{ inband_type } " , "hostif_required" : "0" })
48
+
49
+ # Wait for inband Vlan to be created in SAI
50
+ state_db = dvs .get_state_db ()
51
+ result = state_db .wait_for_entry ("VLAN_TABLE" , f"{ inbandif_name } " )
52
+ assert result ["state" ] == "ok"
53
+
54
+ # Vlan type hostif is not supported in VS. So create a dummy kernel intf for inband vlan.
55
+ dvs .runcmd (f"ip link add { inbandif_name } type dummy" )
45
56
46
- def del_inbandif (self , vct , inbandif_name ):
57
+ def del_inbandif (self , vct , inbandif_name , inband_type ):
47
58
"""This function deletes existing inband interface"""
48
59
49
60
dvss = vct .dvss
@@ -58,7 +69,9 @@ def del_inbandif(self, vct, inbandif_name):
58
69
# Applicable only for line cards
59
70
if cfg_switch_type == "voq" :
60
71
config_db .delete_entry ("VOQ_INBAND_INTERFACE" , f"{ inbandif_name } " )
61
-
72
+ if inband_type == "vlan" :
73
+ dvs .runcmd (f"ip link delete { inbandif_name } " )
74
+
62
75
def test_connectivity (self , vct ):
63
76
if vct is None :
64
77
return
@@ -294,6 +307,10 @@ def do_test_chassis_system_neigh(self, vct, inband_type):
294
307
encap_index = test_neigh_entry_attrs ["SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX" ]
295
308
assert encap_index != "" and encap_index != None , "VOQ encap index is not programmed in ASIC_DB"
296
309
310
+ # Router mac is published into chassis system neigh table if inband type is vlan.
311
+ if inband_type == "vlan" :
312
+ test_neigh_mac = metatbl .get ("mac" ).upper ()
313
+
297
314
break
298
315
299
316
# Verify neighbor record syncing with encap index
@@ -470,7 +487,7 @@ def do_test_chassis_system_neigh(self, vct, inband_type):
470
487
break
471
488
472
489
# Cleanup inband if configuration
473
- self .del_inbandif (vct , inbandif_name )
490
+ self .del_inbandif (vct , inbandif_name , inband_type )
474
491
475
492
def test_chassis_system_neigh_with_inband_port (self , vct ):
476
493
"""Test neigh record create/delete and syncing to chassis app db with inband port.
0 commit comments