class OvirtSDK4::VmDiskService

Constants

ACTIVATE
DEACTIVATE
EXPORT
GET
MOVE
REMOVE
UPDATE

Public Instance Methods

activate(opts = {}) click to toggle source

Executes the `activate` method.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the activation should be performed asynchronously.

@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.

# File lib/ovirtsdk4/services.rb, line 29315
def activate(opts = {})
  internal_action(:activate, nil, ACTIVATE, opts)
end
deactivate(opts = {}) click to toggle source

Executes the `deactivate` method.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the deactivation should be performed asynchronously.

@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.

# File lib/ovirtsdk4/services.rb, line 29341
def deactivate(opts = {})
  internal_action(:deactivate, nil, DEACTIVATE, opts)
end
export(opts = {}) click to toggle source

Executes the `export` method.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the export should be performed asynchronously.

@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.

@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.

# File lib/ovirtsdk4/services.rb, line 29370
def export(opts = {})
  internal_action(:export, nil, EXPORT, opts)
end
get(opts = {}) click to toggle source

Returns the representation of the object managed by this service.

@param opts [Hash] Additional options.

@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 [Disk]

# File lib/ovirtsdk4/services.rb, line 29395
def get(opts = {})
  internal_get(GET, opts)
end
move(opts = {}) click to toggle source

Executes the `move` method.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the move should be performed asynchronously.

@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.

@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.

# File lib/ovirtsdk4/services.rb, line 29424
def move(opts = {})
  internal_action(:move, nil, MOVE, opts)
end
permissions_service() click to toggle source

Locates the `permissions` service.

@return [AssignedPermissionsService] A reference to `permissions` service.

# File lib/ovirtsdk4/services.rb, line 29491
def permissions_service
  @permissions_service ||= AssignedPermissionsService.new(self, 'permissions')
end
remove(opts = {}) click to toggle source

Detach the disk from the virtual machine.

NOTE: In version 3 of the API this used to also remove the disk completely from the system, but starting with version 4 it doesn't. If you need to remove it completely use the <<services/disk/methods/remove,remove method of the top level disk service>>.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @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.

# File lib/ovirtsdk4/services.rb, line 29453
def remove(opts = {})
  internal_remove(REMOVE, opts)
end
service(path) click to toggle source

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 29511
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
statistics_service() click to toggle source

Locates the `statistics` service.

@return [StatisticsService] A reference to `statistics` service.

# File lib/ovirtsdk4/services.rb, line 29500
def statistics_service
  @statistics_service ||= StatisticsService.new(self, 'statistics')
end
to_s() click to toggle source

Returns an string representation of this service.

@return [String]

# File lib/ovirtsdk4/services.rb, line 29535
def to_s
  "#<#{VmDiskService}:#{absolute_path}>"
end
update(disk, opts = {}) click to toggle source

Updates the `disk`.

@param disk [Disk] The `disk` to update. @param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the update should be performed asynchronously.

@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 [Disk]

# File lib/ovirtsdk4/services.rb, line 29482
def update(disk, opts = {})
  internal_update(disk, Disk, UPDATE, opts)
end