ToMaTo provides a set of tools to access it or to create resources with it.
There is currently no distributed package for installing the ToMaTo tools. Thus, you have to clone them manually.
For now, only Linux is supported.
First, you should install the dependencies:
$ sudo apt-get install python python-openssl gitThen, you can clone the official GitHub repository:
$ cd ~
$ git clone https://github.com/GLab/ToMaTo.gitThe tools will then be located at ~/ToMaTo/cli. You may choose a different location, but you might need to change the paths in this directory accordingly.
If you see any command like ./tomato.py in this manual, you will most likely find it in the ~/ToMaTo/cli directory.
The command-line interface (CLI) is a tool which can be used to directly use the API in a python shell, or to execute simple API scripts.
The ToMaTo library contains methods for connecting to the API and simplifying certain procedures.
The executable archive packet manager is a sophisticated tool to create executable archives for installing additional OS software.
The template migration script is a script which connects to two ToMaTo testbeds at once in order to copy a set of templates from one testbed to another. This is heavily used for internal test setups, but can also be used by testbed administrators to synchronize resources of their own ToMaTo instance to another one.
The template migration script is a command-line tool called migrate_templates.py. Type --help to get more information about its usage.
Its syntax is similar to that of the CLI, with a few differences:
-sh or -dh, respectively, where you would use -h at the CLI (--host_source or --host_destination, respectively).--templates as last argument, followed by a space-separated list of template names.
--include_restricted argument can be set to include restricted templates.--overwrite_on_conflict to overwrite existing templates.The backend registrator is a tool which can automatically register a backend’s public key on a target host. In order for this to work, the user must have a login to the target testbed and SSH access to the host.
The script is named register_backend_on_host.sh. You need to use a URL for the backend connection. The usage is: ./register_backend_on_host.sh BACKEND_URL HOST_ADDRESS CERT_IDENTIFIER, e.g., ./register_backend_on_host.sh http+xmlrpc://master.tomato-lab.org 131.246.112.36 example_testbed