Class: OvirtSDK4::StorageService

Inherits:
Service
  • Object
show all
Defined in:
lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb

Instance Method Summary collapse

Methods inherited from Service

#inspect, #to_s

Instance Method Details

#get(opts = {}) ⇒ HostStorage

Returns the representation of the object managed by this service.

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :follow (String)

    Indicates which inner links should be followed. The objects referenced by these links will be fetched as part of the current request. See here for details.

  • :report_status (Boolean)

    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 :

    <host_storage id="360014051136c20574f743bdbd28177fd">
      <logical_units>
        <logical_unit id="360014051136c20574f743bdbd28177fd">
          <lun_mapping>0</lun_mapping>
          <paths>1</paths>
          <product_id>lun0</product_id>
          <serial>SLIO-ORG_lun0_1136c205-74f7-43bd-bd28-177fd5ce6993</serial>
          <size>10737418240</size>
          <status>used</status>
          <vendor_id>LIO-ORG</vendor_id>
          <volume_group_id>O9Du7I-RahN-ECe1-dZ1w-nh0b-64io-MNzIBZ</volume_group_id>
        </logical_unit>
      </logical_units>
      <type>iscsi</type>
      <host id="8bb5ade5-e988-4000-8b93-dbfc6717fe50"/>
    </host_storage>

    Here an example without the LUN status :

    <host_storage id="360014051136c20574f743bdbd28177fd">
      <logical_units>
        <logical_unit id="360014051136c20574f743bdbd28177fd">
          <lun_mapping>0</lun_mapping>
          <paths>1</paths>
          <product_id>lun0</product_id>
          <serial>SLIO-ORG_lun0_1136c205-74f7-43bd-bd28-177fd5ce6993</serial>
          <size>10737418240</size>
          <vendor_id>LIO-ORG</vendor_id>
          <volume_group_id>O9Du7I-RahN-ECe1-dZ1w-nh0b-64io-MNzIBZ</volume_group_id>
        </logical_unit>
      </logical_units>
      <type>iscsi</type>
      <host id="8bb5ade5-e988-4000-8b93-dbfc6717fe50"/>
    </host_storage>
  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: 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.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



21039
21040
21041
# File 'lib/ovirtsdk4/services.rb', line 21039

def get(opts = {})
  internal_get(GET, opts)
end

#service(path) ⇒ Service

Locates the service corresponding to the given path.

Parameters:

  • path (String)

    The path of the service.

Returns:

  • (Service)

    A reference to the service.

Raises:



21050
21051
21052
21053
21054
21055
# File 'lib/ovirtsdk4/services.rb', line 21050

def service(path)
  if path.nil? || path == ''
    return self
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end