-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[HA] [smartswitch] add ha steady traffic test with PL config #22161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
465d498
add the ha test with PL config traffic
aronovic 0a2cedd
fix review items, flake8 issues
aronovic efe12f8
fix the PR review comments
aronovic 192a8c3
removed the cross dependency error
aronovic c8c957d
update dash_utils import
aronovic 935c528
cleanup conftest file
aronovic b905437
update ha fixture names
aronovic c3a96a6
Merge branch 'master' into ha_dash_pl_traffic
aronovic 8771a45
fix the merge with master issues
aronovic 98b097d
move the duplicate arguments in the common conftest
aronovic 4753229
remove this test file that is not needed
aronovic 78f59e4
change scope for some fixtures to insure correct execution order
aronovic 1698bd7
fix flake8 issue in conftest
aronovic b3fdb8f
rename the test
aronovic 4467385
skip the ha tests on anything but smartswitch platforms
aronovic 107ebd0
fix a PR comment
aronovic 48e14d6
Merge branch 'master' into ha_dash_pl_traffic
aronovic 1a5a20e
fixes after merge with latest master
aronovic 3623e01
fix PR sanity error
aronovic 86b2ea8
HA activation needs to be function scope and not module
aronovic c99a7a9
adding back the session fixtures that are needed
aronovic bc01a09
fix test failures
aronovic f7199f1
run ha tests only in HA topology
aronovic 9540719
Merge branch 'sonic-net:master' into ha_dash_pl_traffic
aronovic f363f3a
Merge branch 'sonic-net:master' into ha_dash_pl_traffic
aronovic e709e62
Merge branch 'sonic-net:master' into ha_dash_pl_traffic
aronovic 26900e0
dpu_data_port_ip not used in HA topoology
aronovic 1a03f65
remove unused variables
aronovic 4c57956
update the DPU setup after the new DPU image changes
aronovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| from dash_api.eni_pb2 import State | ||
| from dash_api.route_type_pb2 import ActionType, EncapType, RoutingType | ||
| from dash_api.types_pb2 import IpVersion | ||
|
|
||
| VNET = "vnet" | ||
| VNET_ENCAP = "vnet_encap" | ||
| VNET_DIRECT = "vnet_direct" | ||
| PRIVATELINK = "privatelink" | ||
| DECAP = "decap" | ||
|
|
||
| APPLIANCE_VIP = "3.2.1.0" | ||
| VM1_PA = "25.1.1.1" # VM host physical address | ||
| VM1_CA = "10.0.0.11" # VM customer address | ||
| VM_CA_SUBNET = "10.0.0.0/16" | ||
| PE_PA = "101.1.2.3" # private endpoint physical address | ||
| PE_CA = "10.2.0.100" # private endpoint customer address | ||
| PE_CA_SUBNET = "10.2.0.0/16" | ||
| PL_ENCODING_IP = "::d107:64:ff71:0:0" | ||
| PL_ENCODING_MASK = "::ffff:ffff:ffff:0:0" | ||
| PL_OVERLAY_SIP = "fd41:108:20:abc:abc::0" | ||
| PL_OVERLAY_SIP_MASK = "ffff:ffff:ffff:ffff:ffff:ffff::" | ||
| PL_OVERLAY_DIP = "2603:10e1:100:2::3401:203" | ||
| PL_OVERLAY_DIP_MASK = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" | ||
|
|
||
| APPLIANCE_ID = "100" | ||
| LOCAL_REGION_ID = "100" | ||
| VM_VNI = 4321 | ||
| ENCAP_VNI = 100 | ||
| NSG_OUTBOUND_VNI = 100 | ||
| VNET1 = "Vnet1" | ||
| VNET2 = "Vnet2" | ||
| VNET1_VNI = "2001" | ||
| VNET1_GUID = "559c6ce8-26ab-4193-b946-ccc6e8f930b2" | ||
| VNET2_GUID = "559c6ce8-26ab-4193-b946-ccc6e8f930b3" | ||
| VM_MAC = "44:E3:9F:EF:C4:6E" | ||
| ENI_MAC = "F4:93:9F:EF:C4:7E" | ||
| ENI_MAC_STRING = ENI_MAC.replace(":", "") | ||
| # REMOTE MAC is corresponding to PE MAC | ||
| REMOTE_MAC = "43:BE:65:25:FA:67" | ||
| REMOTE_MAC_STRING = REMOTE_MAC.replace(":", "") | ||
| ENI_ID = "497f23d7-f0ac-4c99-a98f-59b470e8c7bd" | ||
| ROUTE_GROUP1 = "RouteGroup1" | ||
| ROUTE_GROUP2 = "RouteGroup2" | ||
| ROUTE_GROUP1_GUID = "48af6ce8-26cc-4293-bfa6-0126e8fcdeb2" | ||
| ROUTE_GROUP2_GUID = "58cf62e0-22cc-4693-baa6-012358fcdec9" | ||
| OUTBOUND_DIR_LOOKUP = "dst_mac" | ||
| ENI_ID2 = "497f23d7-f0ac-4c99-a98f-59b470e8c7bd" | ||
| ENI_TRUSTED_VNI = "800" | ||
| METER_POLICY_V4 = "MeterPolicyV4" | ||
| METER_RULE_V4_PREFIX1 = "48.10.5.0/24" | ||
| METER_RULE_V4_PREFIX2 = "92.6.0.0/16" | ||
|
|
||
| APPLIANCE_CONFIG = { | ||
| f"DASH_APPLIANCE_TABLE:{APPLIANCE_ID}": { | ||
| "sip": APPLIANCE_VIP, | ||
| "vm_vni": VM_VNI, | ||
| "local_region_id": LOCAL_REGION_ID, | ||
| "trusted_vnis": [ENCAP_VNI, NSG_OUTBOUND_VNI], | ||
| } | ||
| } | ||
|
|
||
|
|
||
| VNET_CONFIG = { | ||
| f"DASH_VNET_TABLE:{VNET1}": { | ||
| "vni": VNET1_VNI, | ||
| "guid": VNET1_GUID | ||
| } | ||
| } | ||
|
|
||
|
|
||
| VNET2_CONFIG = { | ||
| f"DASH_VNET_TABLE:{VNET2}": { | ||
| "vni": VM_VNI, | ||
| "guid": VNET2_GUID | ||
| } | ||
| } | ||
|
|
||
|
|
||
| ENI_CONFIG = { | ||
| f"DASH_ENI_TABLE:{ENI_ID}": { | ||
| "vnet": VNET1, | ||
| "underlay_ip": VM1_PA, | ||
| "mac_address": ENI_MAC, | ||
| "eni_id": ENI_ID, | ||
| "admin_state": State.STATE_ENABLED, | ||
| "pl_underlay_sip": APPLIANCE_VIP, | ||
| "pl_sip_encoding": f"{PL_ENCODING_IP}/{PL_ENCODING_MASK}", | ||
| "v4_meter_policy_id": METER_POLICY_V4, | ||
| "trusted_vnis": VM_VNI | ||
| } | ||
| } | ||
|
|
||
| PE_VNET_MAPPING_CONFIG = { | ||
| f"DASH_VNET_MAPPING_TABLE:{VNET1}:{PE_CA}": { | ||
| "routing_type": RoutingType.ROUTING_TYPE_PRIVATELINK, | ||
| "underlay_ip": PE_PA, | ||
| "overlay_sip_prefix": f"{PL_OVERLAY_SIP}/{PL_OVERLAY_SIP_MASK}", | ||
| "overlay_dip_prefix": f"{PL_OVERLAY_DIP}/{PL_OVERLAY_DIP_MASK}", | ||
| "metering_class_or": "1586", | ||
| } | ||
| } | ||
|
|
||
|
|
||
| INBOUND_VNI_ROUTE_RULE_CONFIG = { | ||
| f"DASH_ROUTE_RULE_TABLE:{ENI_ID}:{ENCAP_VNI}:{PE_PA}/32": { | ||
| "action_type": ActionType.ACTION_TYPE_DECAP, | ||
| "priority": 1 | ||
| } | ||
| } | ||
|
|
||
|
|
||
| PE_SUBNET_ROUTE_CONFIG = { | ||
| f"DASH_ROUTE_TABLE:{ROUTE_GROUP1}:{PE_CA_SUBNET}": { | ||
| "routing_type": RoutingType.ROUTING_TYPE_VNET, | ||
| "vnet": VNET1, | ||
| "metering_class_or": "2048", | ||
| "metering_class_and": "4095", | ||
| } | ||
| } | ||
|
|
||
| VM_SUBNET_ROUTE_CONFIG = { | ||
| f"DASH_ROUTE_TABLE:{ROUTE_GROUP1}:{VM_CA_SUBNET}": { | ||
| "routing_type": RoutingType.ROUTING_TYPE_VNET, | ||
| "vnet": VNET1, | ||
| "metering_class_or": "2048", | ||
| "metering_class_and": "4095", | ||
| } | ||
| } | ||
|
|
||
| ROUTING_TYPE_VNET_CONFIG = { | ||
| f"DASH_ROUTING_TYPE_TABLE:{VNET}": { | ||
| "items": [ | ||
| { | ||
| "action_name": "action1", | ||
| "action_type": ActionType.ACTION_TYPE_STATICENCAP, | ||
| "encap_type": EncapType.ENCAP_TYPE_VXLAN, | ||
| }, | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| ROUTING_TYPE_PL_CONFIG = { | ||
| f"DASH_ROUTING_TYPE_TABLE:{PRIVATELINK}": { | ||
| "items": [ | ||
| { | ||
| "action_name": "action1", | ||
| "action_type": ActionType.ACTION_TYPE_4_to_6 | ||
| }, | ||
| { | ||
| "action_name": "action2", | ||
| "action_type": ActionType.ACTION_TYPE_STATICENCAP, | ||
| "encap_type": EncapType.ENCAP_TYPE_NVGRE, | ||
| "vni": ENCAP_VNI | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| ROUTE_GROUP1_CONFIG = { | ||
| f"DASH_ROUTE_GROUP_TABLE:{ROUTE_GROUP1}": { | ||
| "guid": ROUTE_GROUP1_GUID, | ||
| "version": "rg_version" | ||
| } | ||
| } | ||
|
|
||
| ENI_ROUTE_GROUP1_CONFIG = { | ||
| f"DASH_ENI_ROUTE_TABLE:{ENI_ID}": { | ||
| "group_id": ROUTE_GROUP1 | ||
| } | ||
| } | ||
|
|
||
| METER_POLICY_V4_CONFIG = { | ||
| f"DASH_METER_POLICY_TABLE:{METER_POLICY_V4}": { | ||
| "ip_version": IpVersion.IP_VERSION_IPV4 | ||
| } | ||
| } | ||
|
|
||
| METER_RULE1_V4_CONFIG = { | ||
| f"DASH_METER_RULE_TABLE:{METER_POLICY_V4}:1": { | ||
| "priority": "10", | ||
| "ip_prefix": f"{METER_RULE_V4_PREFIX1}", | ||
| "metering_class": 1, | ||
| } | ||
| } | ||
|
|
||
| METER_RULE2_V4_CONFIG = { | ||
| f"DASH_METER_RULE_TABLE:{METER_POLICY_V4}:2": { | ||
| "priority": "10", | ||
| "ip_prefix": f"{METER_RULE_V4_PREFIX2}", | ||
| "metering_class": 2, | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.