class OvirtSDK4::VmGraphicsConsolesService
Constants
- ADD
- LIST
Public Instance Methods
Add new graphics console to the virtual machine.
@param console [GraphicsConsole] The `console` to add.
@param opts [Hash] Additional options.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [GraphicsConsole]
# File lib/ovirtsdk4/services.rb, line 33520 def add(console, opts = {}) internal_add(console, GraphicsConsole, ADD, opts) end
Returns a reference to the service that manages a specific virtual machine graphics console.
@param id [String] The identifier of the `console`.
@return [VmGraphicsConsoleService] A reference to the `console` service.
# File lib/ovirtsdk4/services.rb, line 33589 def console_service(id) VmGraphicsConsoleService.new(self, id) end
Lists all the configured graphics consoles of the virtual machine.
IMPORTANT: By default, when the `current` parameter is not specified, the data returned corresponds to the next execution of the virtual machine. In the current implementation of the system this means that the `address` and `port` attributes will not be populated because the system does not know what address and port will be used for the next execution. Since in most cases those attributes are needed, it is strongly advised to aways explicitly include the `current` parameter with the value `true`.
The order of the returned list of graphics consoles is not guaranteed.
@param opts [Hash] Additional options.
@option opts [Boolean] :current Specifies if the data returned should correspond to the next execution of
the virtual machine, or to the current execution. IMPORTANT: The `address` and `port` attributes will not be populated unless the value is `true`. For example, to get data for the current execution of the virtual machine, including the `address` and `port` attributes, send a request like this: [source] ---- GET /ovirt-engine/api/vms/123/graphicsconsoles?current=true ---- The default value is `false`.
@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part
of the current request. See <<documents/003_common_concepts/follow, here>> for details.
@option opts [Integer] :max Sets the maximum number of consoles to return. If not specified all the consoles are returned.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Array<GraphicsConsole>]
# File lib/ovirtsdk4/services.rb, line 33578 def list(opts = {}) internal_get(LIST, opts) end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# File lib/ovirtsdk4/services.rb, line 33600 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return console_service(path) end return console_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end