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.
11089 11090 11091 |
# File 'lib/ovirtsdk4/services.rb', line 11089 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.
11078 11079 11080 |
# File 'lib/ovirtsdk4/services.rb', line 11078 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 |
# File 'lib/ovirtsdk4/services.rb', line 11100 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 |