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.
10988 10989 10990 |
# File 'lib/ovirtsdk4/services.rb', line 10988 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.
10977 10978 10979 |
# File 'lib/ovirtsdk4/services.rb', line 10977 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 |
# File 'lib/ovirtsdk4/services.rb', line 10999 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 |