Introduction
In I/O Analyzer 1.5.1, we have introduced an experimental new feature, which allows users to schedule tests via HTTP commands. The idea of such an interface is to provide a mean of script-able test scheduling functionality. In this post, we briefly introduce this new interface and give a few sample use cases.
Note
- You should still deploy all necessary controller and worker VMs before using this HTTP API.
- This HTTP API has only minimal error checking, so you should first have all the required information (such as host credentials, worker IP addresses, workload specs, etc) before using this HTTP API.
- This HTTP API is experimental and is still under development. The API might be changed in future releases.
Communicating with the back-end HTTP script engine
The general command to communicate with the back-end HTTP script engine is as follows:
http://<VA-IP-ADDR>:8180/IOAnalyzer/ioanalyzer/script?<...>
where <VA-IP-ADDR> is the I/O Analyzer controller VM's IP address
and <...> in the end is a subset of the following parameters, concatenated by ampersand '&' (see "supported parameter values" section below).
You may simply open a browser and type in the above URL, or you may use wget in your script/terminal to interact with the back-end script engine.
Supported parameter values
- command=newtest
- name=<test-name>
- desc=<optional>
- duration=<defaul:120>
- schedule=YYYY-MM-DD_hh-mm-ss
- readfromfile=[yes|no(default)]
- host=<hostname>,<password>
- iometer=<vmIP>,<workloadSpec>
- replay=<vmIP>,<trace>,<device>,<pace>,[wrap|ignore]
- savetofile=[yes|no(default)]
All parameter names are in lower case (case sensitive)! Parameters have no order.
Parameter Definitions (all parameters are required unless otherwise specified)
- command: must be newtest
- name: test name (same naming rule as web UI)
- desc: optional test annotation
- duration: test duration in seconds per workload, 120 if not specified
- schedule: optional time to run. If not specified, will run at the earliest possible time (i.e., run immediately if no other tests are running).
- readfromfile: whether to retrieve configs from file (storing on server); default NO; if yes, host/iometer/replay/savetofile parameters will be ignored. (accepts yes, no, 1, 0, true, false; case insensitive.)
- host: hostname followed by a comma and then the password string. for multiple hosts, repeat this parameter multiple times.
*Special chars have to be percentage encoded* (e.g., ' '->%20, '#'->%23, '%'->%25, '&'->%26). - workload
- iometer: required for iometer type only. Comma separated VM IP and workload spec.
For multiple VMs, repeat this parameter multiple times. - replay: required for replay type only. Comman separated VM IP, trace name, device name, pace, and wrap or ignore.
For multiple VMs, repeat this parameter multiple times.
- Special rule--If neither ioemter nor replay is specified, it will run in listening mode. If both are specified, command fails.
- savetofile: option to write the config to server. No by default. If yes, it will overwrite the existing config that has the same name. (accepts yes, no, 1, 0, true, false; case insensitive.)
Example 1: iometer (please concatenate command in one line)
http://192.168.100.1:8180/IOAnalyzer/ioanalyzer/script?command=newtest&
name=Config-File-1&
savetofile=true&
desc=optional&
duration=300&
schedule=2013-4-20_9-0-00&
host=%3Chostname%3E,`~!@%20%23%25%26$^*()-_=+[{]}\|'%22;:/?.%3E,%3C&
host=192.168.1.1,password&
iometer=192.168.100.1,Max_IOPS.icf&
iometer=192.168.100.2,Max_IOPS.icf
Example 1 output
Parsing test: Config-File-1
Desc: optional
Duration: 300 seconds.
Scheduled time: Thu Apr 20 09:00:00 PDT 2013.
Adding host: <hostname>
Adding host: 192.168.1.1
Iometer workload added: 192.168.100.1 Max_IOPS.icf
Iometer workload added: 192.168.100.2 Max_IOPS.icf
Test in iometer mode.
Test saved.
Example 2: trace replay (please concatenate in one line)
http://192.168.100.1:8180/IOAnalyzer/ioanalyzer/script?command=newtest&
name=Config-File-2&
desc=optional&
duration=300&
schedule=2013-4-20_9-0-00&
host=192.168.1.1,password&
replay=192.168.100.1,DVDSTORE,sdb,1.0,wrap&
replay=192.168.100.2,TPCC-LIKE,sdb,1.0,ignore
Example 2 output
Parsing test: Config-File-2
Desc: optional
Duration: 300 seconds.
Scheduled time: Thu Apr 20 09:00:00 PDT 2013.
Adding host: 192.168.1.1
Replay workload added: 192.168.100.1 DVDSTORE sdb 1.0 wrap
Replay workload added: 192.168.100.2 TPCC-LIKE sdb 1.0 ignore
Test in replay mode
Example 3: listening mode
http://192.168.100.1:8180/IOAnalyzer/ioanalyzer/script?command=newtest&name=Config-File-2&duration=300&&host=192.168.1.1,password
Example 3 output
Parsing test: Config-File-2
Duration: 300 seconds.
Scheduled time: Thu Apr 20 12:56:58 PDT 2013.
Adding host: 192.168.1.1
Test in listening mode.
Report bugs
Please report bugs to io-analyzer-info (at) vmware.com.