The Mu Ruby gem contains command line application (executables) designed to help you work with Scenarios, Test Sets, Scale tests and all results generated from those tests. The gem also supports older REST API commands that you can use to configure the test network interfaces on the appliance, get system status, or even access the appliance CLI. API library classes are exposed for use in your own custom gems.
###Before Using the Gem###
Before using this gem, you must install the necessary software, which
includes ruby 1.8.6 and the following gems (sudo gem install</b> gem</em>):
- hexy. This ensures that hex dumps print pretty :)
- json_pure. Don't confuse this with the json gem (that won't work).
- nokogiri. See http://nokogiri.org/tutorials/installing_nokogiri.html for help.
- rest-client. Used for HTTP calls.
- mime-types. Required by REST-client.
You also need to set the following environment variables:
- MU_IP. Set the default IP address of the appliance management interface.
- MU_ADMIN_USER. Set the default name of the admin user.
- MU_ADMIN_PASS. Set the default admin user password.
###Supported Command Types###
-
Executables are command-line applications are used for loading and verifying Scenarios, creating and running Test Sets, and configuring and running Scale tests.
- [cmd\_appid](#cmd_appid) - [cmd\_runscale](#cmd_runscale) - [cmd\_runverify](#cmd_runverify) - [cmd\_runscenario](#cmd_runscenario) -
Legacy REST API Commands provide access to legacy REST API commands supported by the appliance.
- [cmd\_ddt](#cmd_ddt) - [cmd\_scale](#cmd_scale) - [cmd\_netconfig](#cmd_netconfig) - [cmd\_muapi](#cmd_muapi) - [cmd\_homepage](#cmd_homepage) - [cmd\_system](#cmd_system) - [cmd\_cli](#cmd_cli) -
API Library Classes can be ‘required’ and used within Ruby scripts (like most ruby gems).
- [ddt](#ddt) - [scale](#scale) - [netconfig](#netconfig) - [muapi](#muapi)
Command documentation uses the format:
command
- description
- syntax
- example
options
-command-short-name/--command-long-name parameter
description
The following command-line applications are used for loading and verifying Scenarios, creating and running Test Sets, and configuring and running Scale tests.
Use to run Scale tests for a multi-host App-ID .msl file or a directory of .msl files. Supports command-line options for setting test parameters (such as concurrency and pattern) and for configuring a client/server passthrough Test Bed. Spirent Studio automatically collapses all hosts in the App-ID Scenario to just two hosts, which must be set to two appliance interfaces.
» see cmd_appid options | » see documentation format | » back to top
help
- Gets help for all cmd_appid commands.
help</b>mu cmd_appid:help
run_file
- Runs the specified .msl file.
run_file -s</b>msl-filename</em>mu cmd_appid:run_file -s msl_file -i a1,a2 -m admin:[email protected] -p 1-10000:60
run_dir
- Runs all .msl files in the specified directory.
run_dir -d</b>msl-directory</em>mu cmd_appid:run_dir -d msl_file_directory -i a1-10000,a2 -m admin:[email protected] -p 1-100000:360
running?
- Gets status of the scale player.
running?</b>mu cmd_appid:running?
-c/--csv csv-filename
Specify the .csv filename with test cases to run.
-d/--dir <directory>
Specify the directory with .msl files to run (required for run_dir).
-h/--help
Get help on command line options.
-i/--interfaces <interfaces>
Specify test interfaces as a comma-separated list. Example:
b1,b2. When using an IP range, specify range and offset. Example:b1-1000:0,b2.
-m/--mu_string user:pass@mu-ip
Specify the user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output <filename>
Specify the filename to which you want to output logs.
-p/--pattern start:dur,end:dur\
Specify pattern as concurrency-start:duration,concurrency-end:duration. Duration is in seconds. Example:
1-10000:60,10000-1:30.
-s/--scenario <msl-filename>
Specify the .msl filename (required for run_msl)
-t/--test
Run a verification check only.
-v/--verbose
Set the Logger::DEBUG level.
Use to run Scale tests by specifying a Scenario .msl file or a directory of .msl files. Supports command-line options for setting test parameters (such as concurrency and pattern) and for configuring the Test Bed with appliance interfaces and/or network hosts.
» see cmd_runscale options | » see documentation format | » back to top
help
- Gets help for all cmd_runscale commands
help</b>mu cmd_runscale:help
run_file
- Runs a Scale test for the specified .msl file
run_file -s</b>msl-filename</em>-i</b>interface,host</em>-p</b>pattern</em>mu cmd_runscale:run_file -s msl_file -i a1,dell-9 -p 1-100:30
run_dir
- Runs a Scale test for all .msl files in the specified directory. To include all .msl files in nested directories, use -r to perform a recursive directory search.
run_dir -d</b>msl_directory</em>-r</b>mu cmd_runscale:run_dir -d msl_file_directory
running?
- Gets status of the Scale player.
running?</b>mu cmd_runscale:running?
run_files
- Runs a Scale test for each .msl file in the specified directory (optionally, you can specify single .msl file). To include all .msl files in nested directories, use -r to perform a recursive directory search.
run_file -d</b>msl-directory</em>-r -i</b>interfaces,hosts</em>-p</b>pattern</em>mu cmd_runscale:run_file -d msl_file_directory -r -i a1,dell-9 -p 1-100:30
-c/--csv csv-filename
Specify the filename of the .csv file that contains the test cases to run.
-d/--dir directory
Specify the directory that contains .msl files to run (required for run_dir). Does not include nested directories.
-f/--default_host default-host
Specify the default host. This host is used for all hosts in the scenario which have not been explicitly assigned.
-h/--help
Get help on command line options.
-i/--interfaces interfaces
Specify test interfaces as a comma-separated list. Example:
b1,b2. When using an IP range, specify range and offset. Example:b1-1000:0,b2.
-m/--mu_string user:password@mu-ip
Specify the user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-p/--pattern con-start:dur,con-end:dur
Specify pattern as concurrency_start:duration,concurrency-end:duration. Duration is in seconds. Example:
1-10000:60,10000-1:30.
-r/--recursive
Perform a recursive directory search. Use with run_dir and run_files to run Scale tests for all .msl files contained in nested directories.
-s/--scenario msl-filename
Specify the .msl filename (required for run_msl).
-t/--test
Run a verification check only.
-v/--verbose
Set the Logger::DEBUG level.
Use to load a Scenario and Test Set template (.xml files) and run a Test Set in Studio Verify. Supports command-line options for setting option values and for configuring the Test Bed with test interfaces and/or network hosts.
» see cmd_runverify options | » see documentation format | » back to top
help
- Gets help for all cmd_runverify commands.
help</b>mu cmd_runverify:help
run
- Runs the specified Test Set template for the specified Scenario.
run -s</b>scenario.xml</em>-t</b>test-set.xml</em>-i</b>interface,host</em>mu cmd_runverify:run -s my_scenario -t my_testset -i a1,my-server
-c/--channels hosts
Specify channel hosts as a comma-separated list.
-d/--dir directory
Specify the directory with Scenario templates to run.
-h/--help
Get help on command line options.
-i/--interfaces interfaces
Specify test interfaces and network hosts as a comma-separated list. Example:
b1,b2. When using an IP range, specify range/offset. Example:b1-1000:0,web-server.
-m/--mu_string user:password@mu-ip
Specify the user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-p/--options option:value
Specify option/value pairs as a comma-separated list. Example:
user:jane,email:[email protected].
-s/--scenario scenario-template
Specify the Scenario template to run (must be xml).
-t/--testset testset-template
Specify the Test Set template to run (must be xml).
-v/--verbose
Set the Logger::DEBUG level.
Use to load and verify a Scenario template (.xml file). Supports command-line options for configuring the Test Bed with test interfaces and/or network hosts.
» see cmd_runscenario options | » see documentation format | » back to top
help
- Gets help for all cmd_runscenario commands
help</b>mu cmd_runscenario:help
run
- Runs the specified Scenario template.
run -s</b>scenario.xml</em>-i</b>interfaces,hosts</em>mu cmd_runscenario:run -s my_scenario -i a1,my-server
-c/--channels hosts
Specify channel hosts as a comma-separated list.
-d/--dir directory
Specify the directory with Scenario templates to run.
-h/--help
Get help on command line options.
-i/--interfaces interfaces
Specify test interfaces and network hosts as a comma-separated list. Example:
b1, b2. When using an IP range, specify range/offset. Example:b1-1000:0,web-server.
-m/--mu_string user:password@mu-ip
Specify the user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-s/--scenario scenario-template
Specify the Scenario template to run (must be xml).
-v/--verbose
Set the Logger::DEBUG level.
Use to create .msl files from HTTP Archive (.har) files, which
capture web page loading information in JSON format. You can use the
from_har</b> command to transform a .har file into a Scenario (in .msl
format) suitable for import into Spirent Studio.
» see cmd_musl options | » see documentation format | » back to top
help
- Gets help for all cmd_musl commands.
help</b>mu cmd_musl:help
from_har
- Creates a .msl file from the specified .har file. If you omit the scenario filename, the output .msl file uses the har_filename.
from_har</b>options</em>-s</b>scenario_filename.msl har_filename.har</em>mu cmd_musl:from_har --ignore-images -s my_scenario.msl my_har_file.har
escape
- Escape special javascript characters ( $ , " , ' ) in the return payload of the .msl file.
escape -s</b>filename.msl</em>mu cmd_musl:escape -s my_scenario.msl -o escaped_characters.js
bin2hex
- Convert a binary file into a hex string that can be included in a Scenario response.
bin2hex -s</b>filename.msl</em>mu cmd_musl:bin2hex -s my_scenario.msl -o hex_string_file
-h/--help
Get help on command line options.
--ignore-non-essentials
Ignore unknown application files, Javascript (js) files, Cascading Style Sheet (css) files, and all image files.
--ignore-images
Ignore image files.
--ignore-css
Ignore CSS files.
--ignore-js
Ignore Javascript (js) files.
--ignore-payload
Ignore the content payload.
--strip-large-content[size]
Replace large blocks of response content with a repeated field.
--skip-ssl-passthru[size]
Skip all SSL transport options and structure as TCP.
-o/--output filename
Specify the filename of the output file. For escape output, the output file is typically a .js file. For bin2hex output, you can assign the file extension of your choice.
-s/--scenario filename
Specify the name of the msl file. When this option is not used in the command, the system uses the har filename as the msl filename.
-v/--verbose
Set the Logger::DEBUG level.
These commands provide access to legacy REST API commands supported by the appliance.
Use to access the legacy REST API for Test Runs (Protocol Mutation, Scenario Mutation, Denial-of-Service, and Published Vulnerability tests).
» see cmd_muapi options | » see documentation format | » back to top
help
- Gets help for all cmd_muapi commands.
help</b>mu cmd_muapi:help
archive
- Manage archives (reports) for Test Runs. The run command uses the uuid of the Test Run; the status and get commands require the job_id returned by the run command.
- To generate an archive:
- <b>`archive -c run -u`</b> <em>`uuid`</em> - `mu cmdd_muapi:archive -c run -u 52add3cf-9040-42ce-b263-8233039931d5` - To get the status of the archive report:
- <b>`archive -c status -u`</b> <em>`job-id`</em> - `mu cmd_muapi:archive -c status -u 1296064526931` - To download the archive report:
- <b>`archive -c get -u`</b> <em>`job-id`</em> - `mu cmd_muapi:archive -c get -u 1296064526931`
backup
- Manage system backup files. Supports
get,run, andstatuscommands. - To generate system backup:
- <b>`backup -c run`</b> - `mu cmd_muapi:backup -c run` - To get the status of the backup job:
- <b>`backup -c status`</b> - `mu cmd_muapi:backup -c status` - To download the backup file (requires a name):
- <b>`backup -c get -n`</b> <em>`filename`</em> - `mu cmd_muapi:backup -c get -n my-backup`
The appliance automatically appends the .dat extension to all backup files.
capture
- Manage packet captures recorded using the appliance. The
status</b> andget</b> commands require the job-id returned by therun</b> command. capture -c</b>command</em>-p</b>port-number</em>-u</b>job-id</em>- To start recording packets (this command returns the job-id):
- <b>`capture -c run -p`</b> <em>`port-number`</em> - `mu cmd_muapi:capture -c run -p a1` - To get the status of the packet recording job:
- <b>`capture -c status -p`</b> <em>`port-number`</em> <b>`-u`</b> <em>`job-id`</em> - `mu cmd_muapi:capture -c status -p a1 -u 1296064526931` - To download the recorded packet capture:
- <b>`capture -c get -p`</b> <em>`port-number`</em> <b>`-u`</b> <em>`job-id`</em> - `mu cmd_muapi:capture -c get -p a1 -u 1296064526931`
delete
- Delete the specified Test Run or template
delete -u</b>uuid</em>mu cmd_muapi:delete -u 52add3cf-9040-42ce-b263-8233039931d5
export_by_name
- Export the specified template.
export_by_name -n</b>name</em>-t</b>type</em>mu cmd_muapi:export_by_name -n my_monitor -t monitor
get_faults
- Get a list of faults (xml format) from a Test Run.
get_faults -u</b>uuid</em>-v</b>mu cmd_muapi:get_faults -u 52add3cf-9040-42ce-b263-8233039931d5 -v
get_name
- Get details for the specified Test Run or template.
get_name -u</b>uuid</em>mu cmd_muapi:get_name -u 52add3cf-9040-42ce-b263-8233039931d5
list
- Get a list of templates by type.
list -t</b>template-type</em>mu cmd_muapi:list -t monitor
list_by_status
- Get a list of Test Runs by status.
list_by_status -s</b>status</em>mu cmd_muapi:list_by_status -s finished
list_type
- Get a list of all template types.
list_types</b>mu cmd_muapi:list_types
pause
- Pause a Test Run.
pause -u</b>uuid</em>mu cmd_muapi:pause -u 52add3cf-9040-42ce-b263-8233039931d5
resume
- Resume a Test Run.
resume -u</b>uuid</em>mu cmd_muapi:pause -u 52add3cf-9040-42ce-b263-8233039931d5
run
- Start a Test Run (to rename, use the -b argument).
run -u</b>uuid</em>[<b>-b</b>new-name</em>]mu cmd_muapi:run -u 52add3cf-9040-42ce-b263-8233039931d5 -b true
status
- Get the status of a Test Run.
status -u</b>uuid</em>mu cmd_muapi:status -u 52add3cf-9040-42ce-b263-8233039931d5
stop
- Stop a Test Run.
stop -u</b>uuid</em>mu cmd_muapi:stop -u 52add3cf-9040-42ce-b263-8233039931d5
-b/--boolean value
Specify a boolean value (true or false).
-c/--command command
Specify the command to run (run, get, status, etc.)
-m/--mu_string user:password@mu-ip
Specify the user, password, and management IP of the appliance. Example:
admin:[email protected].
-n/--name name
Specify a Test Run or template name.
-o/--output filename
Specify the filename to which you want to output logs.
-p/--port port-number
Specify the port number.
-s/--status status
Specify the status filter (running, finished, aborted queued, or failed)
-t/--type template-type
Specify the type of template.
-u/--uuid uuid/job-id
Specify the UUID of the template to run. For archive, backup, and capture commands, this option takes a job-id value.
-v/--verbose
Set the Logger::DEBUG level.
Use to access the legacy REST API for configuring test interfaces, network hosts, and routes.
» see cmd_netconfig options | » see documentation format | » back to top
help
- Gets help for all cmd_netconfig commands.
help</b>mu cmd_netconfig:help
clear_hosts
- Remove all network hosts configured in the appliance.
clear_hosts</b>mu cmd_netconfig:clear_hosts
clear_interface
- Clear settings for specified test interfaces.
clear_interface -i</b>interface,interface</em>mu cmd_netconfig:clear_interface -i b1,b2
clear_routes
- Remove all user-configured routes in the appliance.
clear_routes</b>mu cmd_netconfig:clear_routes
clear_vlans
- Remove all vlans for all test interfaces.
clear_vlans</b>mu cmd_netconfig:clear_vlans
create
- Create a network object such as a host or route.
create -j</b>object</em>-e</b>value</em>mu cmd_netconfig:create -j "{"default": false,"direct": false,"dst": "10.0.0.0","dst_pfx_len": 8,"gateway": "192.168.100.1","interface": "a1","interface_display_name": "A1","metric": 1,"readonly": false}" -e routes
delete
- Delete a network object such as host or route.
delete -e</b>value</em>mu cmd_netconfig:delete -e Web-Server
get
- Get details for a network object.
get -e</b>value</em>mu cmd_netconfig:get -e a1
modify
- Modify a network object such as a host or route.
modify -j</b>object</em>-e</b>value</em>mu cmd_netconfig:modify -j {"mac": "","name": "Web-Server","notes": "","v4_addr": "192.168.112.205", "v6_global_addr": "","v6_local_addr": ""} -e host
resolve_hosts
- Get IP address for specified network host.
resolve_hosts</b>host</em>mu cmd_netconfig:resolve_hosts Web-Server
restore
- Restore from specified file (to overwrite existing object, use the -b argument).
restore -f</b>filepath</em>[<b>-b</b>clear-existing</em>]mu cmd_netconfig:restore -f my_muhosts/web-server.json true
save
- Save changes to the appliance.
save</b>mu cmd_netconfig:save
-b/--boolean value
Specify a boolean value (true or false).
-e/--element value
Specify a value for the associated command. Example:
interfacesorinterfaces/a1.
-f/--filepath filepath
Specify the path to a file.
-h/--help
Get help on command line options.
-i/--interfaces interface-or-host
Specify test interfaces or network hosts as a comma-separated list. Example:
b1,web-server.
-j/--json object
Specify a json object as a text string.
-m/--mu_string user:password@mu-ip
Specify a user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-v/--verbose
Set the Logger::DEBUG level.
Use to access the legacy REST API for Test Sets (Studio Verify).
» see cmd_ddt options | » see documentation format | » back to top
display_results
- Displays results for the current Test Set.
display_results</b>mu cmd_ddt:display_results
new_session
- Create a new session.
new_session</b>mu cmd_ddt:new_session
load_scenario
- Load the specified Scenario template.
load_scenario -u</b>uuid</em>mu cmd_ddt:load_scenario -u 52add3cf-9040-42ce-b263-8233039931d5
get_hosts
- Get a list of hosts in the Test Bed.
get_hosts</b>mu cmd_ddt:get_hosts
set_hosts
- Configure the hosts in the Test Bed. Requires host role, host name, and type (network layer).
set_hosts -r</b>role,role</em>-n</b>name,name</em>-y</b>type</em>mu cmd_ddt:set_hosts -r HTTP_Client,HTTP_Server -n a1,Web-Server -y v4
get_channels
- Get a list of channels in the Test Bed.
get_channels</b>mu cmd_ddt:get_channels
set_channels
- Configure the channels in the Test Bed.
set_channels -r</b>role</em>-n</b>name</em>mu cmd_ddt:set_channels -r SSH_Channel -n Web-Server
get_options
- Get a list of options in the Test Set.
get_options</b>mu cmd_ddt:get_options
set_options
- Configure the option values for the Test Set.
set_options -n</b>name</em>-p</b>value</em>mu cmd_ddt:set_options -n username -p jsmith
get_sessions
- Get a list of all sessions.
get_sessions</b>mu cmd_ddt:get_sessions
setup_test
- Setup the Test Bed, reserving the test interfaces.
setup_test</b>mu cmd_ddt:setup_test
run
- Run a Test Set.
run</b>mu cmd_ddt:run
run_testset
- Run the specified Test Set.
run_testset -u</b>uuid</em>mu cmd_ddt:run_testset -u 04aa248a-0b9b-4bf6-97e1-aab691d0acf1
get_testset_results
- Get results for the current Test Set.
get_testset_results</b>mu cmd_ddt:get_testset_results
get_testset_status
- Get status for the current Test Set.
get_testset_status</b>mu cmd_ddt:get_testset_status
teardown_test
- Unsets the Test Bed selections, releasing the test interfaces.
teardown_test</b>mu cmd_ddt:teardown_test
close_session
- Closes the current session.
close_session</b>mu cmd_ddt:close_session
close_all_sessions
- Closes all existing sessions.
close_all_sessions</b>mu cmd_ddt:close_all_sessions
csv_export
- Exports a Test Set from the appliance to a csv file.
csv_export -u</b>uuid</em>mu cmd_ddt:csv_export -u 52add3cf-9040-42ce-b263-8233039931d5
csv_import
- Imports a .csv file to create a Test Set on the appliance.
csv_import -t</b>filename.csv</em>mu cmd_ddt:csv_import -t my-testset.csv
-f/--filename filename
Specify the template name for saving an imported Test Set.
-h/--help
Get help on command line options.
-m/--mu_string user:password@mu-ip
Specify a user, password, and management IP address of the appliance. Example:
admin:[email protected].
-n/--names name-array
Specify host names or channel names in a comma-separated array. Example:
a1,Web-Server.
-o/--output filename
Specify the filename to which you want to output logs.
-p/--option_values value-array
Specify values for Test Set options in a comma-separated array. Example:
bob,jane,mary,tom.
-r/--roles role-array
Specify host roles in a comma-separated array. Example:
HTTP\_Client,HTTP\_Server.
-t/--testset filename.csv
Specify the name of the .csv file to import.
-u/--uuid uuid
Specify the UUID of the Scenario or Test Set.
-v/--verbose
Set the Logger::DEBUG level.
-y/--type type
Specify network layer (v4, v6, l2) for all hosts in the Test Bed. Example:
v4.
Use to access the legacy REST API for Scale tests (Studio Scale).
» see cmd_scale options | » see documentation format | » back to top
about
- Lists information for the Scale Player and all active and inactive Scale Engines.
about</b>mu cmd_scale:about
configure
- Configure parameter values for any element of the scale json object.
configure -p</b>parameter</em>-pv</b>value</em>mu cmd_scale:configure -p json_element -pv json_element_value
data
- Gets chart data for the Scale test.
data -w</b>view</em>-z</b>zoom</em>-ps</b>position</em>-b</b>bot_id</em>mu cmd_scale:data -w TIMELINE -z 1 -ps 0 -b bots_10.10.6.200:1
delete_scale_engine
- Delete the specified Scale Engine.
delete_scale_engine -b</b>bot_id</em>mu cmd_scale:delete_scale_engine -b bots_10.10.6.200:1
help
- Gets help for all cmd_scale commands.
help</b>mu cmd_scale:help
list
- Returns the current Scale Player's UUID.
list</b>mu cmd_scale:list
pcap
- Gets a pcap from a specific Scale Engine.
pcap -b</b>bot_id</em>-f</b>filename</em>mu cmd_scale:pcap -b bots_10.10.6.200:1 -f bot_1_pcap
release
- Release the Scale Player.
release</b>mu cmd_scale:release
release_scale_engine
- Releases the specified Scale Engine.
release_scale_engine -b</b>bot_id</em>mu cmd_scale:release_scale_engine -b bots_10.10.6.200:1
reserve_scale_engine
- Reserves the specified Scale Engine.
reserve_scale_engine -b</b>bot_id</em>mu cmd_scale:reserve_scale_engine -b bots_10.10.6.200:1
session
- Create a new Scale Player session.
session</b>mu cmd_scale:session
start
- Start the Scale test.
start -c</b>scale-test</em>-m</b>user:pass@mu-ip</em>mu cmd_scale:start -c scale.json -m admin:[email protected]
status
- Gets information about the currently running Scale test.
status</b>mu cmd_scale:status
statuses
- Gets the status of all active and inactive Scale engines.
statuses</b>mu cmd_scale:statuses
stop
- Stops the Scale test.
stop</b>mu cmd_scale:stop
update
- Update the pattern dynamically (while the Scale test is running).
update -p</b>parameter</em>-pv</b>parameter-value</em>mu cmd_scale:update -p delay -pv 250 -p volume -pv 100000
verify
- Verifies a Scale test.
verify</b>mu cmd_scale:verify
-b/--bot-id scale-engine-id
Specify a Scale Engine using its bot-id value.
-c/--config-file json-filename
Specify a .json file that contains the configuration data.
-f/--filename pcap-filename
Specify a name for the .pcap file.
-h/--help
Get help on command line options.
-m/--mu_string user:password@mu-ip
Specify a user, password, and management IP of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-p/--params parameters
Specify parameters for initial configuration or for update. Supports delay and volume parameters.
-ps/--view_position value
Specify the position in the timeline view for which to return data. At this time, only position 0 is supported.
-pv/--param_value value
Specify a value for a parameter.
-v/--verbose
Set the Logger::DEBUG level.
-w/--view view
Specify the view (RUNTIME or CALLGRAPH) for which to return data.
-z/--zoom zoom-level
Specify the zoom level (0, .5, or 1) in the timeline view for which to return data. 1 returns data for 100% of the time range, 0.5 returns data for 50% of the time range, and 0 returns only the last minute of data.
Use to access information displayed on the appliance UI homepage, such as recent updates, backup status, or a list of latest test results.
» see cmd_homepage options | » see documentation format | » back to top
all
- Gets the complete set of information displayed on the appliance UI home page.
all</b>mu cmd_homepage:all
help
- Gets help for all cmd_homepage commands.
help</b>mu cmd_homepage:help
latest_test
- Gets an array of the latest test results.
latest_test</b>mu cmd_homepage:latest_test
queue_test
- Gets an array of tests in the Test Queue.
queue_test</b>mu cmd_homepage:queue_test
recent
- Gets the "What's New" section from the appliance UI homepage.
recent</b>mu cmd_homepage:recent
status
- Gets system status for licenses, backup, and updates.
status</b>mu cmd_homepage:status
-h/--help
Get help on command line options.
-m/--mu_string user:password@mu-ip
Specify a user, password, and management IP address of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-v/--verbose
Set the Logger::DEBUG level.
Use to restart system services or to get status details for the appliance.
» see cmd_system options | » see documentation format | » back to top
restart
- Restart Studio services (this does not reboot the appliance).
restart</b>mu cmd_system:restart
status
- Gets all information from the system status page.
status</b>mu cmd_system:status
status2
- Gets additional system information such as hard drive status, platform model, serial number.
status2</b>mu cmd_system:status2
-h/--help
Get help on command line options.
-m/--mu_string user:password@mu-ip
Specify a user, password, and management IP address of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-v/--verbose
Set the Logger::DEBUG level.
Use to access the Mu CLI.
» see cmd_cli options | » see documentation format | » back to top
cli_help
- Get help for all cmd_cli commands.
cli_help</b>mu cmd_cli:cli_help
cli_history
- Display the command line history for the current session.
cli_help</b>mu cmd_cli:history
ping
- Ping the specified IP address from the appliance.
ping -a</b>ip-address</em>mu cmd_cli:ping -a 10.10.10.1
question
- Show the available CLI commands.
question</b>mu cmd_cli:question
traceroute
- Get the network route to a specified IP address from the appliance.
traceroute -a</b>ip-address</em>mu cmd_cli:traceroute -a 10.10.10.1
-h/--help
Get help on command line options.
-m/--mu_string user**:password@**mu-ip
Specify a user, password, and management IP address of the appliance. Example:
admin:[email protected].
-o/--output filename
Specify the filename to which you want to output logs.
-v/--verbose
Set the Logger::DEBUG level.
These API library classes can be required and used within Ruby scripts (like most ruby gems).
require 'rubygems'
require 'mu'
api = Mu::Muapi.new(“*mu-ip*”,”*user*”,”*pass*”)
$log.level = Logger::INFO
api.list_by_status("running")
require 'rubygems'
require 'mu'
api = Mu::Ddt.new(“*mu-ip*”,”*user*”,”*pass*”)
$log.level = Logger::INFO
api.new_session
require ‘rubygems’
require ‘mu’
api = Mu::Scale.new(“*mu-ip*”,”*user*”,”*pass*”)
$log.level=Logger::INFO
api.configure(musl, *scenario.msl*)
api.configure(csv, *testset.csv*)
api.configure(pattern, *pattern.json*)
For each file type (scenario.msl, testset.csv, pattern.json) you must pass the file contents encoded as a Ruby string. For example:
muslString = File.open(‘*scenario.msl*’, ‘r’, {|f| f.read}
api.configure(musl, muslString)
api.start
api.status
api.stop
api.release
require 'rubygems'
require 'mu'
api = Mu::Netconfig.new(“*mu-ip*”,”*user*”,”*pass*”)
$log.level = Logger::INFO
api.get("hosts")
Copyright 2012 Spirent Communications plc, All Rights Reserved.