Class: OvirtSDK4::StorageDomainDiskService

Inherits:
MeasurableService 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

#copy(opts = {}) ⇒ Object

Copies a disk to the specified storage domain.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To copy a disk use the copy operation of the service that manages that disk.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :disk (Disk)

    Description of the resulting disk.

  • :storage_domain (StorageDomain)

    The storage domain where the new disk will be created.

  • :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.



21644
21645
21646
# File 'lib/ovirtsdk4/services.rb', line 21644

def copy(opts = {})
  internal_action(:copy, nil, COPY, opts)
end

#export(opts = {}) ⇒ Object

Exports a disk to an export storage domain.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To export a disk use the export operation of the service that manages that disk.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :storage_domain (StorageDomain)

    The export storage domain where the disk should be exported to.

  • :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.



21674
21675
21676
# File 'lib/ovirtsdk4/services.rb', line 21674

def export(opts = {})
  internal_action(:export, nil, EXPORT, opts)
end

#get(opts = {}) ⇒ Disk

Retrieves the description of the disk.

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.

  • :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:



21703
21704
21705
# File 'lib/ovirtsdk4/services.rb', line 21703

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

#move(opts = {}) ⇒ Object

Moves a disk to another storage domain.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To move a disk use the move operation of the service that manages that disk.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the move should be performed asynchronously.

  • :filter (Boolean)

    Indicates if the results should be filtered according to the permissions of the user.

  • :storage_domain (StorageDomain)

    The storage domain where the disk will be moved to.

  • :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.



21739
21740
21741
# File 'lib/ovirtsdk4/services.rb', line 21739

def move(opts = {})
  internal_action(:move, nil, MOVE, opts)
end

#permissions_serviceAssignedPermissionsService

Reference to the service that manages the permissions assigned to the disk.

Returns:



21832
21833
21834
# File 'lib/ovirtsdk4/services.rb', line 21832

def permissions_service
  @permissions_service ||= AssignedPermissionsService.new(self, 'permissions')
end

#remove(opts = {}) ⇒ Object

Removes a disk.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To remove a disk use the remove operation of the service that manages that disk.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :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.



21766
21767
21768
# File 'lib/ovirtsdk4/services.rb', line 21766

def remove(opts = {})
  internal_remove(REMOVE, 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:



21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
# File 'lib/ovirtsdk4/services.rb', line 21852

def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'permissions'
    return permissions_service
  end
  if path.start_with?('permissions/')
    return permissions_service.service(path[12..-1])
  end
  if path == 'statistics'
    return statistics_service
  end
  if path.start_with?('statistics/')
    return statistics_service.service(path[11..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end

#sparsify(opts = {}) ⇒ Object

Sparsify the disk.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To remove a disk use the remove operation of the service that manages that disk.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :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.



21793
21794
21795
# File 'lib/ovirtsdk4/services.rb', line 21793

def sparsify(opts = {})
  internal_action(:sparsify, nil, SPARSIFY, opts)
end

#statistics_serviceStatisticsService

Locates the statistics service.

Returns:



21841
21842
21843
# File 'lib/ovirtsdk4/services.rb', line 21841

def statistics_service
  @statistics_service ||= StatisticsService.new(self, 'statistics')
end

#update(disk, opts = {}) ⇒ Disk

Updates the disk.

Important
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To update a disk use the update operation of the service that manages that disk.

Parameters:

  • disk (Disk)

    The update to apply to the disk.

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

    Additional options.

Options Hash (opts):

  • :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:



21823
21824
21825
# File 'lib/ovirtsdk4/services.rb', line 21823

def update(disk, opts = {})
  internal_update(disk, Disk, UPDATE, opts)
end