Skip to content

Conversation

@claplante-candela
Copy link
Collaborator

@claplante-candela claplante-candela commented Jan 24, 2025

Corrected myriad of flake8 compliance issues.
Added cx state validation before running test duration to avoid logging zero throughput on test.
Improved clarity of required arguments by moving arg parsing and adding validation to exit gracefully.

Verified with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante [email protected]

Updated all flake8 complaints to make script compliant. A few noqa in
line comments inserted that can be improved later.

Verified still functional with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante <[email protected]>
Moved arg parsing to parse_args function, and added validation for
required arguments (validate_args).

Verified with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante <[email protected]>
Added get_cx_states to validate 'Run' state before beginning specified
test duration.

Verified with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante <[email protected]>
Adding some headers to functions, included 'r' in top header, general
tidying.

Verified with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante <[email protected]>
@claplante-candela claplante-candela changed the title lf_interop_throughput.py: LAN-3628 - Provide time for CX setup prior to starting tests and improved flake8 compliance lf_interop_throughput.py: LAN-3628 - Verify CX 'run' state prior to starting tests and improved flake8 compliance Jan 24, 2025
@a-gavin a-gavin self-requested a review February 4, 2025 17:51
Copy link
Collaborator

@a-gavin a-gavin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather we use the required=True kwarg in the add_argument() function for each of the default arguments, instead of checking for them in argument validation.

Can you also check w/ CT-IN to verify adding this check doesn't break any assumptions their automation may make? I worry that introducing these checks may break existing WebGUI assumptions

val

Added max_retries to cx states loop to avoid infinite checking if error
occurs.i

Removed validate args function and used kwarg required=True instead.

Verified with:
./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup

Signed-off-by: Cameron LaPlante <[email protected]>
@a-gavin
Copy link
Collaborator

a-gavin commented Mar 5, 2025

This PR is blocked pending upstreaming of CT-IN WebUI PR.

@a-gavin
Copy link
Collaborator

a-gavin commented Mar 14, 2025

CT-IN WebUI PR is in. Please address conflicts, thanks! @claplante-candela

@a-gavin
Copy link
Collaborator

a-gavin commented Mar 30, 2025

@claplante-candela I understand that you're working on other tasks right now, but just want to make sure this is on your radar. The "big push" to get CT-IN changes merged is complete, so no more blockers for this. As I understand it, this is fix is still desired

CC: @goyalsaurabh06


required.add_argument('--device_list', help="Enter the devices on which the test should be run", default=[])
required.add_argument('--mgr', '--lfmgr', help='hostname for where LANforge GUI is running')
required.add_argument('--mgr', '--lfmgr', help='hostname for where LANforge GUI is running', required=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be refactored as it will not work for help summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants