class OvirtSDK4::StorageDomain

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {StorageDomain} class.

@param opts [Hash] A hash containing the attributes of the object. The keys of the hash

should be symbols corresponding to the names of the attributes. The values of the hash
should be the values of the attributes.

@option opts [Integer] :available The value of attribute `available`.

@option opts [Boolean] :backup The value of attribute `backup`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [Integer] :committed The value of attribute `committed`.

@option opts [Integer] :critical_space_action_blocker The value of attribute `critical_space_action_blocker`.

@option opts [DataCenter, Hash] :data_center The value of attribute `data_center`.

@option opts [Array<DataCenter>, Array<Hash>] :data_centers The values of attribute `data_centers`.

@option opts [String] :description The value of attribute `description`.

@option opts [Boolean] :discard_after_delete The value of attribute `discard_after_delete`.

@option opts [Array<DiskProfile>, Array<Hash>] :disk_profiles The values of attribute `disk_profiles`.

@option opts [Array<DiskSnapshot>, Array<Hash>] :disk_snapshots The values of attribute `disk_snapshots`.

@option opts [Array<Disk>, Array<Hash>] :disks The values of attribute `disks`.

@option opts [ExternalStatus] :external_status The value of attribute `external_status`.

@option opts [Array<File>, Array<Hash>] :files The values of attribute `files`.

@option opts [Host, Hash] :host The value of attribute `host`.

@option opts [String] :id The value of attribute `id`.

@option opts [Array<Image>, Array<Hash>] :images The values of attribute `images`.

@option opts [Boolean] :import The value of attribute `import`.

@option opts [Boolean] :master The value of attribute `master`.

@option opts [String] :name The value of attribute `name`.

@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.

@option opts [StorageDomainStatus] :status The value of attribute `status`.

@option opts [HostStorage, Hash] :storage The value of attribute `storage`.

@option opts [Array<StorageConnection>, Array<Hash>] :storage_connections The values of attribute `storage_connections`.

@option opts [StorageFormat] :storage_format The value of attribute `storage_format`.

@option opts [Boolean] :supports_discard The value of attribute `supports_discard`.

@option opts [Boolean] :supports_discard_zeroes_data The value of attribute `supports_discard_zeroes_data`.

@option opts [Array<Template>, Array<Hash>] :templates The values of attribute `templates`.

@option opts [StorageDomainType] :type The value of attribute `type`.

@option opts [Integer] :used The value of attribute `used`.

@option opts [Array<Vm>, Array<Hash>] :vms The values of attribute `vms`.

@option opts [Integer] :warning_low_space_indicator The value of attribute `warning_low_space_indicator`.

@option opts [Boolean] :wipe_after_delete The value of attribute `wipe_after_delete`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 21784
def initialize(opts = {})
  super(opts)
  self.available = opts[:available]
  self.backup = opts[:backup]
  self.committed = opts[:committed]
  self.critical_space_action_blocker = opts[:critical_space_action_blocker]
  self.data_center = opts[:data_center]
  self.data_centers = opts[:data_centers]
  self.discard_after_delete = opts[:discard_after_delete]
  self.disk_profiles = opts[:disk_profiles]
  self.disk_snapshots = opts[:disk_snapshots]
  self.disks = opts[:disks]
  self.external_status = opts[:external_status]
  self.files = opts[:files]
  self.host = opts[:host]
  self.images = opts[:images]
  self.import = opts[:import]
  self.master = opts[:master]
  self.permissions = opts[:permissions]
  self.status = opts[:status]
  self.storage = opts[:storage]
  self.storage_connections = opts[:storage_connections]
  self.storage_format = opts[:storage_format]
  self.supports_discard = opts[:supports_discard]
  self.supports_discard_zeroes_data = opts[:supports_discard_zeroes_data]
  self.templates = opts[:templates]
  self.type = opts[:type]
  self.used = opts[:used]
  self.vms = opts[:vms]
  self.warning_low_space_indicator = opts[:warning_low_space_indicator]
  self.wipe_after_delete = opts[:wipe_after_delete]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 21820
