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.
11448 11449 11450 |
# File 'lib/ovirtsdk4/services.rb', line 11448 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 |
# File 'lib/ovirtsdk4/services.rb', line 11470 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.
11459 11460 11461 |
# File 'lib/ovirtsdk4/services.rb', line 11459 def storage_service(id) StorageService.new(self, id) end |