-
Notifications
You must be signed in to change notification settings - Fork 1k
[AI - Snappi] Adding BGP convergence testcase for single session flap Down ( Case 1) #18779
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
Closed
Closed
Changes from all commits
Commits
Show all changes
355 commits
Select commit
Hold shift + click to select a range
ed6c293
Fix LLDP swss autorestart assumption (#21062)
justin-wong-ce 92884ae
Set xfail to tests on IPv6 only topo by created bugs (#20750)
AntonHryshchuk 2aaf28c
Cancel PFCWD action override on Th5 (#21088)
bingwang-ms db69c70
Fix l2/test_l2_configure.py incomplete cleanup (#21063)
justin-wong-ce 27f4132
Snappi: fixed the PFC stats key issue with certain ingress-egress por…
amitpawar12 807863c
Cisco-8000:Snappi:Fix the arp deletion code in cisco-8000 fixture. (#…
rraghav-cisco 0e5e82a
[ansible]: Fix test_bgp_speaker by updating regex to match new output…
GaladrielZhao 9a26924
Add pre defined PR test template for regression binary search (#21017)
xwjiang-ms 3a5b6cc
update get_pdu_visible_vars to handle secrets from env for snmp v3 (#…
JibinBao b3874d9
Stabilize the copp test case (#20595)
nhe-NV b3018c3
Xfail test_pfcwd_timer_accuracy IPv6 case due to github issue #21083 …
echuawu 5f7d8c0
Update xfail condition for IPv6 test_pfcwd_all_port_storm (#21075)
echuawu b268736
Update the onyx docker check step (#21006)
echuawu 84b7a2f
Warm reboot is not supported on sn4280 skip test_cont_warm_reboot.py …
echuawu 3cc11c1
Align the test case based on the PR: https://github.com/sonic-net/son…
nhe-NV 8dbd20c
set the protocol field to 'kernel' in generate_route_file (#21002)
illia-kotvitskyi 6461086
fix missing secret_group_vars in pdu config (#20943)
illia-kotvitskyi a415764
chore: enable iface_namingmode and gnmi (#21073)
auspham 144230e
enable ipv6-only topo for test_vlan.py (#21025)
yanmo96 6b2349a
Fix ipfwd assert assumption for TH5 (#21072)
justin-wong-ce a8d7146
[drop_packets] Exclude PT0 interfaces from rif_members on Broadcom (#…
Gfrom2016 3c18f1c
[dualtor][mux_simulator] Recover unhealthy mux bridge flows during in…
lolyu c862c0d
Adjusting test_stress_arp is it can handle cases of ipv6-only topolog…
gshemesh2 4db4e87
update SKIP_ERROR_LOG_PSU_ABSENCE in test_platform_info.py (#20854)
illia-kotvitskyi f71e949
ignore expected error log in test_vlan_interface_tc1_suite (#20853)
illia-kotvitskyi 00c3f58
Handle v6 only for mtu test. (#20824)
OriTrabelsi 28c71eb
Fix index in reboot.py - missing -1 in logger msg (#20819)
ytzur1 aad7050
[IPv6 only topo] Adapt test_arp_update to run on IPv6 only topology (…
AntonHryshchuk 8973f86
Update qos sai cases for ipv6 only topo (#20798)
JibinBao 6b6ad98
Update function get_lldp_entry_content_with_retry (#20789)
echuawu 9956765
[IPv6 only topo] skip test test_show_ip_route_v4 on IPv6 only topolog…
AntonHryshchuk 5fc4df8
Add checker for system led status (#20716)
JibinBao 282abad
Fix the log rotation error handling (#20704)
xixuej 34d5a42
Fix dynamic buffer issue caused by the port with autoneg enabled (#20…
JibinBao a15784c
Adding a step to test_xcvr_info_in_db that verify and test_check_sfp_…
gshemesh2 2d25d6f
Adjust test_dynamic_acl.py so it can handle only ipv6 topologies. (#2…
gshemesh2 19fd8cd
add xfail for bgp/test_bgp_sentinel.py due to GH issue 23938 (#20598)
illia-kotvitskyi 8a730be
Added xfail due to issue #20452 to tacacs accounting test (#20453)
AharonMalkin 52bc3c1
xfail test_vnet_bgp_route_precedence due to issue of https://github.c…
JibinBao cca0296
Add skip conditions (#20436)
JibinBao 00d8686
Update qos dscp mapping case (#20429)
echuawu 20d2292
Fix upgrade/downgrade flow (#20420)
illia-kotvitskyi 7017b67
Disable ipv6 traffic from ptf to dut for two qos cases because it wi…
JibinBao e29cc27
Skipped Orchagent heartbeat test on 202412 (#20188)
AharonMalkin c45fe20
Improve test_null_route_helper by replacing sleep with a wait-until m…
OriTrabelsi 4cd654e
[test_show_chassis_module.py] Fix syntax / bracket issue for format (…
Javier-Tan 72b2747
Adding namespace in config interface command for multi-asic support (…
okaravasi 6bb0a41
adjust test_techsupport.py to support IPv6 (#20680)
ytzur1 b5df37a
Add support to download docker-ptf.gz (#21107)
opcoder0 1d97d41
Add a test case for gNOI `System.Reboot` API using the `HALT` reboot …
vvolam 54c528b
Fix test_bfd test failure due to IPv6 status not change (#21120)
wsycqyz e03044c
Merge multi-asic T1 checkers (#21049)
BYGX-wcr 5543e8b
Add support to accept PTF_MODIFIED and pass it to test plan creation …
opcoder0 b7ff878
add wait_until for TSC (#21047)
vishal-nokia e9b231c
[dualtor] fix `test_server_down` (#21123)
lolyu 1af38ff
fix buffer profile name retrieval bug (#21129)
developfast 4c8a272
Increase margin from 3 to 4 for HdrmPoolSizeTest (#21126)
JibinBao 590a9e9
enable ipv6-only for test_host_vlan (#21027)
yanmo96 3541383
Ignore error log from SAI in duplicated rote test (#21136)
bingwang-ms 31a22a9
Moving excluded scripts from excludes list to test_mark_conditional.…
bachalla 9af0d3a
Moving excluded scripts from excludes list to test_mark_conditional.…
bachalla 777544f
Move Transceiver Onboarding Test Plan to transceiver folder (#21100)
mihirpat1 780a358
Fix 1 test plan fail will cancel all peer test plans issue (#21138)
xwjiang-ms 0fb3407
[Arista] Enable test_snmp_link_local.py for LT2/FT2 (#20950)
dakotac-arista 6089990
Fixing parsing namespace argument as list and not as value (#20447)
okaravasi d17df45
Skipping nokia platforms for gcu test replace fec as fec is not confi…
okaravasi ab91342
Added new topologies to testcases.yml file (#19964)
AharonMalkin 35ec735
support for dut single stack ipv6 mgmt ip (#20292)
xixuej 658a912
Change PTF_MODIFIED argument type (#21171)
opcoder0 0c1b1e6
Revert "Enable generic_config_updater/test_eth_interface.py" (#21119)
xincunli-sonic 3de11f6
Add missing PR test param in multi-asic topo (#21173)
xwjiang-ms 32e7f8d
Fix ansible_hosts for docker-sonic-mgmt based on Ubuntu 24.04 (#21099)
wangxin 13ad063
[everflow][sn5640]: Add Mellanox ASIC skip condition for everflow IPv…
Janetxxx 736e331
Add a common error log ignore for github #22855 (#19914)
echuawu 7f28f76
Fix qos issue for ptf topo , because ptf topo has no vlan config (#21…
JibinBao 1260f5a
[DASH] Add a new test case to cover the negative scenario of PL VXLAN…
congh-nvidia c0309f5
fix the error ignore regex in test_vlan_interface_tc1_suite (#21113)
illia-kotvitskyi da33602
Xfail test_bgp_update_replication test on dualtor setup due to GH #21…
echuawu 95761d1
Enhance PTF container network setup by adding gratuitous ARP and netw…
xixuej f3168c8
Verify if the queue is blocked successfully in trimming case (#21077)
weiguo-nvidia 898ce13
Optimize check_interface_status function. (#21055)
OriTrabelsi 2c94f5d
remove unused stop_xcvrd fixture (#21046)
illia-kotvitskyi 8e2118f
Enhance the nhop test to override packet loss on weak server (#21003)
echuawu 910c262
Set xfail to test_decap on IPv6 only topo by created bug 20847 (#20848)
AntonHryshchuk 38e46dd
Adjust the fixture shutdown_unnecessary_intf and test_crm.py so it c…
gshemesh2 d3503fc
Update expected iptable rule on smart switch (#20271)
weiguo-nvidia 3803a7e
add topology marker to switchover impact test (#21184)
Ndancejic d7671d9
Remove the duplicate entry of test_reload_configuration_checks (#21193)
wsycqyz 8d6bb1c
update 202511 snappi skip list (#21189)
sdszhang 5852e9f
Fix timestamp comparison in NTP service restart detection (#21057)
gupurush 515c8b6
Compatibility fixes for docker-sonic-mgmt based on Ubuntu 24.04 (#21045)
wangxin f8b33dd
Testplan for the new SONiC DHCPv4 Relay (#20266)
ashutosh-agrawal 7a5fdcb
Add a check if the SW control feature is enabled before running the S…
illia-kotvitskyi 269f1d6
Fix bgp_bbr and fib::nvgre_hash related conditions (#20956)
justin-wong-ce e6f2ea2
[ansible]: Set sysctl args and ptf memory for full topology (#21097)
Pterosaur 8ecd5a2
chore: disable arp setting on ipv6 (#21212)
auspham ac21d10
[test gap] Add a new script to check ecmp balance (#18255)
ZhaohuiS 75ba1d4
fix the test issue for the dynamic acl (#21217)
nhe-NV 4ad9e84
[SN5640][xfail] xfail test cases in SN5640 full topo (#21106)
Janetxxx 03725ea
[DASH] Update the dash eni counter test to align with the latest PL t…
congh-nvidia 6b200e5
Fix test_system_health issue (#21216)
JibinBao e886826
fix the issue #20935 (#20936)
aronovic bc6e155
Issue #21205: Fix swss memory usage check failure in test_bgp_stress_…
yue-fred-gao 3f0ff35
[sonic-mgmt] modify fec-stats test for fec_flr (#20619)
apoorv-arista 276fc0f
Add T0 upstream neighbor support to test_bgp_sentinel (#21207)
dayouliu1 3b3c5d5
Added ipv6-only support to vlan_ping (#21018)
yanmo96 ff544db
[SmartSwitch] Restore dash smartswitch vnet after protobuf updates an…
aronovic f484109
Require swap syncd before running disable VOQ watchdog (#21102)
rbpittman 9034f7d
Remove temp files in disable_pfcwd fixture. (#21255)
rraghav-cisco 6a55b97
T2:snappi_tests:Fixing issue: https://github.com/sonic-net/sonic-mgmt…
rraghav-cisco b4b6e0a
Add qos params for topos ft2-64, lt2-p32o64, lt2-o128 (#20954)
rick-arista ff068e4
Enable copp test on LT2 and FT2 testbed (#21117)
bingwang-ms f4fdc04
Add test case to verify XON/XOFF is not counted as RX_DROP (#21223)
bingwang-ms b7fc9c3
Skip checking admin down ports on LT2 testbed (#21090)
bingwang-ms f1a2eb5
Moving excluded features sub_port_interfaces from excludes list to te…
bachalla 348b5aa
Update sonic-mgmt tests for Trixie (#20839)
saiarcot895 9595e3b
Issue 21185: [sflow] PTF script assumes port index map starts from 0 …
anders-nexthop f88ee85
Issue 21181: [sflow] test_sflow.py setup fails if VLAN1000 is not pop…
anders-nexthop 820694c
Added detailed reason for assert failure for bfd,spf (#21152)
bachalla d52be8f
[cisco] enable pfcwd interval test for cisco-8000 (#21131)
dcaugher 3cf0fa5
Don't always add Ethernet-IB attributes to the lab file for VOQ (#21159)
arista-nwolfe 537b9df
Fix remove_dataacl_table fixture to correctly delete and restore DAT…
rajkumar1-arista d6b365e
Fix test container_checker monit flaky issue. (#21218)
prajjwal-arista 7701a90
Fix qos/test_qos_sai.py for t0-d18u8s4 (#21211)
byu343 ec55a81
Update platform api server to support IPv6 (#20942)
dayouliu1 ecfdf4f
Add checkout optional sonic-mgmt param in PR test template (#21224)
xwjiang-ms 9014fc5
Extend SNMP container cleanup check time allowance (#20985)
justin-wong-ce d974466
Skip swss events in telemetry/test_events.py for m* topos (#19872)
rgarofano-arista 8055d62
Moving excluded features acstests, bfd, configlet from excludes list…
bachalla 19a9275
Adding a test for co-existence of IPv4 and IPv6 VxLAN tunnels (#21135)
mramezani95 efc7d7c
Adjust SSD health check to validate range, not threshold (#21127)
manish1-arista 906562c
Fix gnoi system time test to compare against device time (#21303)
hdwhdw b2dede7
expand intf config report for multi-asic systems (#21038)
dcaugher 8825b11
enable and fortify ECN config GCU testing (#21236)
dcaugher d75c2fa
Fix T2 upgrade path logic (#21222)
Javier-Tan 7168d4a
Add vxlan route test with vnets, dynamic bgp, and src mac rewrite (#2…
Leyza d36b6a2
Issue 21314: Remove --enable_sflow_feature from sflow tests (#21319)
anders-nexthop 3769060
Issue #21208: Enable sFlow for VS tests (#21209)
anders-nexthop 3462631
chore: ignore log analyzer (#21305)
auspham e3676f6
Fixing import issue for fixture is_pfc_enabled (#21313)
vikumarks 23be32d
Remove pmon from privileged container list (#21331)
qiluo-msft 81d4f92
Enable retry for eos command (#21321)
bingwang-ms d4b7374
Fixing vnet bgp test so that it works for all T0 topologies (#20503)
sudarshankumar4893 f5f3d53
fix: disable route check for po cleanup test cases (#21320)
cyw233 ec472c1
[common2] refactored ExaBGP annouce and withdraw routes (#20155)
opcoder0 bb0f3fa
Fix for gNMI test failures (#21334)
opcoder0 5972466
Removed the duplicate CODEOWNERS file (#21343)
nikamirrr ae38fab
Issue 22187: [sflow] Remove unnecessary 'config reload' call (#21190)
anders-nexthop a4062d9
[dualtor-aa] Fix `test_neighbor_link_down` (#21345)
lolyu fe6186a
skip test_gnoi_system_reboot_warm for isolated topo (#21324)
sdszhang 7571a89
update reduce the routes number from 6400 to 32x16x2 = 1024 routes. (…
sdszhang ac6f2bd
[7215A1] Support HwSKU Nokia-7215-A1-G48S4 and Nokia-7215-A1-MGX-G48S…
lizhijianrd aab6c7c
Fix test_voq_system_port_create speed check (#21058)
aeedara-nokia 43840f0
Code Optimization for snappi testcases (#21101)
selldinesh a63d4b2
Add F2 topo for Arista-7060X6-64PE-B-P32V128 and Arista-7060X6-64PE-B…
sdszhang 7a927ee
[chassis]: GCU: Update command to use -d all to show interfaces for m…
anamehra e7fcf7b
Added the DPU midplane precheck and online postcheck for the minigrap…
nikamirrr 3b3cd43
autogenerated CODEOWNERS (#21371)
nikamirrr 94b4562
Revert CODEOWNERS to the original (#21380)
nikamirrr 8a1f2a0
Use the "tor" role for pt0 peers in t0-isolated topologies (#20491)
wrideout-arista 7b91081
Temporarily disable yang validation to unblock PR testing (#21389)
wangxin f81dd83
Set PTF_IMAGE_TAG to empty so branch value is used (#21381)
opcoder0 62e3ad4
Modify T2 KVM test timeout (#21327)
xwjiang-ms ca51c3e
Add retry for get impact area (#21368)
xwjiang-ms fbc485c
Import added for fixtuer is_pfc_enabled (#21413)
vikumarks 3e43971
Enable dshell script code for T0/T1 (#21363)
rraghav-cisco 97882f1
Workaround for "dead worker" after docker-sonic-mgmt upgrade (#21407)
wangxin 8d11fe4
Update two test cases for Trixie environment (#21394)
saiarcot895 21aa924
Fix BPF filter specification in arp_responder (#20877)
saiarcot895 4a4daee
[GCU][Chassis]Adding namespace argument in get_interfaces_status func…
okaravasi 1988b53
Fix dead worker issue by using SafeThreadPoolExecutor (#21423)
wangxin 435c9c2
[SmartSwitch] Update the DPU NAT config flow for Trixie (#21374)
congh-nvidia a2f00a5
update skip condition for test_fast_reboot, because the condition sho…
JibinBao 7a237df
Update test_vxlan_bfd_tsa.py (#20252)
weiguo-nvidia 8d26812
Fixed COPP trap neighbor miss test to skip t1 (#20433)
AharonMalkin 4129b3f
Stabilize test_dscp_to_queue_mapping (#21340)
JibinBao bea5fea
Update route remove step in crm test (#21250)
echuawu b0b374a
Ignore expected error log in test_duplicate_route.py (#21230)
weiguo-nvidia 6431d70
Add t0-isolated-d32u32s2 to SUPPORTED_T0_TOPOS for qos sai test (#21215)
JibinBao f53f856
[Everflow] Add Support for Egress V6 Testing (#21384)
AndoniSanguesa 31b29ae
skip bgp bbr for isolated topo (#21357)
sdszhang fe3b7f7
[GITPR_TBD] Fix for parse_show_copp_configuration for multi-asic dut …
sanjair-git 5614474
Adding ECMP endpoint scale tests for T0 topology (#21254)
sudarshankumar4893 5924115
Add telemetry test for srv6 counters (#21317)
BYGX-wcr 7db9573
Add Arista-DCS-7280R4(K)-32QF-32DF to sonic-mgmt (#20975)
peterbailey-arista d802990
Added detailed reason for assert failure for gnmi,route (#21253)
bachalla cf60c0d
Added detailed reason for assert failure for arp (#21231)
bachalla 9039a26
Fix test gnmi for mgmt IPv6 only setups (#21140)
dayouliu1 c08fc69
[pfcwd] add fixture to restore pfcwd config (#21402)
lipxu 7621925
Added autoassign reviewers test infra (#21460)
nikamirrr 7b6b7f0
[tests]: Add tests for high frequency telemetry (#20379)
Pterosaur 24760de
Skip test_bgp_port_disable in PR tests (#21458)
yyynini 2bf7e29
Redesign and implement the telemetry framework (#20387)
r12f c8cc611
Auto assign reviewers GH action (#21475)
nikamirrr 0eb1940
Snappi: Skip backplane related code for single asic platforms. (#21364)
rraghav-cisco ae76ebc
Removed leading / from the code reviewer paths (#21477)
nikamirrr 1df76a1
Removed the non-listed as collaborators from code reviewers (#21479)
nikamirrr bb2221d
Add platform to xfail condition in SN5640 T0 full topo (#21478)
Janetxxx 225bc93
Filter out unnecessary dataplane logs (#21271)
wangxin 73e16a5
Fix snmp_facts for creating IPv6 UdpTransportTarget (#21272)
wangxin 09aaddf
Add "-n" to traceroute to speed up sanity check (#21443)
wangxin 56c5e46
[testbed] fixup vssetup md (#21492)
Xichen96 5e6d150
[dhcp_relay] skip test_dhcp_relay_monitor_checksum_validation (#21494)
Xichen96 309018d
enable test_acl (#21472)
sdszhang 9b36910
Skip fast/warm reboot cases for t0-f2-d40u8 and t1-f2-d10u8 (#21469)
sdszhang 6969bd2
[202511] Update PR template (#21395)
vmittal-msft 7e7a63b
Send more verification packets in packet trimming tests (#21435)
rgarofano-arista ffd3886
[SNAPPI] pretty print tgen stats (#21500)
vikumarks 9b6125a
Add test plan for reboot blocking mode (#19600)
lityu 038c8fa
Fix config-vm sub command in testbed-cli.sh (#20999)
bingwang-ms 880bcc5
Edit bgp/test_bgp_port_disable.py skip condition (#21504)
yyynini e6eed62
Adding VxLAN underlay ECMP tests (#21361)
mramezani95 4fa78a6
Support multi-chip in packet trimming tests with refactor (#21318)
rgarofano-arista 0e7d820
Fix GCU packet trimming tests for TH5 (#21439)
rick-arista f79fe92
VPP srv6 sonic mgmt support (#21103)
dypet 46cb073
[dualtor] Skip `test_replace_fec` (#21358)
lolyu f2aa741
Adding /32 vxlan tunnel route scale tests (#21220)
sudarshankumar4893 b0860fb
Cleaned up obsolete .code-owners (#21509)
nikamirrr d6ad412
Ignore syncd logre when switching global packet trimming mode (#21441)
rick-arista 8a82073
Add warm vs cold boot snapshot comparison test (#21225)
Ryangwaite 8d5b08d
Adding fixture for enum_downstream_dut_hostname (#20913)
okaravasi 5996391
Refactoring/high bgp phase 2 (#21335)
PriyanshTratiya e2abb88
initial commit for sonic mgmt test for src mac rewrite feature (#17692)
SoumyaMishra18 865c7cd
Update qos_fixtures.py (#21412)
vikumarks 5982866
Fix IDF Isolation test failures on LT2 (#21507)
tjchadaga 4df9303
Update memory threshold for sn5640 (#21408)
echuawu ff11acc
syslog rate limit hits race condition between log generate and new sp…
yenlu-keith fa116b2
Catch import error for sai_qualify (#21580)
ZhaohuiS 8af8205
fix: fix arp_update complains missing interface entry for static rout…
auspham b735c27
Update for dhcp and lag tests (#21499)
saiarcot895 69c62f9
fib/test_fib.py: User IPv6 addresses in outer header for IPinIPHashTe…
wrideout-arista 2979256
Normalize vpp topo name (#21510)
yue-fred-gao 6bd35d5
[docker-ptf] Modify docker container pull setting (#21560)
opcoder0 8863a68
Re-install python requests package while redeploy topo (#21584)
lizhijianrd 31fa200
Fix TypeError in test_ecmp_balance.py (#21488)
ZhaohuiS 7fad320
Disable default route in dpu (#21393)
yue-fred-gao d36a7f5
fix: only disable route check for T2 (#21582)
cyw233 902c7a9
query specific asic for detection/restoration (#21609)
dcaugher 962e8fb
Add ptf modified param from pr test template (#21563)
xwjiang-ms 954afab
Revert "Fix test gnmi for mgmt IPv6 only setups (#21140)" (#21579)
hdwhdw 178525d
Add the option of skip pre sanity check --skip_pre_sanity (#21566)
ZhaohuiS 00633ef
[dhcp_relay] ignore mem checker with stress test (#21598)
Xichen96 c633e93
Update blocking-mode reboot test for Trixie (#21605)
saiarcot895 034e8eb
Fix setup_interfaces fixture and related bgp tests for v6 topo (#21577)
markx-arista a4b28b8
fix: ignore BGP error syslog for Cisco 8800 (#21631)
cyw233 609f918
Always use the common reboot function for the blocking-reboot test (#…
saiarcot895 8e2c46e
Refactor pr_test_template.yml to reduce duplication and improve param…
wangxin 886663e
Report the line that fails YANG validation as an error (#21633)
nikamirrr de53b2e
Merge branch 'sonic-net:master' into pr_bgp_sessions_case1
selldinesh d844e71
pre-commit fixes
selldinesh 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
281 changes: 281 additions & 0 deletions
281
tests/snappi_tests/dataplane/test_bgp_single_port_down.py
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,281 @@ | ||
| from tests.common.telemetry import UNIT_SECONDS # noqa: F401, F403, F405, E402 | ||
| from tests.common.telemetry.constants import METRIC_LABEL_TG_TRAFFIC_RATE, METRIC_LABEL_TG_FRAME_BYTES # noqa: F401, F403, F405, E402 | ||
|
|
||
| from tests.snappi_tests.dataplane.imports import * # noqa: F401, F403, F405 | ||
| from snappi_tests.dataplane.files.helper import set_primary_chassis, create_snappi_config, create_traffic_items, \ | ||
| get_duthost_interface_details, configure_acl_for_route_withdrawl, start_stop, \ | ||
| get_stats, check_bgp_state # noqa: F401, F403, F405, E402 | ||
| METRIC_LABEL_TEST_PARAMS_EVENT_TYPE: Final[str] = "test.params.event_type" | ||
| METRIC_LABEL_TEST_PARAMS_ROUTE_SCALE: Final[str] = "test.params.route_scale" | ||
| METRIC_LABEL_TEST_PARAMS_PREFIX_LENGTH: Final[str] = "test.params.prefix_length" | ||
| METRIC_LABEL_TG_IP_VERSION: Final[str] = "tg.ip_version" | ||
| METRIC_NAME_BGP_CONVERGENCE_DATAPLANE_UPDATE_TIME_MS: Final[str] = "bgp.convergence.dataplane.update.time.ms" | ||
| pytestmark = [pytest.mark.topology("nut")] | ||
| logger = logging.getLogger(__name__) | ||
| TIMEOUT = 20 | ||
| # Mention the details of the port that needs to be flapped and the corresponding BT0 device | ||
| ROUTE_RANGES = { | ||
| "IPv6": [ | ||
| ( | ||
| ("777:777:777::1", 64, 5000), | ||
| ("666:666:666::1", 64, 5000) | ||
| ) | ||
| ], | ||
| "IPv4": [ | ||
| ( | ||
| ('100.1.1.1', 24, 5000), | ||
| ('200.1.1.1', 24, 5000) | ||
| ) | ||
| ], | ||
| } | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("subnet_type", ["IPv6"]) | ||
| @pytest.mark.parametrize("frame_rate", [10]) | ||
| @pytest.mark.parametrize("frame_size", [64, 128, 256, 512, 1024, 1518]) | ||
| @pytest.mark.parametrize("event_type", ["Port Flap Down", "Route Withdraw"]) | ||
| def test_bgp_sessions( | ||
| duthosts, | ||
| snappi_api, | ||
| get_snappi_ports, | ||
| fanout_graph_facts_multidut, | ||
| set_primary_chassis, # noqa: F811, F401 | ||
| create_snappi_config, # noqa: F811, F401 | ||
| subnet_type, | ||
| db_reporter, | ||
| tbinfo, | ||
| frame_rate, | ||
| frame_size, | ||
| event_type | ||
| ): | ||
| """ | ||
| Test to check if packets get dropped on injecting fec errors | ||
| Note: fanout_per_port is the number of fanouts per fron panel port | ||
| Example: For running the test on 400g fanout mode of a 800g port, | ||
| fanout_per_port is 2 | ||
| """ | ||
| snappi_extra_params = SnappiTestParams() | ||
| pytest_assert( | ||
| subnet_type in ROUTE_RANGES, "Failing test as no route ranges are provided for {}".format(subnet_type) | ||
| ) | ||
| snappi_extra_params.ROUTE_RANGES = ROUTE_RANGES | ||
| snappi_ports = get_duthost_interface_details(duthosts, get_snappi_ports, subnet_type, protocol_type="bgp") | ||
| tx_ports = snappi_ports[::2] | ||
| rx_ports = snappi_ports[1::2] | ||
| snappi_extra_params.FLAP_DETAILS = { | ||
| "device_name": rx_ports[0]['peer_device'], | ||
| "port_name": rx_ports[0]['peer_port'], | ||
| } | ||
| snappi_extra_params.protocol_config = { | ||
| "Tx": { | ||
| "protocol_type": "bgp", | ||
| "ports": tx_ports, | ||
| "subnet_type": subnet_type, | ||
| "is_rdma": False, | ||
| }, | ||
| "Rx": { | ||
| "route_ranges": ROUTE_RANGES[subnet_type]*len(rx_ports), | ||
| "protocol_type": "bgp", | ||
| "ports": rx_ports, | ||
| "subnet_type": subnet_type, | ||
| "is_rdma": False, | ||
| }, | ||
| } | ||
| snappi_config, snappi_obj_handles = create_snappi_config(snappi_extra_params) | ||
| snappi_extra_params.traffic_flow_config = [ | ||
| { | ||
| "line_rate": frame_rate, | ||
| "frame_size": frame_size, | ||
| "is_rdma": False, | ||
| "flow_name": "bgp_traffic", | ||
| "tx_names": snappi_obj_handles["Tx"]["ip"], | ||
| "rx_names": snappi_obj_handles["Rx"]["network_group"], | ||
| }, | ||
| ] | ||
| snappi_config = create_traffic_items(snappi_config, snappi_extra_params) | ||
| get_convergence_for_single_session_flap( | ||
| duthosts, | ||
| snappi_api, | ||
| snappi_config, | ||
| tx_ports, | ||
| rx_ports, | ||
| subnet_type, | ||
| snappi_obj_handles, | ||
| event_type, | ||
| db_reporter, | ||
| snappi_extra_params | ||
| ) | ||
|
|
||
|
|
||
| def get_convergence_for_single_session_flap( | ||
| duthosts, | ||
| snappi_api, | ||
| snappi_config, | ||
| tx_ports, | ||
| rx_ports, | ||
| subnet_type, | ||
| snappi_obj_handles, | ||
| event_type, | ||
| db_reporter, | ||
| snappi_extra_params | ||
| ): | ||
| """ | ||
| Get the packet loss duration | ||
| """ | ||
| convergence_dataplane_time = GaugeMetric(METRIC_NAME_BGP_CONVERGENCE_DATAPLANE_UPDATE_TIME_MS, | ||
| "convergence time for port down/Route withdrawl event", | ||
| UNIT_SECONDS, | ||
| db_reporter) | ||
| if event_type == "Port Flap Down": | ||
| logger.info("Starting Single Port Flap (Down) Test") | ||
| snappi_api.set_config(snappi_config) | ||
| flap_dut_obj = next( | ||
| (dut for dut in duthosts if dut.hostname == snappi_extra_params.FLAP_DETAILS["device_name"]), | ||
| None | ||
| ) | ||
| try: | ||
| start_stop(snappi_api, operation="start", op_type="protocols") | ||
| check_bgp_state(snappi_api, subnet_type) | ||
| start_stop(snappi_api, operation="start", op_type="traffic") | ||
| flow_stats = get_stats(snappi_api, "Traffic Item Statistics") | ||
| pytest_assert(int(flow_stats[0].loss) == 0, f"Loss Observed in {flow_stats[0].name} before link Flap") | ||
| tmp = get_stats( | ||
| snappi_api, | ||
| "Data Plane Port Statistics", | ||
| columns=['Port', 'Tx Frame Rate', 'Rx Frame Rate'], | ||
| return_type='df' | ||
| ) | ||
| tmp['port_num'] = tmp['Port'].str.extract(r'(\d+)').astype(int) | ||
| even_ports = tmp.loc[tmp['port_num'] % 2 == 0, :] | ||
| # Check if 'Rx Frame Rate' values for Rx ports are greater than atleast 1000 | ||
| # to ensure all Rx ports are receiving traffic | ||
| all_close = (even_ports['Rx Frame Rate'] > 1000).all() | ||
| pytest_assert(all_close, "Not all Rx ports are having frame rate atleast 1000") | ||
| logger.info("All ports Tx and Rx rates are within 0.05% of average rates") | ||
| logger.info( | ||
| "Shutting down {} port of {} dut !!".format( | ||
| snappi_extra_params.FLAP_DETAILS["port_name"], | ||
| snappi_extra_params.FLAP_DETAILS["device_name"], | ||
| ) | ||
| ) | ||
| flap_dut_obj.command( | ||
| "sudo config interface shutdown {}\n".format( | ||
| snappi_extra_params.FLAP_DETAILS["port_name"] | ||
| ) | ||
| ) | ||
| # calculate pld | ||
| wait(20, "For statistics to be collected") | ||
| flow_stats = get_stats(snappi_api, "Traffic Item Statistics") | ||
| delta_frames = flow_stats[0].frames_tx - flow_stats[0].frames_rx | ||
| pkt_loss_duration = 1000 * (delta_frames / flow_stats[0].frames_tx_rate) | ||
| logger.info("Delta Frames : {}".format(delta_frames)) | ||
| pytest_assert(int(delta_frames) != 0, "Delta Frames is 0 after flap, which means no packet drop occurred") | ||
| snappi_api._ixnetwork.ClearStats() | ||
| wait(20, "For statistics to be Cleared") | ||
| flow_stats = get_stats(snappi_api, "Traffic Item Statistics") | ||
| pytest_assert( | ||
| int(flow_stats[0].loss) == 0, | ||
| "Total Tx Rx Rates are not equal after link flap", | ||
| ) | ||
| logger.info('Traffic has converged back after link flap Down') | ||
| logger.info('-------------------------- Convergence Numbers ----------------------------------') | ||
| logger.info("Convergence Time for Single Port Flap : {} (ms)".format(pkt_loss_duration)) | ||
| logger.info('--------------------------------------------------------------------------------------') | ||
| start_stop(snappi_api, operation="stop", op_type="traffic") | ||
| test_labels = { | ||
| METRIC_LABEL_TEST_PARAMS_EVENT_TYPE: event_type, | ||
| METRIC_LABEL_TEST_PARAMS_ROUTE_SCALE: ROUTE_RANGES[subnet_type][0][0][-1], | ||
| METRIC_LABEL_TG_TRAFFIC_RATE: snappi_extra_params.traffic_flow_config[0]['line_rate'], | ||
| METRIC_LABEL_TG_FRAME_BYTES: snappi_extra_params.traffic_flow_config[0]['frame_size'], | ||
| METRIC_LABEL_TG_IP_VERSION: subnet_type, | ||
| } | ||
| convergence_dataplane_time.record(pkt_loss_duration, test_labels) | ||
| db_reporter.report() | ||
| except Exception as e: | ||
| logger.error("Error during packet loss duration calculation: {}".format(e)) | ||
| pytest.fail("Test failed due to exception: {}".format(e)) | ||
| finally: | ||
| start_stop(snappi_api, operation="stop", op_type="protocols", waittime=1) | ||
| start_stop(snappi_api, operation="stop", op_type="traffic", waittime=1) | ||
| logger.info( | ||
| "Starting up {} port of {} dut !!".format( | ||
| snappi_extra_params.FLAP_DETAILS["port_name"], | ||
| snappi_extra_params.FLAP_DETAILS["device_name"], | ||
| ) | ||
| ) | ||
| flap_dut_obj.command( | ||
| "sudo config interface startup {}\n".format(snappi_extra_params.FLAP_DETAILS["port_name"]) | ||
| ) | ||
| elif event_type == "Route Withdraw": | ||
| logger.info("Starting Single Port (Route Withdraw) Test") | ||
| dut_obj = rx_ports[0]['duthost'] | ||
| table_name = "AI_ACL_TABLE" | ||
| try: | ||
| snappi_api.set_config(snappi_config) | ||
| start_stop(snappi_api, operation="start", op_type="protocols") | ||
| start_stop(snappi_api, operation="start", op_type="traffic") | ||
| logger.info('\n') | ||
| logger.info("Configuring ACL for packet drop on one of the BGP peer") | ||
| destination_ips = ROUTE_RANGES[subnet_type] | ||
| acl_dict = configure_acl_for_route_withdrawl(destination_ips, table_name) | ||
| dut_obj.command("sudo config acl add table {} l3v6".format(json.dumps(acl_dict))) | ||
| logger.info("sudo config acl add table {} l3v6".format(table_name)) | ||
| cmd = "sudo config acl add table {} L3v6 -p {} -s egress".format(table_name, rx_ports[1]['peer_port']) | ||
| dut_obj.command(cmd) | ||
| logger.info("sudo config acl add table {} L3v6 -p {} -s egress". | ||
| format(table_name, rx_ports[1]['peer_port'])) | ||
| with open("/tmp/ai_acl.json", 'w') as fp: | ||
| json.dump(acl_dict, fp, indent=4) | ||
| dut_obj.copy(src="/tmp/ai_acl.json", dest="/home/admin/ai_acl.json") | ||
| start_time = time.time() | ||
| dut_obj.command("sudo chmod 666 /home/admin/ai_acl.json") | ||
| dut_obj.command("sudo config acl update full \"/home/admin/ai_acl.json\"") | ||
| """ Withdrawing routes from a BGP peer from snappi port """ | ||
| logger.info('Withdrawing Routes from {}'.format(snappi_obj_handles["Rx"]["network_group"][1])) | ||
| cs = snappi_api.control_state() | ||
| cs.protocol.route.state = cs.protocol.route.WITHDRAW | ||
| cs.protocol.route.names = [snappi_obj_handles["Rx"]["network_group"][1]] | ||
| snappi_api.set_control_state(cs) | ||
| end_time = time.time() | ||
| wait(50, "For routes to be withdrawn") | ||
| flow_stats = get_stats(snappi_api, "Traffic Item Statistics") | ||
| delta_frames = flow_stats[0].frames_tx - flow_stats[0].frames_rx | ||
| pkt_loss_duration = 1000 * (delta_frames / flow_stats[0].frames_tx_rate) | ||
| logger.info("Delta Frames : {}".format(delta_frames)) | ||
| pytest_assert(int(delta_frames) != 0, "Delta Frames is 0 after applying acl and route withdraw,\ | ||
| which means no packet drop occurred") | ||
| logger.info("PACKET LOSS DURATION After Route Withdraw (ms): {}".format(pkt_loss_duration)) | ||
| snappi_api._ixnetwork.ClearStats() | ||
| wait(20, "For clear stats") | ||
| flow_stats = get_stats(snappi_api, "Traffic Item Statistics") | ||
| pytest_assert( | ||
| int(flow_stats[0].loss) == 0, | ||
| "Tx Rx Rates are not equal after route withdraw", | ||
| ) | ||
| logger.info('Total Tx and Rx Rates are equal after route withdraw') | ||
| dut_obj.command("sudo config acl remove table {}".format(table_name)) | ||
| logger.info('\n') | ||
| logger.info('-------------------------- Convergence Numbers ----------------------------------') | ||
| logger.info('Convergence Time for Single Route Withdraw : {} (ms)'.format(pkt_loss_duration)) | ||
| logger.info('Time taken to apply acl and route withdraw on snappi port: {} (s)'. | ||
| format(end_time - start_time)) | ||
| logger.info('--------------------------------------------------------------------------------------') | ||
| start_stop(snappi_api, operation="stop", op_type="traffic") | ||
| # Create metrics | ||
| test_labels = { | ||
| METRIC_LABEL_TEST_PARAMS_EVENT_TYPE: event_type, | ||
| METRIC_LABEL_TEST_PARAMS_ROUTE_SCALE: ROUTE_RANGES[subnet_type][0][0][-1], | ||
| METRIC_LABEL_TG_TRAFFIC_RATE: snappi_extra_params.traffic_flow_config[0]['line_rate'], | ||
| METRIC_LABEL_TG_FRAME_BYTES: snappi_extra_params.traffic_flow_config[0]['frame_size'], | ||
| METRIC_LABEL_TG_IP_VERSION: subnet_type, | ||
| } | ||
| convergence_dataplane_time.record(pkt_loss_duration, test_labels) | ||
| db_reporter.report() | ||
| except Exception as e: | ||
| logger.error("Error during packet loss duration calculation: {}".format(e)) | ||
| pytest.fail("Test failed due to exception: {}".format(e)) | ||
| finally: | ||
| start_stop(snappi_api, operation="stop", op_type="protocols", waittime=1) | ||
| start_stop(snappi_api, operation="stop", op_type="traffic", waittime=1) | ||
| logger.info("Removing acl table {}".format(table_name)) | ||
| dut_obj.command("sudo config acl remove table {}".format(table_name)) | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use the common label from the other PR.