def ==(other)
  super &&
  @available == other.available &&
  @backup == other.backup &&
  @committed == other.committed &&
  @critical_space_action_blocker == other.critical_space_action_blocker &&
  @data_center == other.data_center &&
  @data_centers == other.data_centers &&
  @discard_after_delete == other.discard_after_delete &&
  @disk_profiles == other.disk_profiles &&
  @disk_snapshots == other.disk_snapshots &&
  @disks == other.disks &&
  @external_status == other.external_status &&
  @files == other.files &&
  @host == other.host &&
  @images == other.images &&
  @import == other.import &&
  @master == other.master &&
  @permissions == other.permissions &&
  @status == other.status &&
  @storage == other.storage &&
  @storage_connections == other.storage_connections &&
  @storage_format == other.storage_format &&
  @supports_discard == other.supports_discard &&
  @supports_discard_zeroes_data == other.supports_discard_zeroes_data &&
  @templates == other.templates &&
  @type == other.type &&
  @used == other.used &&
  @vms == other.vms &&
  @warning_low_space_indicator == other.warning_low_space_indicator &&
  @wipe_after_delete == other.wipe_after_delete
end
available() click to toggle source

Returns the value of the `available` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 21020
def available
  @available
end
available=(value) click to toggle source

Sets the value of the `available` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 21029
def available=(value)
  @available = value
end
backup() click to toggle source

Returns the value of the `backup` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21038
def backup
  @backup
end
backup=(value) click to toggle source

Sets the value of the `backup` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21047
def backup=(value)
  @backup = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 21056
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 21065
def comment=(value)
  @comment = value
end
committed() click to toggle source

Returns the value of the `committed` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 21074
def committed
  @committed
end
committed=(value) click to toggle source

Sets the value of the `committed` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 21083
def committed=(value)
  @committed = value
end
critical_space_action_blocker() click to toggle source

Returns the value of the `critical_space_action_blocker` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 21092
def critical_space_action_blocker
  @critical_space_action_blocker
end
critical_space_action_blocker=(value) click to toggle source

Sets the value of the `critical_space_action_blocker` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 21101
def critical_space_action_blocker=(value)
  @critical_space_action_blocker = value
end
data_center() click to toggle source

Returns the value of the `data_center` attribute.

@return [DataCenter]

# File lib/ovirtsdk4/types.rb, line 21110
def data_center
  @data_center
end
data_center=(value) click to toggle source

Sets the value of the `data_center` attribute.

@param value [DataCenter, Hash]

The `value` parameter can be an instance of {OvirtSDK4::DataCenter} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 21123
def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end
data_centers() click to toggle source

Returns the value of the `data_centers` attribute.

@return [Array<DataCenter>]

# File lib/ovirtsdk4/types.rb, line 21135
def data_centers
  @data_centers
end
data_centers=(list) click to toggle source

Sets the value of the `data_centers` attribute.

@param list [Array<DataCenter>]

# File lib/ovirtsdk4/types.rb, line 21144
def data_centers=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = DataCenter.new(value)
      end
    end
  end
  @data_centers = list
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 21161
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 21170
def description=(value)
  @description = value
end
discard_after_delete() click to toggle source

Returns the value of the `discard_after_delete` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21179
def discard_after_delete
  @discard_after_delete
end
discard_after_delete=(value) click to toggle source

Sets the value of the `discard_after_delete` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21188
def discard_after_delete=(value)
  @discard_after_delete = value
end
disk_profiles() click to toggle source

Returns the value of the `disk_profiles` attribute.

@return [Array<DiskProfile>]

# File lib/ovirtsdk4/types.rb, line 21197
def disk_profiles
  @disk_profiles
end
disk_profiles=(list) click to toggle source

Sets the value of the `disk_profiles` attribute.

@param list [Array<DiskProfile>]

# File lib/ovirtsdk4/types.rb, line 21206
def disk_profiles=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = DiskProfile.new(value)
      end
    end
  end
  @disk_profiles = list
end
disk_snapshots() click to toggle source

Returns the value of the `disk_snapshots` attribute.

@return [Array<DiskSnapshot>]

