Commit Graph

72 Commits

Author SHA1 Message Date
Matthew Stidham
d31adb049c LFUtils: Cleanup whitespace
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-12-06 17:25:00 -08:00
Matthew Stidham
f2b4628a81 We cannot use default paramters in our code!
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-15 11:39:38 -08:00
Matthew Stidham
7ff62b9fd6 Fix improper equalities in LFUtils.py
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-12 14:42:29 -08:00
Matthew Stidham
c4511ad39a Fix LFRequest.get so it inherits debug commands from the class
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-08 18:52:26 -08:00
Jed Reynolds
3a17f699cc LFUtils.py can now import Logg
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
2021-11-03 19:53:30 -07:00
Matthew Stidham
e6cf6b9337 1. Create pandas_extensions.py
2. Remove unused imports

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-09-21 11:11:04 -07:00
Matthew Stidham
36400e003d Making it so that lanforge-scripts can work if the repository isn't named exactly the same way
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-09-17 15:29:15 -07:00
erinnerim
1d7578251c Updates to import statements:
- Import importlib, os, and sys to each python script.
 - Append "lanforge-scripts" root directory to the system path, allowing each script to be called from an antecedent directory. e.g.
if 'lanforge-scripts' not in sys.path:
    sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
 - All statements of the form 'from <module> import <class>' replace with:
<module> = importlib.import_module("lanforge-scripts.<directory>.<module>")
<class> = <module>.<class>
2021-09-15 16:17:16 -07:00
erinnerim
c373891f9d Revert "importlib refactor LFUtils.py"
This reverts commit 343d5f7b31.
2021-09-10 17:56:55 -07:00
erinnerim
343d5f7b31 importlib refactor LFUtils.py 2021-09-10 17:07:20 -07:00
Chuck SmileyRekiere
b6e1f30afb LFUtiles.py : added back in from LANforge import LFRequest
This was needed for the check tests

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2021-09-06 21:54:28 -06:00
Jed Reynolds
a2e02a6707 LFUtils.py: Improves wait_until_ports_disappear error message; Fixes many linter warnings.
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-09-06 09:48:52 -07:00
Jed Reynolds
64f243aa10 LFUtils.py: adds client function that can produce more detailed histogram from a Layer 3 DistributionPayload
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-07-06 16:41:05 -07:00
anjali
534b584b72 removing changes 2021-07-03 00:18:19 +05:30
anjali
130dac16eb Add option to pass resource number eg for resource 2 [1.2.sta00] 2021-07-02 23:19:46 +05:30
anjali
ded93a3d33 Add option to pass resource number eg for resource 2 [1.2.sta00] 2021-07-02 23:02:07 +05:30
Matthew Stidham
3820a85db7 Revert "Fix error regarding the non_port flag"
This reverts commit e88a0e2b52.
2021-04-12 20:04:06 -07:00
Matthew Stidham
e88a0e2b52 Fix error regarding the non_port flag
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
2021-04-12 17:00:18 -07:00
Ben Greear
70ee8972a0 l3-longevity: Support setting attenuators
User can specify comma separated list of attenuator EIDS
(shelf.resource.atten-id.atten-idx) and a list of attenuation
values and the script will iterate through those.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2021-04-08 16:09:18 -07:00
Jed Reynolds
44c65a4951 LFUtils: gains more debug output
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-03-11 01:06:03 -08:00
Jed Reynolds
7388ac3b73 LFUtils.py: rewrite of wait_until_ports_disappear()
- groups queries by resource for fewer http calls
- tests for either 'interface' or 'interfaces'
- debug output slightly slower when debuggin

Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-03-09 01:07:48 -08:00
Jed Reynolds
a8f0781bb6 LFUtils.py: adds debug output
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-03-05 00:35:15 -08:00
Jed Reynolds
dd47bf0e63 LFUtils.py: adds list_to_alias_map() a generic version of port_list_to_alias_map
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-02-26 12:28:04 -08:00
Jed Reynolds
30e4bbc38b LFUtils: restricts input to string 2021-02-15 16:48:59 -08:00
shivam
a2564b2dca Bug fix: parse_size values 2020-12-28 11:24:36 +05:30
Logan Lipke
5477368369 Added check for port_list in wait_until_ports_disappear to ensure list is being used 2020-12-18 17:00:42 -08:00
Jed Reynolds
c1bd64adb9 uses non-deprecated method 2020-12-18 12:36:41 -08:00
Dipti
6f9f8e86ae debug output - small change 2020-12-15 13:10:38 -08:00
Dipti
639180473e - much less output if not debug - changes according to lfcli 2020-12-10 23:38:35 -08:00
Jed Reynolds
b448ec79b4 LFUtils.py: slightly different sleep arrangement, more comments, less output 2020-12-10 20:26:34 -08:00
Jed Reynolds
8df9767cd2 LFUtils.py: slightly better string manipulation for name series 2020-12-01 00:15:47 -08:00
Logan Lipke
4a84169f05 Changed nc_show_ports flag 2020-11-30 17:59:44 -08:00
Logan Lipke
69a3ef15ff Added gen_ip_series, generates a series of sequential ip addresses based on starting ip/network and num ips 2020-11-13 17:06:25 -08:00
Jed Reynolds
49adc0d76b LFUtils.py - removes debugging 2020-11-13 15:59:45 -08:00
Jed Reynolds
e07e5e3a9c LFUtils: updates name_to_eid() to allow for qvlan names 2020-11-13 15:36:37 -08:00
Jed Reynolds
9f6e6d45fe LFUtils: fixes misnamed variable 2020-11-13 15:00:25 -08:00
Jed Reynolds
12d803576d JSON: refactors parsing sizes into utility class 2020-10-20 19:50:35 -07:00
Logan Lipke
24e510a848 Updated methods to fit PEP8 standards 2020-10-15 15:36:10 -07:00
Chuck SmileyRekiere
437de81510 port reset functionality 2020-09-01 18:19:58 -06:00
Jed Reynolds
1e545c15b2 LFUtils.py: fixes json-post for waiting on ports 2020-08-07 16:31:50 -07:00
Jed Reynolds
c84061de96 LFUtils.py: correct post method, should have been jsonPost 2020-08-07 16:24:25 -07:00
Ben Greear
c17837dc64 json: Work on pre-cleanup logic.
Still doesn't work, but checking in what I have for now.
2020-08-06 08:27:58 -07:00
Ben Greear
db4a5b7728 json: Add methods to wait for cx, endp to be found.
This lets scripts wait until we are sure the system can handle
further work.

