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.
12630 12631 12632 |
# File 'lib/ovirtsdk4/services.rb', line 12630 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 |
# File 'lib/ovirtsdk4/services.rb', line 12652 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.
12641 12642 12643 |
# File 'lib/ovirtsdk4/services.rb', line 12641 def storage_service(id) StorageService.new(self, id) end |