arcli man page

arcli — Autotest RPC Client Application

Synopsis

arcli [-h] [--host HOST]

{test,linuxdistro,host,testenvironment,job,server,regressionpoint,label,user}

Description

arcli is the Autotest RPC client command line interface application. In a nutshell, it allows users to interact with an Autotest server by means of its RPC service.

Options

The following list of options are global arcli options. Most options are actually sub command options, as described in the Sub Commands section:

-h, --help           show this help message and exit
--host HOST          Hostname or IP address for the autotest server

Sub Commands

arcli usage is broken into sub commands. This is the current list of sub commands:

  • host
  • job
  • label
  • test
  • server
  • user
  • linuxdistro
  • testenvironment

Most sub commands accept common options, such as -n|--name and -i|--id. So, suppose you're looking for a job with an specific ID, you'd use:

$ arcli job -i <job_id> ...

Likewise, when looking for a host with a given name, you'd use:

$ arcli host -n <host_name> ...

Host Sub Command

arcli host [-h] (-l | -j | -a | -d | --lock | --unlock | --reverify)
[-n NAME] [-i ID]

Description

The host command allows the user to manipulate hosts on an autotest server, including adding new hosts and removing existing ones.

It's also possible to manage their temporary availability, which is known as locking and unlocking machines.

If a given host is not in "Ready" state, you can also ask for a re-verification job to be sent.

Action Arguments

-l, --list-brief

list all records briefly

-j, --list-jobs

list the jobs running on the listed hosts

-a, --add

add a new entry

-d, --delete

delete an existing object

--lock

locks the host (makes it unavailable to new jobs)

--unlock

unlocks the host (makes it available to new jobs)

--reverify

schedules a host reverification job

Optional Arguments

-n, --name

name, usually the FQDN

-i, --id

numeric identification of the host

Adding a New Host

To add a new host you just have to provide its name, which is usually the hostname or the fully qualified host name:

$ arcli host -a -n host.testgrid.example

The long form of the command would be:

$ arcli host --add --name host.testgrid.example

Removing an Existing Host

To remove an existing host you can provide either its name or its numeric identifier:

$ arcli host -d -n host.testgrid.example
$ arcli host -d -i 1

The long form of the command would be:

$ arcli host --delete --name host.testgrid.example
$ arcli host --delete --id 1

Listing Hosts

You can list the hosts registered on the server by using:

$ arcli host -l

or:

$ arcli host --list-brief

Listing Jobs

You can list the test jobs that are currently running on each host by using:

$ arcli host -j

or:

$ arcli host --list-jobs

Locking a Host

To lock a host and make it unavailable for the server to schedule new jobs on it, run:

$ arcli host --lock -n host.fqdn.org

You could use a host numeric identifier:

$ arcli host --lock -i 1

Unlocking a Host

To unlock a host and make it available for the server to schedule new jobs on it, run:

$ arcli host --unlock -n host.fqdn.org

Test Sub Command

arcli test [-h] (-l | -a | -d) [-n NAME] [-i ID]

Description

The test sub command allows to register new tests and list tests already registered on the Autotest server. Please note that registering a new test means just that, you probably would still need to copy the test files to the server so that it the server can deploy it to test machines.

Action Arguments

-l, --list-brief

list all records briefly

-a, --add

add a new entry

-d, --delete

delete an existing object

Optional Arguments

-n, --name

name of the object

-i, --id

numeric identification of the object

Testenvironment Sub Command

arcli testenvironment [-h] (-s SHOW | -d DIFF)

Description

A test environment is a collection of the environment that existed during a test run. Since a test runs on a machine, this environment information may be what differs a test with a PASS from a test with a FAIL result.

Action Arguments

-s, --show

show details about a test environment

-d, --diff

shows differences between two test environments

Job Sub Command

arcli job [-h] (-l | -a | -d JOB_ID | -s JOB_ID) [-n NAME] [-i ID]
[-c CONTROL_FILE] [-t TEST_TYPE] [-m MACHINES] [-e EMAIL]
[-p PRIORITY] [-P PROFILES] [-B REBOOT_BEFORE]
[-A REBOOT_AFTER] [--all] [-T TEST_ID] [-E]

Description

The job command lets users submit new jobs with various parameters, abort jobs that are running and list both currently running jobs and previous jobs submitted to the server.

Action Arguments

-l, --list-brief

list all records briefly

-a, --add

add (create) a new job

-d, --delete

delete (abort) a queued or running job

-s, --show

shows details about a job

Optional Arguments

-n, --name

name of the object

-i, --id

numeric identification of the object

-c, --control-file

path to the control file defining the job

-t, --test-type

the type of test

-m, --machines

the machine specification on where to run the test, either a list of machines or n*label

-e, --email

A comma seperated list of email addresses to notify of job completion

-p, --priority

the priority of test, used by the scheduler

-P, --profiles

the list of profiles for the hosts

-B, --reboot-before

Should test machines be rebooted before the job execution?

-A, --reboot-after

Should test machines be rebooted after the job execution?

--all

Show all information. Either show all jobs or all information about a given job. Depends on the given command

-T, --from-test-number

Add (create) a new job using the control filefrom a test registered on the autotest server

-E, --edit-before-sending

Open control file in editor before sending the control file to the server.

Submitting a New Job

The basis for a job in Autotest is a control file, and that's what you'll need before submitting a new job.

Suppose you have a local copy of the Autotest source tree at /home/user/autotest, and the sleep test control file at /home/user/autotest/client/tests/sleeptest/control.

Also, suppose you want the job to be run on a specific machine named wakemeup.testgrid.example. To send this job you'd run:

$ arcli job -a -m wakemeup.testgrid.example -n 'my sleep test' \
  -c /home/user/autotest/client/tests/sleeptest/control

Label Sub Command

arcli label [-h] (-l | -L | -a | -d) [-n NAME] [-i ID]

Description

The label command allows to create new labels and list existing labels.

Action Arguments

-l, --list-brief

list all records briefly

-L, --list-full

list all records with all information

-a, --add

add a new entry

-d, --delete

delete an existing object

Optional Arguments

-n, --name

name of the object

-i, --id

numeric identification of the object

Linuxdistro Sub Command

arcli linuxdistro [-h] (-s | -d) [-i ID] [-p PAIR]

Description

The linuxdistro command allows you to inspect the distribution name and version numbers.

Action Arguments

-s, --show

show details about a linux distro

-d, --diff

shows differences between two linux distros

Optional Arguments

-i, --id

numeric identification of the object

-p, --pair

pair of linux distro IDs for comparison

Server Sub Command

arcli server [-h] (-s | -l)

Description

The server command allows you to inspect server characteristics.

Action Arguments

-s, --status

obtain the status of the Autotest server

-l, --list-install-profiles

list the available installation profiles

User Sub Command

arcli user [-h] (-l | -L | -a | -d | -s USER_ID) [-n NAME] [-i ID]

Description

The user command allows you to inspect user characteristics.

Action Arguments

-l, --list-brief

list all records briefly

-L, --list-full

list all records with all information

-a, --add

add a new entry

-d, --delete

delete an existing object

-s, --show

shows details about an user

Optional Arguments

-n, --name

name of the object

-i, --id

numeric identification of the object

Files

/etc/arc.conf
   system wide configuration file

~/.arc.conf
   user specific configuration file

Bugs

If you find a bug, please report it over our github page as an issue.

Author

Cleber Rosa <cleber@redhat.com>

Info

0.7.1