Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Mar 7, 2024
1 parent f9e15da commit e1d95f8
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 2 deletions.
4 changes: 4 additions & 0 deletions dash-pipeline/tests/libsai/vnet_out/vnet_out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ int main(int argc, char **argv)
attr.value.booldata = true;
attrs.push_back(attr);

attr.id = SAI_ENI_ATTR_HA_SCOPE_ID;
attr.value.oid = SAI_NULL_OBJECT_ID;
attrs.push_back(attr);

attr.id = SAI_ENI_ATTR_VM_UNDERLAY_DIP;
sai_ip_addr_t u_dip_addr = {.ip4 = 0x010310ac};
sai_ip_address_t u_dip = {.addr_family = SAI_IP_ADDR_FAMILY_IPV4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_sai_thrift_create_eni(saithrift_client):
eni = sai_thrift_create_eni(saithrift_client, cps=10000,
pps=100000, flows=100000,
admin_state=True,
ha_scope_id=0,
vm_underlay_dip=vm_underlay_dip,
vm_vni=9,
vnet_id=vnet,
Expand Down
1 change: 1 addition & 0 deletions test/test-cases/functional/ptf/sai_dash_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def eni_create(self, **kwargs):
"pps": 100000,
"flows": 100000,
"admin_state": True,
"ha_scope_id": 0,
"vm_underlay_dip": sai_ipaddress("0.0.0.0"),
"vm_vni": 1,
"vnet_id": 1,
Expand Down
1 change: 1 addition & 0 deletions test/test-cases/functional/ptf/saidashacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def setUpSwitch(self):
self.eni = self.create_obj(sai_thrift_create_eni, sai_thrift_remove_eni, cps=10000,
pps=100000, flows=100000,
admin_state=True,
ha_scope_id=0,
vm_underlay_dip=vm_underlay_dip,
vm_vni=9,
vnet_id=self.vnet,
Expand Down
1 change: 1 addition & 0 deletions test/test-cases/functional/ptf/saidashvnet_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def configureVnet(self):
self.eni = sai_thrift_create_eni(self.client, cps=10000,
pps=100000, flows=100000,
admin_state=True,
ha_scope_id=0,
vm_underlay_dip=vm_underlay_dip,
vm_vni=9,
vnet_id=self.vnet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", ENI_VTEP_IP,
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down Expand Up @@ -137,6 +138,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", NETWORK_VTEP_IP,
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down Expand Up @@ -179,6 +181,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", NETWORK_VTEP_IP,
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
ENI_VTEP_IP,
"SAI_ENI_ATTR_VM_VNI",
Expand Down Expand Up @@ -180,6 +182,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
NETWORK_VTEP_IP,
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", "221.0.1.11",
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down Expand Up @@ -111,6 +112,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", "221.0.2.101",
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def test_vnet_eni_create(self, dpu):
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.10.1.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def test_vnet_inbound_routing_entry_create_setup(self, dpu):
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.10.2.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def test_vnet_outbound_routing_entry_create(self, dpu):
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.10.9.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def make_create_commands(self):
'SAI_ENI_ATTR_PL_SIP', '2001:0db8:85a3:0000:0000:8a2e:0370:7334', 'SAI_ENI_ATTR_PL_SIP_MASK',
'2001:0db8:85a3:0000:0000:0000:0000:0000', 'SAI_ENI_ATTR_PL_UNDERLAY_SIP', '10.0.0.18',
"SAI_ENI_ATTR_DASH_TUNNEL_DSCP_MODE", "SAI_DASH_TUNNEL_DSCP_MODE_PRESERVE_MODEL", "SAI_ENI_ATTR_DSCP", "0",
"SAI_ENI_ATTR_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION", "False"])
"SAI_ENI_ATTR_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION", "False", "SAI_ENI_ATTR_HA_SCOPE_ID", "0"])

ret = add_extra_attrs('SAI_OBJECT_TYPE_OUTBOUND_CA_TO_PA_ENTRY', ret, [ 'SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_METER_CLASS', '0',
'SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_METER_CLASS_OVERRIDE', 'True' ])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"221.0.1.1",
"SAI_ENI_ATTR_VM_VNI",
Expand Down Expand Up @@ -164,6 +166,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"221.0.1.2",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
2 changes: 1 addition & 1 deletion test/test-cases/scale/saic/test_sai_vnet_outbound_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def make_create_vnet_config(self):
'SAI_ENI_ATTR_PL_SIP', '2001:0db8:85a3:0000:0000:8a2e:0370:7334', 'SAI_ENI_ATTR_PL_SIP_MASK',
'2001:0db8:85a3:0000:0000:0000:0000:0000', 'SAI_ENI_ATTR_PL_UNDERLAY_SIP', '10.0.0.18',
"SAI_ENI_ATTR_DASH_TUNNEL_DSCP_MODE", "SAI_DASH_TUNNEL_DSCP_MODE_PRESERVE_MODEL", "SAI_ENI_ATTR_DSCP", "0",
"SAI_ENI_ATTR_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION", "False"])
"SAI_ENI_ATTR_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION", "False", "SAI_ENI_ATTR_HA_SCOPE_ID", "0"])

ret = add_extra_attrs('SAI_OBJECT_TYPE_OUTBOUND_CA_TO_PA_ENTRY', ret, [ 'SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_METER_CLASS', '0',
'SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_METER_CLASS_OVERRIDE', 'True' ])
Expand Down
2 changes: 2 additions & 0 deletions test/test-cases/scale/saic/vnet_inbound_setup_commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"True",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.10.2.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", "172.16.1.1",
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet_#4",
Expand Down Expand Up @@ -148,6 +149,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", "172.16.2.1",
"SAI_ENI_ATTR_VM_VNI", "10",
"SAI_ENI_ATTR_VNET_ID", "$vnet_#5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"SAI_ENI_ATTR_PPS", "100000",
"SAI_ENI_ATTR_FLOWS", "100000",
"SAI_ENI_ATTR_ADMIN_STATE", "True",
"SAI_ENI_ATTR_HA_SCOPE_ID", "0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP", "172.16.1.1",
"SAI_ENI_ATTR_VM_VNI", "9",
"SAI_ENI_ATTR_VNET_ID", "$vnet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"172.16.1.1",
"SAI_ENI_ATTR_VM_VNI",
Expand Down Expand Up @@ -203,6 +205,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.10.2.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down Expand Up @@ -280,6 +284,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"10.11.1.10",
"SAI_ENI_ATTR_VM_VNI",
Expand Down Expand Up @@ -357,6 +363,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"170.16.1.1",
"SAI_ENI_ATTR_VM_VNI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"100000",
"SAI_ENI_ATTR_ADMIN_STATE",
"True",
"SAI_ENI_ATTR_HA_SCOPE_ID",
"0",
"SAI_ENI_ATTR_VM_UNDERLAY_DIP",
"172.16.1.1",
"SAI_ENI_ATTR_VM_VNI",
Expand Down

0 comments on commit e1d95f8

Please sign in to comment.