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.
12244 12245 12246 |
# File 'lib/ovirtsdk4/services.rb', line 12244 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.
12233 12234 12235 |
# File 'lib/ovirtsdk4/services.rb', line 12233 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 |
# File 'lib/ovirtsdk4/services.rb', line 12255 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 |