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>
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>
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>
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>
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>
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>
Default to treat station list as list of EIDS, and use it's
shelf/resource info instead of using resource 1 by default.
Caller may still use resource_id=X if they wish too, and it
will work as it did previously.
Add loop timeout (default is 300 tries with 1-sec sleep, so 5+
minutes). This keeps the method from spinning forever if port
cannot come up.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- 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>
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>
- 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>