Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions ocaml/xapi-idl/cluster/cli-help.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
$ ./cluster_cli.exe --help=plain
NAME
cluster_cli - A CLI for the cluster API. This tool is not intended to
be used as an end user tool

SYNOPSIS
cluster_cli [COMMAND] …

COMMANDS
Observer.create [OPTION]… dbg uuid name_label dict endpoints bool

Observer.destroy [OPTION]… dbg uuid

Observer.init [OPTION]… dbg

Observer.set_attributes [OPTION]… dbg uuid dict

Observer.set_compress_tracing_files [OPTION]… dbg bool

Observer.set_enabled [OPTION]… dbg uuid bool

Observer.set_endpoints [OPTION]… dbg uuid endpoints

Observer.set_export_interval [OPTION]… dbg float

Observer.set_host_id [OPTION]… dbg string

Observer.set_max_file_size [OPTION]… dbg int

Observer.set_max_spans [OPTION]… dbg int

Observer.set_max_traces [OPTION]… dbg int

Observer.set_trace_log_dir [OPTION]… dbg string

UPDATES.get [OPTION]… dbg timeout
Get updates from corosync-notifyd, this blocking call will return
when there is an update from corosync-notifyd or it is timed out
after timeout_p seconds

create [OPTION]… dbg init_config
Creates the cluster. The call takes the initial config of the
initial host to add to the cluster. This will be the address on
which the rings will be created.

declare-changed-addrs [OPTION]… dbg changed_members
Declare that one or more hosts in the cluster have changed
address. Only use this command if unable to rejoin the cluster
using `enable` because the IPv4 addresses of all nodes this node
previously saw are now invalid. If any one of these addresses
remains valid on an enabled node then this action is unnecessary.

declare-dead [OPTION]… dbg dead_members
Declare that some hosts in the cluster are permanently dead.
Removes the hosts from the cluster. If the hosts do attempt to
rejoin the cluster in future, this may lead to fencing of other
hosts and/or data loss or data corruption.

destroy [OPTION]… dbg
Destroys a created cluster

diagnostics [OPTION]… dbg
Returns diagnostic information about the cluster

disable [OPTION]… dbg
Stop the cluster on this host; leave the rest of the cluster
enabled. The cluster can be reenabled either by restarting the
host, or by calling the `enable` API call.

enable [OPTION]… dbg init_config
Rejoins the cluster following a call to `disable`. The parameter
passed is the cluster config to use (optional fields set to None
unless updated) in case it changed while the host was disabled.
(Note that changing optional fields isn't yet supported, TODO)

join [OPTION]… dbg token new_member tls_config existing_members
Adds a node to an initialised cluster. Takes the IPv4 address of
the new member and a list of the addresses of all the existing
members.

leave [OPTION]… dbg
Causes this host to permanently leave the cluster, but leaves the
rest of the cluster enabled. This is not a temporary removal - if
the admin wants the hosts to rejoin the cluster again, he will
have to call `join` rather than `enable`.

set-tls-verification [OPTION]… dbg server_pem_path
trusted_bundle_path cn enabled
Enable or disable TLS verification for xapi/clusterd
communication. The trusted_bundle_path is ignored when
verification is disabled and can be empty

switch-cluster-stack [OPTION]… dbg cluster_stack
Switch cluster stack version to the target

COMMON OPTIONS
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or plain
whenever the TERM env var is dumb or undefined.

--version
Show version information.

EXIT STATUS
cluster_cli exits with:

0 on success.

123 on indiscriminate errors reported on standard error.

124 on command line parsing errors.

125 on unexpected internal errors (bugs).

6 changes: 2 additions & 4 deletions ocaml/xapi-idl/cluster/dune
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
xapi-idl
xapi-idl.cluster))

(rule
(alias runtest)
(deps (:x cluster_cli.exe))
(cram
(package xapi-idl)
(action (run %{x} --help=plain)))
(deps cluster_cli.exe))
90 changes: 90 additions & 0 deletions ocaml/xapi-idl/example/cli-help.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
$ ./example.exe --help=plain
NAME
Example-service

SYNOPSIS
Example-service [OPTION]…

DESCRIPTION
This is an example service which demonstrates the configuration
mechanism.

OPTIONS
--config=VAL (absent=/etc/example.exe.conf)
Location of configuration file

--config-dir=VAL (absent=/etc/example.exe.conf.d)
Location of directory containing configuration file fragments

--default-format=VAL (absent=vhd)
Default format for disk files

--disable-logging-for=VAL
A space-separated list of debug modules to suppress logging from

--inventory=VAL (absent=/etc/xensource-inventory)
Location of the inventory file

--log=VAL (absent=syslog:daemon)
Where to write log messages

--loglevel=VAL (absent=debug)
Log level

--ls=VAL (absent=/bin/ls)
program used to list things

--pidfile=VAL (absent=/var/run/example.exe.pid)
Filename to write process PID

--queue-name=VAL (absent=org.xen.xapi.ffs)
Comma-separated list of queue names to listen on

--search-path=VAL
Search path for resources

--sh=VAL (absent=/bin/sh)
interpreter for arcane programming language

--socket-path=VAL (absent=/var/xapi/socket)
Path of listening socket

--sr-mount-path=VAL (absent=/mnt)
Default mountpoint for mounting remote filesystems

