Commit Graph

1099 Commits

Author SHA1 Message Date
Jed Reynolds
581d248c79 port_probe.py: fixes typo that halts test_ip_variable_time.py
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:46:02 +05:30
Chuck SmileyRekiere
4ffb8c3935 lfcli_base.py base args parser supports --lfmgr and --port
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:46:02 +05:30
Chuck SmileyRekiere
5f95f38731 mac_vlan_profile.py : print to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:46:02 +05:30
Chuck SmileyRekiere
db06254aa3 lfdata.py : prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:46:02 +05:30
Ben Greear
fb48980ee1 vap-profile: Improve logging and use some base class code.
More changes all around regression test logic related to the
vap profile.  Move some open-coded admin_up/admin_down calls
to base class.

regression test takes the .rc file as primary input,
and cmd-line args will override that.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:46:02 +05:30
Ben Greear
548167d7af Improve lf_ap_auto_test
Some untested changes to regression test script to allow passing more
info in on cmd line.

Use correct DUT name when starting ap-auto test.

Run connection test only at this time, it is fast when it works,
and proves basic ability to launch the test.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:46:00 +05:30
Ben Greear
4129f01860 lf_multipsk: Improve logging and add some TODOs
Add some more notes about external dependencies for this
script.  It is meant to run with already-created vlans,
for instance.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:53 +05:30
Jed Reynolds
0004047dc6 lfcli_base.py: adds debugging around what pass results are
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
2b13166a4a LFUtils.py: comments out debug on object that only provides memory address as output
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
0ca2007d62 LFRequest.py: re-formats debug output so that it is less likely to wrap
On a narrow terminal it is difficult to follow the output. This merges a
series of message lines into one debug output call to help legibility

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
ea9fda9c60 LFUtils.py: formats debug output json for pull port listing
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Ben Greear
b7d42bce04 lfcli-base: consider test passed if there are no failures.
Previous code also insisted that there was at least one success,
but that means that code doing not pass/fail tests would
fail.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:49 +05:30
Chuck SmileyRekiere
0059bcca96 lf_attenmod.py prints changed to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
d07c61ebc3 lfcli_base.py: updates check_connect() method to provide bold warning when detecting expired licenses.
Also generates warning about licences expiring within 30 days.

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
addc19deaa station_profile.py: improves debug formatting
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
1d67c30d1a LFRequest.py: raise ValueError when provided a highly improbable URL/PATH combination.
This was triggered by a call to admin_up() that was passing self.lfclient_url as an un-named parameter, creating
unanswerable requests formatted like http://localhost:8080/http:/localhost:8080/. There should really only be
one http[s]*:// pattern in a URL, and further instances of colons should be URL encoded to %3A.

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Jed Reynolds
554e3f22fc realm.py: add debugging parameters to admin_up()
This is a logical place to find license exceptions when using ath10k without valid license

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2022-07-12 15:45:49 +05:30
Chuck SmileyRekiere
dad88f2c94 fio_endp_profile.py : prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
92f37e3944 dut_profile.py print changed to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
2931c9c4c6 cv_test_manager.py print to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
5beeae511e cv_dut_profile print to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
40706e8154 create_wanlink.py prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
37db2052fb lfcli_base.py prints changed to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
d7dc9d1a23 vap-profile: Add logging and return code checking.
And remove the logic to create a bridge within the vap profile,
the vap profile does not have enough info to properly create
a bridge (old code used hard-coded port names)

Instead, logic would be to create vap, and then create a bridge
object that holds the VAP using the bridge profile/script.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
6a964ef215 lfutils: fix wait-for-ports-admin-up
Logic was broken trying to compare json_response['down'] to "true",
when instead that object is a Boolean variable.  So this method
always returned immediately instead of actually waiting until port
was admin up.  This was seen testing VAP profile.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
80b236ccb4 create-station: Add logger and exit code handling.
And add note for improvement to station_profile logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
531cf440af qvlans: Fix creating qvlans
Make it look more like macvlans, including logic to set IP addresses,
and to verify qvlans were created properly.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
6a441884c3 mvlan: Improve pass/fail reporting
And add support for logging API.  Add some TODOs for future work.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
0bddc504de clibase: Print out pass and failure messages on exit.
This is nice info to have printed.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
9bdb1e5140 create_l4: Improve logging and return codes.
Use base class methods for logging setup, check error codes
for port creation and cx creation.

l4 profile gets TODO note, since it does not verify that cx/endp
are actually created or not.
2022-07-12 15:45:46 +05:30
Ben Greear
f8d8e5849c lfutils: Print out some wait-for-port messages at info level.
Instead of just at debug level...

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
0fd11640e9 port_probe.py : changes prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
509d091b66 lfcli_base.LFCLIBase.create_basic_argparse: Add noclean argument
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Ben Greear
1da6d7d2f3 python/cv: Start adding debugging to create_chamberview
Try to figure out why this doesn't work on testbed heather,
at the least, I think DUT is probably wrong in the resgresison
script.  More work is needed to get this working.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
bbfc9a1077 lfutils: wait_until_ports_admin_up treat 404 ports as down.
If port cannot be found, then it is down.  This fixes race with
creating port and then immediately trying to way for it to go
admin up.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
998f25cb95 generic-endp: Fix multitude of errors.
The generic endpoint profile, especially the monitoring code,
was wrong in lots of ways.

Fix this, improve pass/fail and error reporting, and other
improvements for the gen_profile test.

Probably not backwards compat, but I assume due to breakage
no one was using this code anyway.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
c5ddccbdfd generic-cx: code cleanup and return error checking.
Clean up monitor logic in gen_cx profile to remove useless sleeps
and rename a variable that indicated it was msec but which was actually
seconds.

test_generic gets better error checking and also fixes bugs in how it
monitors the connection.  More work yet is needed for making the
monitor do a good pass/fail logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
2f3eb58c41 Add --log_level option to lfcli base class.
Let user specify the level of logging desired.
Test implementaiton in example_security_connection.py

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
0f1ffdd0ee l4_cxprofile.py : moved prints to logger
create_l4.py : moved prints to logger -needed for testing

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
f0fdc40cca l3_cxprofile.py : moved logger debug back behind if debug or if self.debug
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
90be6e8dfd py-json/station_profile.py : moved logger.debug back behind if self.debug
and if debug

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
c099c578b8 realm.py : changed prints to logger messages
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
41f587e424 lfutils: wait_until_ports_disappear will return True or False
In all return paths.
And remove redundant check for being done removing ports or not.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
40bc34f04d LFUtils.py : changes prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
4067621b40 gen_cxprofile.py : changed pprint to logger and pformat
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
eea68062c0 gen_cxprofile.py : changed prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Scott Wedge
22a4473c7d http_profile.py: update def create() for resource-2 tests, add logging module
Signed-off-by: Scott Wedge <scott.wedge@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
2164d5fc16 l3_cxprofile.py : updated to use logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
ec3a09b60f LFUtils: When debug is on, clearly state all stations have appeared in success case
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
1dc0a5c2ab py-json/station_profile.py : prints changed to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30