The Experiment Library provides a means of scripting interaction with individual nodes and VMs as well as with the Seattle Clearinghouse. Whereas [SeattleShell Seash] is for interactive use, the Experiment Library allows for writing Python scripts to acquire VMs, run experiments, download logs, etc.
You can obtain the experiment library by running the following commands:
mkdir experimentlibrary
cd experimentlibrary
svn export https://seattle.poly.edu/svn/seattle/trunk/experimentmanager
svn export https://seattle.poly.edu/svn/seattle/trunk/seattlegeni/xmlrpc_clients/seattleclearinghouse_xmlrpc.py
svn export https://seattle.poly.edu/svn/seattle/trunk/seattlelib
svn export https://seattle.poly.edu/svn/seattle/trunk/portability
svn export https://seattle.poly.edu/svn/seattle/trunk/repy
rm -rf seattlelib/test seattlelib/tests portability/tests repy/apps repy/tests repy/winAPItests
mv experimentmanager/* seattlelib/* portability/* repy/* ./
rmdir experimentmanager seattlelib portability repy
touch servicelogger.py
cd ..
Running the above commands will give you a directory named experimentlibrary/
that contains the file experimentlib.py
as well as all necessary supporting files. The file experimentlib.py
is the Experiment Library that you will use.
At the top of your own Python script add:
import sys
sys.path.append("/path/to/experimentlibrary")
import experimentlib
You can then use the Experiment Library in your script by calling the methods of the experimentlib
module you imported.
All of the public constants, variables, and functions in experimentlib.py
are meant to be used by your script. The private identifiers (the ones beginning with an underscore) should not need to be used by your script.
The comments at the top of experimentlib.py
contain useful information about the data types and exceptions used by the Experiment Library. All of the public functions have comments to explain their usage. The examples/ directory that is in your experimentlibrary directory (if you performed the steps above) contains a handful of scripts that show different ways to use the Experiment Library.
If you run into problems, find bugs, or feel that some useful functionality is missing, send an email to seattle-devel -at- cs -dot- washington -dot- edu.
The best documentation is just to look at [browser:seattle/trunk/experimentmanager/experimentlib.py the comments in experimentlib.py].
Second to that is to look at [browser:seattle/trunk/experimentmanager/examples/ the examples].