Ensure we print out error in case the URL processing logic
detects and error and plans to exit.
2020-08-05 15:25:22 -07:00
Ben Greear
960b87b61f python: flex-longevity, library cleanup.
Remove use of 'resource' where possible, use port EIDs instead for
multi-resource flexibility.

Remove some spurious 'sleep' calls.  If you think you need to sleep
2 seconds, you are probably facing a real race bug, so diagnose that
instead or put big comments around why you added a sleep.

Lots of changes to flex longevity, hopefully it can support multiple
connection types now, but not tested that yet.

Signed-off-by: Ben Greear<greearb@candelatech.com>
2020-08-05 13:13:24 -07:00
Logan Lipke
b79aa43f59 Added port_down_request 2020-07-31 14:13:27 -07:00
Jed Reynolds
7fa76d4517 LFUtils: new snake_case method for wait_until_ports_admin_up() 2020-07-31 09:21:16 -07:00
Jed Reynolds
c54d342a8e LFUtils.py: whitespace 2020-07-30 13:51:05 -07:00
Jed Reynolds
4336ddb74e Fixed typo 2020-07-30 12:35:49 -07:00
Dipti Dhond
472919790f print statement moved 2020-07-14 17:13:17 -07:00
Jed Reynolds
3c21b6cab1 LFUtils.py: quieter 2020-07-03 07:54:43 -07:00