Class: OvirtSDK4::HostDevicesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#device_service(id) ⇒ HostDeviceService
Reference to the service that can be used to access a specific host device.
-
#list(opts = {}) ⇒ Array<HostDevice>
List the devices of a host.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#device_service(id) ⇒ HostDeviceService
Reference to the service that can be used to access a specific host device.
12108 12109 12110 |
# File 'lib/ovirtsdk4/services.rb', line 12108 def device_service(id) HostDeviceService.new(self, id) end |
#list(opts = {}) ⇒ Array<HostDevice>
List the devices of a host.
The order of the returned list of devices isn’t guaranteed.
12097 12098 12099 |
# File 'lib/ovirtsdk4/services.rb', line 12097 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 |
# File 'lib/ovirtsdk4/services.rb', line 12119 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return device_service(path) end return device_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |