Commit Graph

5197 Commits

Author SHA1 Message Date
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
ff56cdccfb test_l3_unicast_traffic_gen: Fix improper station creation in test_l3_unicast_traffic_gen
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
e824080c24 regression_test: Use eval so that commands with quotes are properly executed
Signed-off-by: Matthew Stidham <stidmatt@gmail.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
3426f22bcc test_l3.py : pep8 , white space changes
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
109d24e505 test_l3.py added exit(0) for pass , exit(1) for fail
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.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
Matthew Stidham
f4ecff6bb4 regression-test: Always produce an HTML report
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
56f8c0a820 regression_test: don't quote the command when not in an eval command
add test_l3 to regression_test

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
ae78aee979 regression_test: Fix scenario.py method call
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
261b491b23 create_l3_stations: remove trailing semicolons and make argumentse explicit
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Ben Greear
615dd1c9c3 regression-test: check test script return code to detect failure.
Also:  merge stderr/stdout, add more specific help example,
allow configuring report dir, add safety check for missing 'jq'.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
57f8a83020 lf_logger_config_test.py : removed spacing from simple logger format, added filename
lf_logger_config_test.py : updated to show example of using lf_logger_config.json one directy up
lf_logger_config.json , lf_logger_config_example.json : updated with simple format

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
d697963cec create-cx: Add return code checking for cx and endp creation.
Check for false value in create_l3_stations and return error code
upon failure.

Add configurable timeout to waiting for cx/endp logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
4bb9cb4b82 l3-stations: error checking for station creation.
In station_profile create method, pay attention to result of
wait_until_ports_appear.  If it returns False, we know creation
has failed somehow, so we do not need to do the extra checking
that was in the create() method.

create_l3_stations adds logic to check return code of station
create logic, and exit with error code if it could not
create them as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
12add4503a py-json/realm.py : moved back to using lists (original code from a couple
of days ago)

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
d3035aca57 test_l3_longevity.py : changed printed errors to raise ValueError so script
exits on mis configuration

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
4acd3beb29 realm.py : removed the len(endpoint) > 1
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
676bcab1d7 lfcli_base.check_connect: Replace while loop with for loop for additional security.
Add timeout argument

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
a9e0189e8d Revert "realm.wait_until_ports_disappear: endp_list needs a length greater than 0, not 1"
This reverts commit 68fcf480818432a0926e8c7d1ccc621f52cfbb06.
2022-07-12 15:45:45 +05:30
Matthew Stidham
a9c6ab4f12 realm.wait_until_ports_disappear: endp_list needs a length greater than 0, not 1
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
629069cfad realm.wait_until_endps_appear: check to make sure there is a port in the endpoints list
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
d131abe916 realm.wait_until_endps_appear: Replace try: except: loop with if condition, so we don't potentially hide bugs
remove unnecessary variables

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
282667b861 LFUtils: Use pythonic name for get_as_json
Replace all while loops with for loops, for security

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
02dd8e41d5 sandbox/lf_logger_config_example.json : multiple loggers in one module test
sandbox/lf_sublogger_2.py : testing multiple loggers

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
e128a6aa5f LFUtils.wait_until_ports_appear: alert the user if a port is phantom
Use a for loop for increased stability
remove deprecated variables

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
1ced503244 lf_logger_config.py : default root logger to info form warning
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
43e6b7ef09 test_generic: Switch from print statements to logger statements
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
7ad7f003c7 lfcli_base.py added --lf_logger_config_json to base args
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
944021855a station_profile: Timestamp printing needed an additional parentheses
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
df5879fc77 sta_connect.setup: check_exists should be used as an argument in rm_port, the existing code was probably from before we had the check_exists method
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
0c9215abb5 lf_logger_config_example.json : sandbox example for using logging config
lf_logger_config_test.py : example program
lf_sublogger.py : included module sample
lf_sublogger_2.py : included an inherited module same.

This code is for becomming familiar with the logging module
2022-07-12 15:45:45 +05:30
Matthew Stidham
b7236d5007 sta_connect2: wait_until_ports_appear needs list of ports
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
a4eb0fceb9 lf_logger_config.json : the defaults in the file may need to be worked out,
or just that there will be custome configurations
test_l3.py : intial pass of using the logger functionality

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
eb63792064 test_l3.py : updated to use logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
0a0bd5e25b LFUtils.wait_until_ports_appear: Improve docstring for port_list
if port_list is not a list, make it a list

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
3201f297cc sta_scan_test: Fix improper wait_until_ports_appear port_list input
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
7e175950a7 lf_logger_config.py : intial checkin of the lf logger library for
minimal wrapper around the python logger
lf_logger_config.json : example of how to set different log levels for
various modules.

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:43 +05:30
Matthew Stidham
a16072f062 station_profile.create: print timestamp in milliseconds when removing ports when debug is on
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
dbc9c21b80 sta_scan_test: Don't use positional arguments. We were passing the port list into the URL field for wait_until_ports_appear
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
199dcb7ca1 sta_connect2: debug needs to be done as store_true, just like the rest of lanforge_scripts
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
ad845bafa3 regression_test: If the test is a success, reset LOGGING to a blank string
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
693adadf30 realm.rm_port: Don't spout an error if the port exists, just return False.
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
8fb5a4c5f8 Both files: Fix wait_until_ports_disappear arguments, debug is called by debug_, not debug
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
563111c851 tip_statio_powersave: pass debug to arguments
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
05fa06d8a6 test_l4: Pass debug information to realm
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
32e772b809 test_l3_WAN_LAN: Pass debug to realm
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
a124ccde42 test_ip_variable_time: Pass debug to rm_port
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
782c0b1d2c test_ipv4_ttls: Pass debug information to functions
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
ff0b787d8a test_ipv4_ps: Pass debug information to rm_port
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30