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 HTTP/1.1
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.
12467 12468 12469 |
# File 'lib/ovirtsdk4/services.rb', line 12467 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 |
# File 'lib/ovirtsdk4/services.rb', line 12489 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.
12478 12479 12480 |
# File 'lib/ovirtsdk4/services.rb', line 12478 def storage_service(id) StorageService.new(self, id) end |