Citrix Systems 5.6 manual Low-level list commands

Models: 5.6

1 235
Download 235 pages 37.88 Kb
Page 166
Image 166

<class>-param-getuuid=<uuid> param-name=<parameter>[param-key=<key>]

Returns the value of a particular parameter. If the parameter is a map, specifying the param-key will get the value associated with that key in the map. If param-key is not specified, or if the parameter is a set, it will return a string representation of the set or map.

<class>-param-setuuid=<uuid> param=<value>...

Sets the value of one or more parameters.

<class>-param-adduuid=<uuid> param-name=<parameter>[<key>=<value>...] [param-key=<key>]

Adds to either a map or a set parameter. If the parameter is a map, add key/value pairs using the <key>=<value> syntax. If the parameter is a set, add keys with the <param-key>=<key>syntax.

<class>-param-removeuuid=<uuid> param-name=<parameter>param-key=<key>

Removes either a key/value pair from a map, or a key from a set.

<class>-param-clearuuid=<uuid> param-name=<parameter>

Completely clears a set or a map.

Low-level list commands

The <class>-list command lists the objects of type <class>. By default it will list all objects, printing a subset of the parameters. This behavior can be modified in two ways: it can filter the objects so that it only outputs a subset, and the parameters that are printed can be modified.

To change the parameters that are printed, the argument params should be specified as a comma-separated list of the required parameters. For example:

xe vm-list params=name-label,other-config

Alternatively, to list all of the parameters, use the syntax:

xe vm-list params=all

Note that some parameters that are expensive to calculate will not be shown by the list command. These parameters will be shown as, for example:

allowed-VBD-devices (SRO): <expensive field>

To obtain these fields, use either the command <class>-param-list or <class>-param-get

To filter the list, the CLI will match parameter values with those specified on the command-line, only printing objects that match all of the specified constraints. For example:

xe vm-list HVM-boot-policy="BIOS order" power-state=halted

This command will only list those VMs for which both the field power-statehas the value halted, and for which the field HVM-boot-policyhas the value BIOS order.

It is also possible to filter the list based on the value of keys in maps, or on the existence of values in a set. The syntax for the first of these is map-name:key=value, and the second is set-name:contains=value

146

Page 166
Image 166
Citrix Systems 5.6 manual Low-level list commands