Class: OvirtSDK4::TemplateCdromsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#cdrom_service(id) ⇒ TemplateCdromService
Returns a reference to the service that manages a specific CD-ROM device.
-
#list(opts = {}) ⇒ Array<Cdrom>
Returns the list of CD-ROM devices of the template.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#cdrom_service(id) ⇒ TemplateCdromService
Returns a reference to the service that manages a specific CD-ROM device.
27573 27574 27575 |
# File 'lib/ovirtsdk4/services.rb', line 27573 def cdrom_service(id) TemplateCdromService.new(self, id) end |
#list(opts = {}) ⇒ Array<Cdrom>
Returns the list of CD-ROM devices of the template.
The order of the returned list of CD-ROM devices isn’t guaranteed.
27562 27563 27564 |
# File 'lib/ovirtsdk4/services.rb', line 27562 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
27584 27585 27586 27587 27588 27589 27590 27591 27592 27593 |
# File 'lib/ovirtsdk4/services.rb', line 27584 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return cdrom_service(path) end return cdrom_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |