.\" Man page generated from reStructuredText. . .TH "LAVA-TOOL" "1" "June 27, 2014" "0.11.2 " "LAVA Tool" .SH NAME lava-tool \- LAVA Tool Command Line Support . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SUMMARY .sp \fBlava\-tool\fP is a command\-line tool to interact with LAVA. .SH USAGE .sp lava\-tool [\-h] [args] .SH OPTIONAL ARGUMENTS .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .UNINDENT .UNINDENT .SH SUBCOMMANDS .sp Type \fBlava\-tool \-h\fP for help on a specific subcommand. .SH AVAILABLE SUBCOMMANDS .INDENT 0.0 .TP .B data\-views Show data views defined on the server .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool data\-views [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [\-\-experimental\-notice] .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .TP .B Experimental commands: .INDENT 7.0 .TP .B \-\-experimental\-notice Explain the nature of experimental commands .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B job\-output Get job output from the scheduler .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool job\-output [\-h] [\-\-overwrite] [\-\-output OUTPUT] SERVER JOB_ID .TP .B Positional arguments: .INDENT 7.0 .TP .B SERVER Host to download job output from .TP .B JOB_ID Job ID to download output file .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .B \-\-overwrite Overwrite files on the local disk .TP .BI \-\-output \ OUTPUT\fP,\fB \ \-o \ OUTPUT Alternate name of the output file .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B help Show a summary of all available commands .TP .B deserialize Deserialize a bundle on the server .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool deserialize [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] SHA1 .TP .B Positional arguments: .INDENT 7.0 .TP .B SHA1 SHA1 of the bundle to deserialize .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B get Download a bundle from the server .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool get [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [\-\-overwrite] [\-\-output OUTPUT] SHA1 .TP .B Positional arguments: .INDENT 7.0 .TP .B SHA1 SHA1 of the bundle to download .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .B \-\-overwrite Overwrite files on the local disk .TP .BI \-\-output \ OUTPUT\fP,\fB \ \-o \ OUTPUT Alternate name of the output file .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B auth\-add Add an authentication token .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool auth\-add [\-h] [\-\-token\-file TOKEN_FILE] [\-\-no\-check] HOST .TP .B Positional arguments: .INDENT 7.0 .TP .B HOST Endpoint to add token for, in the form scheme://username@host. The username will default to the currently logged in user. .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .BI \-\-token\-file \ TOKEN_FILE Read the secret from here rather than prompting for it. .TP .B \-\-no\-check By default, a call to the remote server is made to check that the added token works before remembering it. Passing this option prevents this check. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B put Upload a bundle on the server .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool put [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] LOCAL [REMOTE] .TP .B Positional arguments: .INDENT 7.0 .TP .B LOCAL pathname on the local file system .TP .B REMOTE pathname on the server .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B bundles Show bundles in the specified stream .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool bundles [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [PATHNAME] .TP .B Positional arguments: .INDENT 7.0 .TP .B PATHNAME pathname on the server (defaults to /anonymous/) .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B server\-version Display dashboard server version .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool server\-version [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B cancel\-job Cancel job .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool cancel\-job [\-h] SERVER JOB_ID .TP .B Positional arguments: .INDENT 7.0 .TP .B SERVER Host to cancel job on .TP .B JOB_ID Job ID to cancel .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B resubmit\-job Resubmit job .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool resubmit\-job [\-h] SERVER JOB_ID .TP .B Positional arguments: .INDENT 7.0 .TP .B SERVER Host to resubmit job on .TP .B JOB_ID Job ID to resubmit .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B version Show dashboard client version .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool version [\-h] .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B restore Restore a dashboard instance from backup .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool restore [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] BACKUP_DIR .TP .B Positional arguments: .INDENT 7.0 .TP .B BACKUP_DIR Directory to backup from .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B query\-data\-view Invoke a specified data view .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool restore [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [\-\-experimental\-notice] QUERY .TP .B Positional arguments: .INDENT 7.0 .TP .B QUERY Data view name and any optional and required arguments .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .TP .B Experimental commands: .INDENT 7.0 .TP .B \-\-experimental\-notice Explain the nature of experimental commands .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B submit\-job Submit a job to lava\-scheduler .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool submit\-job [\-h] SERVER JSON_FILE .TP .B Positional arguments: .INDENT 7.0 .TP .B SERVER Host to resubmit job on .TP .B JSON_FILE JSON file with test defenition to submit .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Experimental commands: .INDENT 7.0 .TP .B \-\-experimental\-notice Explain the nature of experimental commands .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B streams Show streams you have access to .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool streams [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B backup Backup data uploaded to a dashboard instance. .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool backup [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] BACKUP_DIR .TP .B Positional arguments: .INDENT 7.0 .TP .B BACKUP_DIR Directory to backup to .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .sp Not all data is preserved. The following data is lost: identity of the user that uploaded each bundle, time of uploading and deserialization on the server, name of the bundle stream that contained the data. .UNINDENT .UNINDENT .TP .B make\-stream Create a bundle stream on the server .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool make\-stream [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [\-\-name NAME] pathname .TP .B Positional arguments: .INDENT 7.0 .TP .B pathname Pathname of the bundle stream to create .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .BI \-\-name \ NAME Name of the bundle stream (description) .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .UNINDENT .UNINDENT .UNINDENT .TP .B pull Copy bundles and bundle streams from one dashboard to another .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .TP .B Usage: lava\-tool pull [\-h] \-\-dashboard\-url URL [\-\-verbose\-xml\-rpc] [\-\-experimental\-notice] FROM [STREAM [STREAM ...]] .TP .B Positional arguments: .INDENT 7.0 .TP .B FROM URL of the remote validation dashboard .UNINDENT .TP .B Optional arguments: .INDENT 7.0 .TP .B \-h\fP,\fB \-\-help show this help message and exit .UNINDENT .TP .B Dashboard specific arguments: .INDENT 7.0 .TP .BI \-\-dashboard\-url \ URL URL of your validation dashboard .UNINDENT .INDENT 7.0 .TP .B STREAM Streams to pull from (all by default) .UNINDENT .TP .B Debugging arguments: .INDENT 7.0 .TP .B \-\-verbose\-xml\-rpc Show XML\-RPC data .UNINDENT .TP .B Experimental commands: .INDENT 7.0 .TP .B \-\-experimental\-notice Explain the nature of experimental commands .UNINDENT .UNINDENT .sp This command checks for two environment varialbes: The value of DASHBOARD_URL is used as a replacement for \-\-dashbard\-url. The value of REMOTE_DASHBOARD_URL as a replacement for FROM. Their presence automatically makes the corresponding argument optional. .UNINDENT .UNINDENT .UNINDENT .SH LAVA TEST DEFINITIONS .sp A LAVA Test Definition comprises of two parts: .INDENT 0.0 .IP \(bu 2 the data to setup the test, expressed as a JSON file. .IP \(bu 2 the instructions to run inside the test, expressed as a YAML file. .UNINDENT .sp This allows the same tests to be easily migrated to a range of different devices, environments and purposes by using the same YAML files in multiple JSON files. It also allows tests to be built from a range of components by aggregating YAML files inside a single JSON file. .SH CONTENTS OF THE JSON FILE .sp The JSON file is submitted to the LAVA server and contains: .INDENT 0.0 .IP \(bu 2 Demarcation as a health check or a user test. .IP \(bu 2 The default timeout of each action within the test. .IP \(bu 2 The logging level for the test, DEBUG or INFO. .IP \(bu 2 The name of the test, shown in the list of jobs. .IP \(bu 2 The location of all support files. .IP \(bu 2 All parameters necessary to use the support files. .IP \(bu 2 The declaration of which device(s) to use for the test. .IP \(bu 2 The location to which the results should be uploaded. .IP \(bu 2 The JSON determines how the test is deployed onto the device and where to find the tests to be run. .UNINDENT .SH BASIC JSON FILE .sp Your first LAVA test should use the \fBDEBUG\fP logging level so that it is easier to see what is happening. .sp A suitable \fBtimeout\fP for your first tests is 900 seconds. .sp Make the \fBjob_name\fP descriptive and explanatory, you will want to be able to tell which job is which when reviewing the results. .sp Make sure the \fBdevice_type\fP matches exactly with one of the suitable device types listed on the server to which you want to submit this job. .sp Change the stream to one to which you are allowed to upload results, on your chosen server. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C { "health_check": false, "logging_level": "DEBUG", "timeout": 900, "job_name": "kvm\-basic\-test", "device_type": "kvm", "actions": [ { "command": "deploy_linaro_image", "parameters": { "image": "http://images.validation.linaro.org/kvm\-debian\-wheezy.img.gz" } }, { "command": "lava_test_shell", "parameters": { "testdef_repos": [ { "git\-repo": "git://git.linaro.org/qa/test\-definitions.git", "testdef": "ubuntu/smoke\-tests\-basic.yaml" } ], "timeout": 900 } }, { "command": "submit_results_on_host", "parameters": { "stream": "/anonymous/example/", "server": "http://localhost/RPC2/" } } ] } .ft P .fi .UNINDENT .UNINDENT .SH NOTE .sp Always check your JSON syntax. A useful site for this is \fI\%http://jsonlint.com\fP\&. .SH AUTHOR Linaro Validation Team .SH COPYRIGHT 2010-2013, Linaro Limited .\" Generated by docutils manpage writer. .