# File lib/ovirtsdk4/types.rb, line 21223
def disk_snapshots
  @disk_snapshots
end
disk_snapshots=(list) click to toggle source

Sets the value of the `disk_snapshots` attribute.

@param list [Array<DiskSnapshot>]

# File lib/ovirtsdk4/types.rb, line 21232
def disk_snapshots=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = DiskSnapshot.new(value)
      end
    end
  end
  @disk_snapshots = list
end
disks() click to toggle source

Returns the value of the `disks` attribute.

@return [Array<Disk>]

# File lib/ovirtsdk4/types.rb, line 21249
def disks
  @disks
end
disks=(list) click to toggle source

Sets the value of the `disks` attribute.

@param list [Array<Disk>]

# File lib/ovirtsdk4/types.rb, line 21258
def disks=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Disk.new(value)
      end
    end
  end
  @disks = list
end
external_status() click to toggle source

Returns the value of the `external_status` attribute.

@return [ExternalStatus]

# File lib/ovirtsdk4/types.rb, line 21275
def external_status
  @external_status
end
external_status=(value) click to toggle source

Sets the value of the `external_status` attribute.

@param value [ExternalStatus]

# File lib/ovirtsdk4/types.rb, line 21284
def external_status=(value)
  @external_status = value
end
files() click to toggle source

Returns the value of the `files` attribute.

@return [Array<File>]

# File lib/ovirtsdk4/types.rb, line 21293
def files
  @files
end
files=(list) click to toggle source

Sets the value of the `files` attribute.

@param list [Array<File>]

# File lib/ovirtsdk4/types.rb, line 21302
def files=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = File.new(value)
      end
    end
  end
  @files = list
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 21856
def hash
  super +
  @available.hash +
  @backup.hash +
  @committed.hash +
  @critical_space_action_blocker.hash +
  @data_center.hash +
  @data_centers.hash +
  @discard_after_delete.hash +
  @disk_profiles.hash +
  @disk_snapshots.hash +
  @disks.hash +
  @external_status.hash +
  @files.hash +
  @host.hash +
  @images.hash +
  @import.hash +
  @master.hash +
  @permissions.hash +
  @status.hash +
  @storage.hash +
  @storage_connections.hash +
  @storage_format.hash +
  @supports_discard.hash +
  @supports_discard_zeroes_data.hash +
  @templates.hash +
  @type.hash +
  @used.hash +
  @vms.hash +
  @warning_low_space_indicator.hash +
  @wipe_after_delete.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 21319
def host
  @host
end
host=(value) click to toggle source

Sets the value of the `host` attribute.

@param value [Host, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Host} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 21332
def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 21344
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 21353
def id=(value)
  @id = value
end
images() click to toggle source

Returns the value of the `images` attribute.

@return [Array<Image>]

# File lib/ovirtsdk4/types.rb, line 21362
def images
  @images
end
images=(list) click to toggle source

Sets the value of the `images` attribute.

@param list [Array<Image>]

# File lib/ovirtsdk4/types.rb, line 21371
def images=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Image.new(value)
      end
    end
  end
  @images = list
end
import() click to toggle source

Returns the value of the `import` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21388
def import
  @import
end
import=(value) click to toggle source

Sets the value of the `import` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21397
def import=(value)
  @import = value
end
master() click to toggle source

Returns the value of the `master` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21406
def master
  @master
end
master=(value) click to toggle source

Sets the value of the `master` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21415
def master=(value)
  @master = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 21424
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 21433
def name=(value)
  @name = value
end
permissions() click to toggle source

Returns the value of the `permissions` attribute.

