Class: OvirtSDK4::VmGraphicsConsolesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(console, opts = {}) ⇒ GraphicsConsole
Add new graphics console to the virtual machine.
-
#console_service(id) ⇒ VmGraphicsConsoleService
Returns a reference to the service that manages a specific virtual machine graphics console.
-
#list(opts = {}) ⇒ Array<GraphicsConsole>
Lists all the configured graphics consoles of the virtual machine.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(console, opts = {}) ⇒ GraphicsConsole
Add new graphics console to the virtual machine.
33520 33521 33522 |
# File 'lib/ovirtsdk4/services.rb', line 33520 def add(console, opts = {}) internal_add(console, GraphicsConsole, ADD, opts) end |
#console_service(id) ⇒ VmGraphicsConsoleService
Returns a reference to the service that manages a specific virtual machine graphics console.
33589 33590 33591 |
# File 'lib/ovirtsdk4/services.rb', line 33589 def console_service(id) VmGraphicsConsoleService.new(self, id) end |
#list(opts = {}) ⇒ Array<GraphicsConsole>
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.
33578 33579 33580 |
# File 'lib/ovirtsdk4/services.rb', line 33578 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
33600 33601 33602 33603 33604 33605 33606 33607 33608 33609 |
# 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 |