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
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
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
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
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
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
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
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
8a502c918c
station_profile: Do not try to run set() on a dictionary, that does not work.
...
port_list needs to be a list of the keys in the 'interfaces' output of lanforge json
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
d135d1ee6e
StationProfile.create: LFRequest needs to be fed the url to make the request to
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
f0694033dd
StationProfile.create: Pretty print out current ports as soon as function starts when debug is on.
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
4e4276002f
LFUtils: Replace nc_show_ports with show_ports in wait_until_ports_appear to enable caching
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
e709fd711c
station_profile: Remove unused import
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
d6db3d0a2d
station_profile: Remove unused arguments and make station_mode_to_number static
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
f4ddf7010b
station_profile: Fix whitespace
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
d824dc0116
station_profile: Massively improve debug information so we have a better idea when scripts fail
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
c950789af6
l3_cxprofile: Declare the beginning of l3_cxprofile.create when it starts when debug is turned on
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
642aab2dd4
LFUtils.wait_until_ports_disappear: remove ports if they still exist.
...
LFUtils.wait_until_ports_appear: Improve debug by printing existing stations and adding more information to debug string
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Matthew Stidham
d6060dbe5c
station_profile: Improve debug output when creating stations to make it more legible
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2022-07-12 15:45:33 +05:30
Scott Wedge
a13f8260d2
http_profile.py: update ftp feature for hard-code resource and upstream-port
...
Signed-off-by: Scott Wedge <wedges@candelatech.com >
2022-07-12 15:45:33 +05:30