Commit Graph

393 Commits

Author SHA1 Message Date
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
89a1656e4a Revert "Revert "realm.Realm: Move get_events and find_new_events methods from scenario.py to realm""
This reverts commit 67fe51cebd5403e8240d3490b7539b1e41dd212a.
2022-07-12 15:45:33 +05:30
Matthew Stidham
b6cd3113b0 realm: Update wait_until_ports_appear method to pass timeout
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:33 +05:30
Matthew Stidham
44684df155 Revert "realm.Realm: Move get_events and find_new_events methods from scenario.py to realm"
Breaks things
This reverts commit 3cd8db24e2692ecdf11f61991b7975f0cc270713.
2022-07-12 15:45:32 +05:30
Matthew Stidham
e29a86d7f4 realm.Realm: Move get_events and find_new_events methods from scenario.py to realm
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:32 +05:30
Matthew Stidham
e639ecf48f Revert "realm.wait_for_ip: Simple is better than complex. Return True inside the while loop when the passing condition is met so we can remove three redundant variables"
This reverts commit 915292ca6238a258f969f3b2c037f12f06143324.
2022-07-12 15:45:32 +05:30
Matthew Stidham
d4c335c357 Revert "Realm.wait_for_ip: We only need to checik that stas_without_ips and stas_without_ip6s are equal to zero once, simplify code further"
This reverts commit ec74b97bae4dce3eaf1b856d1e9bd7d7d271c42d.
2022-07-12 15:45:32 +05:30
Matthew Stidham
ec7fcf1ec4 Realm.wait_for_ip: We only need to checik that stas_without_ips and stas_without_ip6s are equal to zero once, simplify code further
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:32 +05:30
Matthew Stidham
63a9074f76 realm.wait_for_ip: Simple is better than complex. Return True inside the while loop when the passing condition is met so we can remove three redundant variables
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:32 +05:30
Ben Greear
8446d8fc1b realm:wait_for_ip: re-write logic for correctness and debugging.
Check ipv6 and ipv4 independently of each other.

Auto-timeout check is moved to top of the method.

Improve debugging output.

Fix logic that attempted to print out all ports when
there is failure to find IPs for at least one of the ports.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:32 +05:30
Matthew Stidham
25ef58262b realm.Realm.wait_for_ip: Improve debug output so that when a port is missing IP it will print out the name of the port
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:32 +05:30
Matthew Stidham
b1a0c8c12f realm: station_profile needs ipv6 to be passed into the initial call of new_station_profile
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:44:26 +05:30
matthew
8894d6f358 realm: variables may have been referenced before assignment WARNING!!!!!!
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 08:06:32 -08:00
matthew
83e36fe03b realm: Remove unused variables
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 08:04:11 -08:00
matthew
a535e753dd realm: Missing colon
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 08:01:39 -08:00
matthew
f4a9c1fdb4 realm: DO NOT SHADOW NAME FROM OUTER SCOPE!!!!! DANGER!!!! WARNING!!!!! ALERT!!!!
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 08:00:00 -08:00
matthew
07655ab249 realm: DO NOT SHADOW BUILT IN FUNCTIONS!!!!!!!! DANGER!!! WARNING!!!! ALERT!!!!
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:57:58 -08:00
matthew
6e2bff6c81 realm: Fix whitespace
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:57:13 -08:00
matthew
b6fbc88aba realm: "if not X in Y" should read "if X not in Y"
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:55:08 -08:00
matthew
6e08840d9b realm: Remove redundant is not None
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:54:07 -08:00
matthew
dc7a266352 realm: Remove redundant parentheses
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:51:10 -08:00
matthew
87b776034e realm: Fix mutable default arguments
Signed-off-by: matthew <stidmatt@gmail.com>
2021-12-03 07:50:42 -08:00
Matthew Stidham
bb366408b5 realm: vrprofile is deprecated
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-18 17:32:03 -08:00
Matthew Stidham
c3c2e09950 realm: l3_cxprofile2 is deprecated
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-18 17:30:06 -08:00
Matthew Stidham
60d547a7ec realm.py: Improve rm_port and port_exists debugging
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-16 18:47:07 -08:00
Matthew Stidham
b2a9200511 realm: Remove invalid comparisons
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-11-16 11:08:00 -08:00
Matthew Stidham
8f2fa4bf8c * We don't need to import LFUtils in lfcli_base
* local_realm in lf_attenmod is unused.
* local_realm in attenuator_profile is unused, because I'm switching to inheritance as part of my work eliminating redundancy.

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-10-04 11:51:37 -07:00
Matthew Stidham
e790d487b1 Make it so VAP profile works with Realm again
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-09-30 14:03:33 -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
64121ab3c1 Revert "importlib refactor realm.py"
This reverts commit ac5d3c688f.
2021-09-10 17:54:15 -07:00
erinnerim
ac5d3c688f importlib refactor realm.py 2021-09-10 17:13:52 -07:00
Chuck SmileyRekiere
2efbc62842 Revert "Update py_json files to be compatible with pip standards"
This reverts commit 0be47c82de.
2021-09-09 05:32:31 -06:00
Chuck SmileyRekiere
8e9909f2d0 Revert "Revert "Update py_json files to be compatible with pip standards""
This reverts commit 6b0322cafa.
2021-09-09 05:28:17 -06:00
Chuck SmileyRekiere
6b0322cafa Revert "Update py_json files to be compatible with pip standards"
This reverts commit 0be47c82de.
2021-09-09 05:24:20 -06:00
Matthew Stidham
0be47c82de Update py_json files to be compatible with pip standards
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-09-08 16:54:45 -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
anjali
0583b57fb4 added attenuator library in realm.py 2021-05-28 21:32:59 +05:30
Matthew Stidham
e25c13e826 Create dut_to_grafana and fixing dependencies
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2021-05-06 17:14:16 -07:00
Chuck SmileyRekiere
a8fcc7b14b README.md : description for py-json scripts
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2021-04-13 17:55:59 -06:00
Ben Greear
3c171bc260 cv-capacity: Re-work user input a bit.
*  Use realm method to query for all stations instead
of matching by name (which would miss wlan* devices)

*  Support interleave and linear sorting options.

*  Support setting upload/download speed.

*  Use args.foo variables directly much of the time,
  instead of making local copies of the same info.
  This simplifies code in my mind.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2021-04-13 15:23:35 -07:00
Ben Greear
6919045bbc l3-longevity: Write out per-port csv files.
And a small bit of code cleanup in the realm class.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2021-04-09 15:17:07 -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
lanforge
d486854a6e add new_lf_data_collection to realm
Signed-off-by: lanforge <stidmatt@gmail.com>
2021-04-07 10:40:10 -07:00
Matthew Stidham
3cc6bf099a Remove halt_on_error from realm
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
2021-03-17 14:28:11 -07:00
Matthew Stidham
768e3ec2cb Fix typo
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
2021-03-16 14:40:57 -07:00
Matthew Stidham
dc938a9603 Fixed create_qvlan.py script
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
2021-03-16 14:33:51 -07:00