lf_test_generic.py: Add toolbox support - #370
Conversation
Verified CLIs: 1. Build new WiFi stations + ping endpoints python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target www.google.com --radio wiphy1 --num_stations 2 --ssid Tarun --passwd 12345678 --security wpa2 --endp_names ping_sta0,ping_sta1 2. Build ping endpoint on an existing station python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target 8.8.8.8 --use_existing_eid 1.1.sta0000 --interval 0.01 --endp_names roam_ping_sta0 3. Start a specific generic endpoint python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --start_gen_cx ping_sta0 4. Start multiple generic endpoints python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --start_gen_cx ping_sta0,ping_sta1 5. Start all generic endpoints python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --start_gen_cx all 6. Stop a specific generic endpoint python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --stop_gen_cx ping_sta0 7. Stop all generic endpoints python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --stop_gen_cx all 8. Delete a specific generic endpoint python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --del_gen_cx ping_sta0 9. Delete all generic endpoints python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --del_gen_cx all 10. Build and start all generic endpoints in one command python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target www.google.com --radio wiphy1 --num_stations 2 --ssid Tarun --passwd 12345678 --security wpa2 --endp_names ping_sta0,ping_sta1 --start_gen_cx all Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
…initialization Verified CLIs: python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target www.google.com --radio wiphy1 --num_stations 2 --ssid Tarun --passwd 12345678 --security wpa2 --endp_names ping_sta0,ping_sta1 python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target 8.8.8.8 --use_existing_eid 1.1.sta0000 --interval 0.01 --endp_names roam_ping_sta0 Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
haricharan-candela
left a comment
There was a problem hiding this comment.
-
iperf3 server port gets DHCP switched off, then we wait 50 min for an IP
In LANforge's set_port, interest says "apply these settings" and current_flags carries the values. Putting dhcp in interest while current_flags=0 omits the use_dhcp bit means "apply DHCP = off."
Fix: drop back to interest=['ifdown'], or keep dhcp and pass current_flags=set_flags(SetPortCurrentFlags, 0, ['use_dhcp']).
- get_generic_endpoint_names() hits /generic/all, which returns every generic-tab endpoint on the manager
Made sharper by nargs='?', const='all' — someone typing --del_gen_cx and forgetting the name wipes the whole generic tab on a shared box.
Fix: scope to self.created_endp or a name prefix. If manager-wide is genuinely intended, drop const='all' so it must be typed explicitly, and reword the docs to say "all generic endpoints on the manager, including those created by other scripts."
- port_wait_time is a constructor kwarg only. No argparse entry, and neither main() nor handle_toolbox() passes it — so it is always 3000. wait_for_action runs range(int(secs/2)) with sleep(2), so 3000 means 50 minutes per wait
@tarun-candela Could you cross check these once?
Addressed all the comments. |
…meout handling Verified CLIs: python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --build --test_type ping --target www.google.com --radio wiphy1 --num_stations 12 --ssid Tarun --passwd 12345678 --security wpa2 python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --start_gen_cx all python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --stop_gen_cx all python3 py-scripts/lf_test_generic.py --mgr 192.168.244.45 --toolbox --del_gen_cx all Signed-off-by: Tarun <tarunkumar.madabathula@candelatech.com>
083d7be to
514c839
Compare
Description:
Verified CLIs: