Load Scenarios And Control Test Groups With Python
Goal: Using a python script to load scenarios and start, stop, and quiesce test groups
This cookbook will demonstrate how we can use json to load DB scenarios and control test groups using python. We will be referencing the script scenario.py. Requires LANforge 5.4.2.
Running The Script
For this example we are using a database called fio_test_group. It has two stations that each have a read-only and write-only file-io endpoint attached to them. Each pair of file-io endpoints are in a group. One group is named test-group-ro and the other is test-group-wo.
The Command and Available Options
The script is located in lanforge-scripts/py-scripts/. From that directory we can use ./scenario.py to run the script.
The available options are:
--load db_name | This will load the database named db_name
--action (overwrite, append) | Optional argument to be used with --load, will specify an action to take when loading the database. The default action is to overwrite. The append option is more difficult to use and its use is discouraged. See here for more info.
--clean_dut | Optional argument to be used with --load, will cleanup DUTs on load. See here for more info.
--clean_chambers | Optional argument to be used with --load, will cleanup Chambers on load. See here for more info.
--start group_name | This will start the cross-connects in the specified group
--stop group_name | This will stop the cross-connects in the specified group
--quiesce group_name | This will quiesce the cross-connects in the specified group
Examples of Running the Script
Loading fio_test_group with overwrite
Candela Technologies, Inc.,
2417 Main Street, Suite 201,
Ferndale, WA 98248, USA
www.candelatech.com | email@example.com | +1.360.380.1618