Class: OvirtSDK4::HostStorageService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#list(opts = {}) ⇒ Array<HostStorage>
Get list of storages.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#storage_service(id) ⇒ StorageService
Reference to a service managing the storage.
Methods inherited from Service
Instance Method Details
#list(opts = {}) ⇒ Array<HostStorage>
Get list of storages.
GET /ovirt-engine/api/hosts/123/storage
The XML response you get will be like this one:
<host_storages>
<host_storage id="123">
...
</host_storage>
...
</host_storages>
The order of the returned list of storages isn’t guaranteed.
11353 11354 11355 |
# File 'lib/ovirtsdk4/services.rb', line 11353 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 |
# File 'lib/ovirtsdk4/services.rb', line 11375 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return storage_service(path) end return storage_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
#storage_service(id) ⇒ StorageService
Reference to a service managing the storage.
11364 11365 11366 |
# File 'lib/ovirtsdk4/services.rb', line 11364 def storage_service(id) StorageService.new(self, id) end |