class OvirtSDK4::HostStorageService
Constants
- LIST
Public Instance Methods
Get list of storages.
- source
GET /ovirt-engine/api/hosts/123/storage
The XML response you get will be like this one:
- source,xml
<host_storages>
<host_storage id="123"> ... </host_storage> ...
</host_storages>
The order of the returned list of storages isn't guaranteed.
@param opts [Hash] Additional options.
@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part
of the current request. See <<documents/003_common_concepts/follow, here>> for details.
@option opts [Boolean] :report_status Indicates if the status of the LUNs in the storage should be checked.
Checking the status of the LUN is an heavy weight operation and this data is not always needed by the user. This parameter will give the option to not perform the status check of the LUNs. The default is `true` for backward compatibility. Here an example with the LUN status : [source,xml] ---- <host_storage id="123"> <logical_units> <logical_unit id="123"> <lun_mapping>0</lun_mapping> <paths>1</paths> <product_id>lun0</product_id> <serial>123</serial> <size>10737418240</size> <status>used</status> <vendor_id>LIO-ORG</vendor_id> <volume_group_id>123</volume_group_id> </logical_unit> </logical_units> <type>iscsi</type> <host id="123"/> </host_storage> ---- Here an example without the LUN status : [source,xml] ---- <host_storage id="123"> <logical_units> <logical_unit id="123"> <lun_mapping>0</lun_mapping> <paths>1</paths> <product_id>lun0</product_id> <serial>123</serial> <size>10737418240</size> <vendor_id>LIO-ORG</vendor_id> <volume_group_id>123</volume_group_id> </logical_unit> </logical_units> <type>iscsi</type> <host id="123"/> </host_storage> ----
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Array<HostStorage>]
# File lib/ovirtsdk4/services.rb, line 12630 def list(opts = {}) internal_get(LIST, opts) end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# 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
Reference to a service managing the storage.
@param id [String] The identifier of the `storage`.
@return [StorageService] A reference to the `storage` service.
# File lib/ovirtsdk4/services.rb, line 12641 def storage_service(id) StorageService.new(self, id) end