Method: OvirtSDK4::VmsService#list
- Defined in:
- lib/ovirtsdk4/services.rb
#list(opts = {}) ⇒ Array<Vm>
Returns the list of virtual machines of the system.
The order of the returned list of virtual machines is guaranteed only if the sortby
clause is included
in the search
parameter.
Parameters:
-
opts
(Hash)
(defaults to: {})
—
Additional options.
Options Hash (opts):
-
:all_content
(Boolean)
—
Indicates if all the attributes of the virtual machines should be included in the response.
By default the following attributes are excluded:
-
console
-
initialization.configuration.data
- The OVF document describing the virtual machine. -
rng_source
-
soundcard
-
virtio_scsi
For example, to retrieve the complete representation of the virtual machines send a request like this:
GET /ovirt-engine/api/vms?all_content=true
NoteThe reason for not including these attributes is performance: they are seldom used and they require additional queries to the database. So try to use the this parameter only when it is really needed. -
-
:case_sensitive
(Boolean)
—
Indicates if the search performed using the
search
parameter should be performed taking case into account. The default value istrue
, which means that case is taken into account. If you want to search ignoring case set it tofalse
. -
:filter
(Boolean)
—
Indicates if the results should be filtered according to the permissions of the user.
-
:follow
(String)
—
Indicates which inner links should be followed. The objects referenced by these links will be fetched as part of the current request. See here for details.
-
:max
(Integer)
—
The maximum number of results to return.
-
:ovf_as_ova
(Boolean)
—
Indicates if the results should expose the OVF as it appears in OVA files of that VM. The OVF document describing the virtual machine. This parameter will work only when all_content=True is set. The OVF will be presented in
initialization.configuration.data
.For example:
GET /vms?all_content=true&ovf_as_ova=true
-
:search
(String)
—
A query string used to restrict the returned virtual machines.
-
:headers
(Hash)
— default:
{}
—
Additional HTTP headers.
-
:query
(Hash)
— default:
{}
—
Additional URL query parameters.
-
:timeout
(Integer)
— default:
nil
—
The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.
-
:wait
(Boolean)
— default:
true
—
If
true
wait for the response.
Returns:
- (Array<Vm>)
36364 36365 36366 |
# File 'lib/ovirtsdk4/services.rb', line 36364 def list(opts = {}) internal_get(LIST, opts) end |