Skip to content

test_l3.py: Add toolbox functionality - #348

Open
tarun-candela wants to merge 5 commits into
greearb:masterfrom
goyalsaurabh06:test_l3_toolbox_support
Open

test_l3.py: Add toolbox functionality#348
tarun-candela wants to merge 5 commits into
greearb:masterfrom
goyalsaurabh06:test_l3_toolbox_support

Conversation

@tarun-candela

@tarun-candela tarun-candela commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description:

  • Current implementation is focused on the required toolbox functionality.
  • Refactoring for better code reuse with test_l3 can be handled separately later.

Verified CLI

1. Station Creation

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --create_station --radio "radio==wiphy0 stations==2 ssid==TestAP ssid_pw==12345678 security==wpa2"

2. Layer-3 Cross-Connection Building

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --build_cxs --upstream_port 1.1.eth1 --ports 1.1.sta5000,1.1.sta5001

3. Layer-3 Cross-Connection Building with Custom Name

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --build_cxs --upstream_port 1.1.eth1 --ports 1.1.sta0000 --cx_names toolbox

4. Cross-Connection Building with Ethernet Ports

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --build_cxs --upstream_port 1.1.eth1 --downstream_ports 1.1.eth2 --cx_names eth_link

5. Start Cross-Connections

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --start_cx toolbox
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --start_cx all

6. Stop Cross-Connections

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --stop_cx wlan0
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --stop_cx all

7. Set Ports Admin UP/DOWN

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_down 1.1.sta5000,1.1.eth2
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_up 1.1.sta5000,1.1.eth2

8. Delete Cross-Connections

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_cx toolbox
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_cx all

9. Delete Wi-Fi Stations

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_stations sta5000,sta5001
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_stations all

10. Chained Workflow: Station Creation + CX Building

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --create_station --radio "radio==wiphy0 stations==2 ssid==TestAP ssid_pw==12345678 security==wpa2" --build_cxs --upstream_port 1.1.eth1 --cx_names test_flow

11. Error and Edge-Case Validation

Verified invalid inputs and missing required arguments return the expected non-zero exit code (1), including invalid radio, station count, ports, CX names, and missing --upstream_port.

@tarun-candela
tarun-candela force-pushed the test_l3_toolbox_support branch from 3132a8b to a634192 Compare August 10, 2026 07:41
@goyalsaurabh06
goyalsaurabh06 requested a review from greearb August 10, 2026 07:44
@tarun-candela tarun-candela added the Hold Use when changes or additional testing are still required before merging. label Aug 10, 2026
@greearb

greearb commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The toolbox arguments will need to be able to specify cx names, not just delete all cxs it finds. Can you make sure that works and add it to the example API? In the create step, allow configuring the cx names that will be created (so wlan0 would be a possibility, for instance).

@greearb

greearb commented Aug 10, 2026

Copy link
Copy Markdown
Owner

My comment had an error. wlan0 is not likely to be a cx name, but I do also want ability to specify station names that are created, and one option there is wlan0.

@tarun-candela

Copy link
Copy Markdown
Collaborator Author

The toolbox arguments will need to be able to specify cx names, not just delete all cxs it finds. Can you make sure that works and add it to the example API? In the create step, allow configuring the cx names that will be created (so wlan0 would be a possibility, for instance).

Sure @greearb will enable this feasibility as well where user can specify the custom cross connection.

Verified CLI:
python test_l3.py --lfmgr 192.168.207.78 --toolbox --create_station --radio 'radio==wiphy1 stations==2 ssid==NETGEAR-2 ssid_pw==Password@123 security==wpa2' --sta_start_offset 2000

python test_l3.py --lfmgr 192.168.207.78 --toolbox --build_cxs --upstream_port 1.1.eth1 --stations 1.1.sta1000,1.1.sta10001 --endp_type lf_udp --side_b_min_bps=10000000 --tos BE

python test_l3.py --lfmgr 192.168.207.78 --toolbox --stop_cx

python test_l3.py --lfmgr 192.168.207.78 --toolbox --start_cx
Verified CLI:
python test_l3.py --lfmgr 192.168.207.78 --toolbox --create_station --radio 'radio==wiphy1 stations==2 ssid==NETGEAR-2 ssid_pw==Password@123 security==wpa2' --sta_start_offset 2000

python test_l3.py --lfmgr 192.168.207.78 --toolbox --build_cxs --upstream_port 1.1.eth1 --stations 1.1.sta1000,1.1.sta10001 --endp_type lf_udp --side_b_min_bps=10000000 --tos BE

python test_l3.py --lfmgr 192.168.207.78 --toolbox --stop_cx

python test_l3.py --lfmgr 192.168.207.78 --toolbox --start_cx

Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
Verified CLIs:
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --create_station --radio "radio==wiphy0 stations==2 ssid==TestAP ssid_pw==12345678 security==wpa2"

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --build_cxs --upstream_port 1.1.eth1 --ports 1.1.sta5000,1.1.sta5001

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --start_cx toolbox

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --stop_cx wlan0

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_down 1.1.sta5000,1.1.eth2

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_up 1.1.sta5000,1.1.eth2

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_cx toolbox

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_stations all

Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
@tarun-candela
tarun-candela force-pushed the test_l3_toolbox_support branch from 98c8dd6 to 7659fe0 Compare August 11, 2026 19:10
Verified CLI:
python3 test_l3.py --help_summary

Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
@tarun-candela tarun-candela added Ready for review Ready for code review and feedback. and removed Hold Use when changes or additional testing are still required before merging. labels Aug 11, 2026
@haricharan-candela haricharan-candela added the Reviewed Code review completed. label Aug 12, 2026
@haricharan-candela

Copy link
Copy Markdown
Collaborator

@tarun-candela Please implement the suggestions requested by Ben on MM

@haricharan-candela haricharan-candela removed the Ready for review Ready for code review and feedback. label Aug 12, 2026
Verfied CLIs:
python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --create_station --radio "radio==wiphy0 stations==2 ssid==TestAP ssid_pw==12345678 security==wpa2"

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --build_cxs --upstream_port 1.1.eth1 --ports 1.1.sta5000,1.1.sta5001

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --start_cx toolbox

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --stop_cx wlan0

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_down 1.1.sta5000,1.1.eth2

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --ports_up 1.1.sta5000,1.1.eth2

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_cx toolbox

python3 py-scripts/test_l3.py --lfmgr 192.168.244.45 --toolbox --del_stations all

Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
@tarun-candela tarun-candela added Ready for review Ready for code review and feedback. and removed Reviewed Code review completed. labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for review Ready for code review and feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants