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.
10984 10985 10986 |
# File 'lib/ovirtsdk4/services.rb', line 10984 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.
10973 10974 10975 |
# File 'lib/ovirtsdk4/services.rb', line 10973 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 |
# File 'lib/ovirtsdk4/services.rb', line 10995 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 |