--switch-path=VAL (absent=/var/run/message-switch/sock)
Unix domain socket path on localhost where the message switch is
listening

--timeslice=VAL (absent=0.05)
timeslice in seconds

--use-switch=VAL (absent=true)
true if the message switch is to be enabled

COMMON OPTIONS
These options are common to all services.

--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or plain
whenever the TERM env var is dumb or undefined.

--version
Show version information.

EXIT STATUS
Example-service exits with:

0 on success.

123 on indiscriminate errors reported on standard error.

124 on command line parsing errors.

125 on unexpected internal errors (bugs).

BUGS
Check bug reports at http://github.com/xapi-project/xen-api


6 changes: 2 additions & 4 deletions ocaml/xapi-idl/example/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
)
(preprocess (pps ppx_deriving_rpc)))

(rule
(alias runtest)
(deps (:x example.exe))
(cram
(package xapi-idl)
(action (run %{x} --help=plain)))
(deps example.exe))
58 changes: 58 additions & 0 deletions ocaml/xapi-idl/gpumon/cli-help.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
$ ./gpumon_cli.exe --help=plain
NAME
gpumon_cli - A CLI for the GPU monitoring API. This allows scripting
of the gpumon daemon for testing and debugging. This tool is not
intended to be used as an end user tool

SYNOPSIS
gpumon_cli [COMMAND] …

COMMANDS
get_pgpu_metadata [OPTION]… debug_info pgpu_address
Gets the metadata for a pGPU, given its address (PCI bus ID).

get_pgpu_vgpu_compatibility [OPTION]… debug_info
nvidia_pgpu_metadata nvidia_vgpu_metadata_list
Checks compatibility between a pGPU (on a host) and a list of
vGPUs (assigned to a VM). Note: A VM may use several vGPUs. The
use case is VM.suspend/VM.resume: before VM.resume
[nvidia_vgpu_metadata] of the suspended VM is checked against the
[nvidia_pgpu_metadata] on the host where the VM is resumed.

get_pgpu_vm_compatibility [OPTION]… debug_info pgpu_address domid
nvidia_pgpu_metadata
Checks compatibility between a VM's vGPU(s) and another pGPU.

get_vgpu_metadata [OPTION]… debug_info domid pgpu_address vgpu_uuid
Obtains metadata for all vGPUs running in a domain.

nvml_attach [OPTION]… debug_info
Attach nVidia cards to Gpumon for metrics and compatibility
checking.

nvml_detach [OPTION]… debug_info
Detach nVidia cards from Gpumon

nvml_is_attached [OPTION]… debug_info
Return true if nVidia cards are currently attached.

COMMON OPTIONS
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or plain
whenever the TERM env var is dumb or undefined.

--version
Show version information.

EXIT STATUS
gpumon_cli exits with:

0 on success.

123 on indiscriminate errors reported on standard error.

124 on command line parsing errors.

125 on unexpected internal errors (bugs).

6 changes: 2 additions & 4 deletions ocaml/xapi-idl/gpumon/dune
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
xapi-idl
xapi-idl.gpumon))

(rule
(alias runtest)
(deps (:x gpumon_cli.exe))
(cram
(package xapi-idl)
(action (run %{x} --help=plain)))
(deps gpumon_cli.exe))
53 changes: 53 additions & 0 deletions ocaml/xapi-idl/guard/privileged/cli-help.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
$ ./xapiguard_cli.exe --help=plain
NAME
xapiguard_cli - A CLI for the deprivileged socket spawning API. This
allows scripting of the varstored and SWTPM deprivileging daemon for
testing and debugging. This tool is not intended to be used as an end
user tool

SYNOPSIS
xapiguard_cli [COMMAND] …

COMMANDS
varstore_create [OPTION]… dbg vm_uuid gid path
Create a deprivileged varstore socket that only accepts API calls
for a specific VM. The socket will be writable only to the
specified group.

varstore_destroy [OPTION]… dbg gid path
Stop listening on varstore sockets for the specified group

vtpm_create [OPTION]… dbg vm_uuid gid path
Create a deprivileged vtpm socket that only accepts API calls for
a specific VM. The socket will be writable only to the specified
group.

vtpm_destroy [OPTION]… dbg gid path
Stop listening on vtpm sockets for the specified group

vtpm_get_contents [OPTION]… dbg vtpm_uuid
Get vTPM contents blob

vtpm_set_contents [OPTION]… dbg vtpm_uuid string
Set vTPM contents blob

COMMON OPTIONS
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or plain
whenever the TERM env var is dumb or undefined.

--version
Show version information.

EXIT STATUS
xapiguard_cli exits with:

0 on success.

123 on indiscriminate errors reported on standard error.

124 on command line parsing errors.

125 on unexpected internal errors (bugs).

8 changes: 3 additions & 5 deletions ocaml/xapi-idl/guard/privileged/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@
(package varstored-guard)
(libraries
cmdliner

rpclib.cmdliner
rpclib.core
rpclib.markdown
xapi-idl
xapi-idl.guard.privileged
))

(rule
(alias runtest)
(deps xapiguard_cli.exe)
(cram
(package varstored-guard)
(action (run %{deps} --help=plain)))
(deps xapiguard_cli.exe))
Loading
Loading