@return [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 21442
def permissions
  @permissions
end
permissions=(list) click to toggle source

Sets the value of the `permissions` attribute.

@param list [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 21451
def permissions=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Permission.new(value)
      end
    end
  end
  @permissions = list
end
status() click to toggle source

Returns the value of the `status` attribute.

@return [StorageDomainStatus]

# File lib/ovirtsdk4/types.rb, line 21468
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [StorageDomainStatus]

# File lib/ovirtsdk4/types.rb, line 21477
def status=(value)
  @status = value
end
storage() click to toggle source

Returns the value of the `storage` attribute.

@return [HostStorage]

# File lib/ovirtsdk4/types.rb, line 21486
def storage
  @storage
end
storage=(value) click to toggle source

Sets the value of the `storage` attribute.

@param value [HostStorage, Hash]

The `value` parameter can be an instance of {OvirtSDK4::HostStorage} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 21499
def storage=(value)
  if value.is_a?(Hash)
    value = HostStorage.new(value)
  end
  @storage = value
end
storage_connections() click to toggle source

Returns the value of the `storage_connections` attribute.

@return [Array<StorageConnection>]

# File lib/ovirtsdk4/types.rb, line 21511
def storage_connections
  @storage_connections
end
storage_connections=(list) click to toggle source

Sets the value of the `storage_connections` attribute.

@param list [Array<StorageConnection>]

# File lib/ovirtsdk4/types.rb, line 21520
def storage_connections=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = StorageConnection.new(value)
      end
    end
  end
  @storage_connections = list
end
storage_format() click to toggle source

Returns the value of the `storage_format` attribute.

@return [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 21537
def storage_format
  @storage_format
end
storage_format=(value) click to toggle source

Sets the value of the `storage_format` attribute.

@param value [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 21546
def storage_format=(value)
  @storage_format = value
end
supports_discard() click to toggle source

Returns the value of the `supports_discard` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21555
def supports_discard
  @supports_discard
end
supports_discard=(value) click to toggle source

Sets the value of the `supports_discard` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21564
def supports_discard=(value)
  @supports_discard = value
end
supports_discard_zeroes_data() click to toggle source

Returns the value of the `supports_discard_zeroes_data` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21573
def supports_discard_zeroes_data
  @supports_discard_zeroes_data
end
supports_discard_zeroes_data=(value) click to toggle source

Sets the value of the `supports_discard_zeroes_data` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21582
def supports_discard_zeroes_data=(value)
  @supports_discard_zeroes_data = value
end
templates() click to toggle source

Returns the value of the `templates` attribute.

@return [Array<Template>]

# File lib/ovirtsdk4/types.rb, line 21591
def templates
  @templates
end
templates=(list) click to toggle source

Sets the value of the `templates` attribute.

@param list [Array<Template>]

# File lib/ovirtsdk4/types.rb, line 21600
def templates=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Template.new(value)
      end
    end
  end
  @templates = list
end
type() click to toggle source

Returns the value of the `type` attribute.

@return [StorageDomainType]

# File lib/ovirtsdk4/types.rb, line 21617
def type
  @type
end
type=(value) click to toggle source

Sets the value of the `type` attribute.

@param value [StorageDomainType]

# File lib/ovirtsdk4/types.rb, line 21626
def type=(value)
  @type = value
end
used() click to toggle source

Returns the value of the `used` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 21635
def used
  @used
end
used=(value) click to toggle source

Sets the value of the `used` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 21644
def used=(value)
  @used = value
end
vms() click to toggle source

Returns the value of the `vms` attribute.

@return [Array<Vm>]

# File lib/ovirtsdk4/types.rb, line 21653
def vms
  @vms
end
vms=(list) click to toggle source

Sets the value of the `vms` attribute.

@param list [Array<Vm>]

# File lib/ovirtsdk4/types.rb, line 21662
def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end
warning_low_space_indicator() click to toggle source

Returns the value of the `warning_low_space_indicator` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 21679
def warning_low_space_indicator
  @warning_low_space_indicator
end
warning_low_space_indicator=(value) click to toggle source

Sets the value of the `warning_low_space_indicator` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 21688
def warning_low_space_indicator=(value)
  @warning_low_space_indicator = value
end
wipe_after_delete() click to toggle source

Returns the value of the `wipe_after_delete` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 21697
def wipe_after_delete
  @wipe_after_delete
end
wipe_after_delete=(value) click to toggle source

Sets the value of the `wipe_after_delete` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 21706
def wipe_after_delete=(value)
  @wipe_after_delete = value
end