Class: OvirtSDK4::Disk

Inherits:
Device show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Direct Known Subclasses

DiskSnapshot

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Disk

Creates a new instance of the OvirtSDK4::Disk class.

Parameters:

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

    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.

Options Hash (opts):

  • :active (Boolean)

    The value of attribute active.

  • :actual_size (Integer)

    The value of attribute actual_size.

  • :alias_ (String)

    The value of attribute alias_.

  • :backup (DiskBackup)

    The value of attribute backup.

  • :bootable (Boolean)

    The value of attribute bootable.

  • :comment (String)

    The value of attribute comment.

  • :content_type (DiskContentType)

    The value of attribute content_type.

  • :description (String)

    The value of attribute description.

  • :disk_profile (DiskProfile, Hash)

    The value of attribute disk_profile.

  • :format (DiskFormat)

    The value of attribute format.

  • :id (String)

    The value of attribute id.

  • :image_id (String)

    The value of attribute image_id.

  • :initial_size (Integer)

    The value of attribute initial_size.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :interface (DiskInterface)

    The value of attribute interface.

  • :logical_name (String)

    The value of attribute logical_name.

  • :lun_storage (HostStorage, Hash)

    The value of attribute lun_storage.

  • :name (String)

    The value of attribute name.

  • :openstack_volume_type (OpenStackVolumeType, Hash)

    The value of attribute openstack_volume_type.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :propagate_errors (Boolean)

    The value of attribute propagate_errors.

  • :provisioned_size (Integer)

    The value of attribute provisioned_size.

  • :qcow_version (QcowVersion)

    The value of attribute qcow_version.

  • :quota (Quota, Hash)

    The value of attribute quota.

  • :read_only (Boolean)

    The value of attribute read_only.

  • :sgio (ScsiGenericIO)

    The value of attribute sgio.

  • :shareable (Boolean)

    The value of attribute shareable.

  • :snapshot (Snapshot, Hash)

    The value of attribute snapshot.

  • :sparse (Boolean)

    The value of attribute sparse.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.

  • :status (DiskStatus)

    The value of attribute status.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :storage_domains (Array<StorageDomain>, Array<Hash>)

    The values of attribute storage_domains.

  • :storage_type (DiskStorageType)

    The value of attribute storage_type.

  • :template (Template, Hash)

    The value of attribute template.

  • :total_size (Integer)

    The value of attribute total_size.

  • :uses_scsi_reservation (Boolean)

    The value of attribute uses_scsi_reservation.

  • :vm (Vm, Hash)

    The value of attribute vm.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.

  • :wipe_after_delete (Boolean)

    The value of attribute wipe_after_delete.



34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
# File 'lib/ovirtsdk4/types.rb', line 34936

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.actual_size = opts[:actual_size]
  self.alias_ = opts[:alias_]
  self.backup = opts[:backup]
  self.bootable = opts[:bootable]
  self.content_type = opts[:content_type]
  self.disk_profile = opts[:disk_profile]
  self.format = opts[:format]
  self.image_id = opts[:image_id]
  self.initial_size = opts[:initial_size]
  self.interface = opts[:interface]
  self.logical_name = opts[:logical_name]
  self.lun_storage = opts[:lun_storage]
  self.openstack_volume_type = opts[:openstack_volume_type]
  self.permissions = opts[:permissions]
  self.propagate_errors = opts[:propagate_errors]
  self.provisioned_size = opts[:provisioned_size]
  self.qcow_version = opts[:qcow_version]
  self.quota = opts[:quota]
  self.read_only = opts[:read_only]
  self.sgio = opts[:sgio]
  self.shareable = opts[:shareable]
  self.snapshot = opts[:snapshot]
  self.sparse = opts[:sparse]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
  self.storage_domain = opts[:storage_domain]
  self.storage_domains = opts[:storage_domains]
  self.storage_type = opts[:storage_type]
  self.total_size = opts[:total_size]
  self.uses_scsi_reservation = opts[:uses_scsi_reservation]
  self.wipe_after_delete = opts[:wipe_after_delete]
end

Instance Method Details

#==(other) ⇒ Object

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



34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
# File 'lib/ovirtsdk4/types.rb', line 34975

def ==(other)
  super &&
  @active == other.active &&
  @actual_size == other.actual_size &&
  @alias_ == other.alias_ &&
  @backup == other.backup &&
  @bootable == other.bootable &&
  @content_type == other.content_type &&
  @disk_profile == other.disk_profile &&
  @format == other.format &&
  @image_id == other.image_id &&
  @initial_size == other.initial_size &&
  @interface == other.interface &&
  @logical_name == other.logical_name &&
  @lun_storage == other.lun_storage &&
  @openstack_volume_type == other.openstack_volume_type &&
  @permissions == other.permissions &&
  @propagate_errors == other.propagate_errors &&
  @provisioned_size == other.provisioned_size &&
  @qcow_version == other.qcow_version &&
  @quota == other.quota &&
  @read_only == other.read_only &&
  @sgio == other.sgio &&
  @shareable == other.shareable &&
  @snapshot == other.snapshot &&
  @sparse == other.sparse &&
  @statistics == other.statistics &&
  @status == other.status &&
  @storage_domain == other.storage_domain &&
  @storage_domains == other.storage_domains &&
  @storage_type == other.storage_type &&
  @total_size == other.total_size &&
  @uses_scsi_reservation == other.uses_scsi_reservation &&
  @wipe_after_delete == other.wipe_after_delete
end

#activeBoolean

Returns the value of the active attribute.

Returns:

  • (Boolean)


34038
34039
34040
# File 'lib/ovirtsdk4/types.rb', line 34038

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


34047
34048
34049
# File 'lib/ovirtsdk4/types.rb', line 34047

def active=(value)
  @active = value
end

#actual_sizeInteger

Returns the value of the actual_size attribute.

Returns:

  • (Integer)


34056
34057
34058
# File 'lib/ovirtsdk4/types.rb', line 34056

def actual_size
  @actual_size
end

#actual_size=(value) ⇒ Object

Sets the value of the actual_size attribute.

Parameters:

  • value (Integer)


34065
34066
34067
# File 'lib/ovirtsdk4/types.rb', line 34065

def actual_size=(value)
  @actual_size = value
end

#alias_String

Returns the value of the alias_ attribute.

Returns:

  • (String)


34074
34075
34076
# File 'lib/ovirtsdk4/types.rb', line 34074

def alias_
  @alias_
end

#alias_=(value) ⇒ Object

Sets the value of the alias_ attribute.

Parameters:

  • value (String)


34083
34084
34085
# File 'lib/ovirtsdk4/types.rb', line 34083

def alias_=(value)
  @alias_ = value
end

#backupDiskBackup

Returns the value of the backup attribute.

Returns:



34092
34093
34094
# File 'lib/ovirtsdk4/types.rb', line 34092

def backup
  @backup
end

#backup=(value) ⇒ Object

Sets the value of the backup attribute.

Parameters:



34101
34102
34103
# File 'lib/ovirtsdk4/types.rb', line 34101

def backup=(value)
  @backup = value
end

#bootableBoolean

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


34110
34111
34112
# File 'lib/ovirtsdk4/types.rb', line 34110

def bootable
  @bootable
end

#bootable=(value) ⇒ Object

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


34119
34120
34121
# File 'lib/ovirtsdk4/types.rb', line 34119

def bootable=(value)
  @bootable = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


34128
34129
34130
# File 'lib/ovirtsdk4/types.rb', line 34128

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


34137
34138
34139
# File 'lib/ovirtsdk4/types.rb', line 34137

def comment=(value)
  @comment = value
end

#content_typeDiskContentType

Returns the value of the content_type attribute.

Returns:



34146
34147
34148
# File 'lib/ovirtsdk4/types.rb', line 34146

def content_type
  @content_type
end

#content_type=(value) ⇒ Object

Sets the value of the content_type attribute.

Parameters:



34155
34156
34157
# File 'lib/ovirtsdk4/types.rb', line 34155

def content_type=(value)
  @content_type = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


34164
34165
34166
# File 'lib/ovirtsdk4/types.rb', line 34164

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


34173
34174
34175
# File 'lib/ovirtsdk4/types.rb', line 34173

def description=(value)
  @description = value
end

#disk_profileDiskProfile

Returns the value of the disk_profile attribute.

Returns:



34182
34183
34184
# File 'lib/ovirtsdk4/types.rb', line 34182

def disk_profile
  @disk_profile
end

#disk_profile=(value) ⇒ Object

Sets the value of the disk_profile attribute.

The value parameter can be an instance of OvirtSDK4::DiskProfile 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.

Parameters:



34195
34196
34197
34198
34199
34200
# File 'lib/ovirtsdk4/types.rb', line 34195

def disk_profile=(value)
  if value.is_a?(Hash)
    value = DiskProfile.new(value)
  end
  @disk_profile = value
end

#formatDiskFormat

Returns the value of the format attribute.

Returns:



34207
34208
34209
# File 'lib/ovirtsdk4/types.rb', line 34207

def format
  @format
end

#format=(value) ⇒ Object

Sets the value of the format attribute.

Parameters:



34216
34217
34218
# File 'lib/ovirtsdk4/types.rb', line 34216

def format=(value)
  @format = value
end

#hashObject

Generates a hash value for this object.



35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
# File 'lib/ovirtsdk4/types.rb', line 35014

def hash
  super +
  @active.hash +
  @actual_size.hash +
  @alias_.hash +
  @backup.hash +
  @bootable.hash +
  @content_type.hash +
  @disk_profile.hash +
  @format.hash +
  @image_id.hash +
  @initial_size.hash +
  @interface.hash +
  @logical_name.hash +
  @lun_storage.hash +
  @openstack_volume_type.hash +
  @permissions.hash +
  @propagate_errors.hash +
  @provisioned_size.hash +
  @qcow_version.hash +
  @quota.hash +
  @read_only.hash +
  @sgio.hash +
  @shareable.hash +
  @snapshot.hash +
  @sparse.hash +
  @statistics.hash +
  @status.hash +
  @storage_domain.hash +
  @storage_domains.hash +
  @storage_type.hash +
  @total_size.hash +
  @uses_scsi_reservation.hash +
  @wipe_after_delete.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


34225
34226
34227
# File 'lib/ovirtsdk4/types.rb', line 34225

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


34234
34235
34236
# File 'lib/ovirtsdk4/types.rb', line 34234

def id=(value)
  @id = value
end

#image_idString

Returns the value of the image_id attribute.

Returns:

  • (String)


34243
34244
34245
# File 'lib/ovirtsdk4/types.rb', line 34243

def image_id
  @image_id
end

#image_id=(value) ⇒ Object

Sets the value of the image_id attribute.

Parameters:

  • value (String)


34252
34253
34254
# File 'lib/ovirtsdk4/types.rb', line 34252

def image_id=(value)
  @image_id = value
end

#initial_sizeInteger

Returns the value of the initial_size attribute.

Returns:

  • (Integer)


34261
34262
34263
# File 'lib/ovirtsdk4/types.rb', line 34261

def initial_size
  @initial_size
end

#initial_size=(value) ⇒ Object

Sets the value of the initial_size attribute.

Parameters:

  • value (Integer)


34270
34271
34272
# File 'lib/ovirtsdk4/types.rb', line 34270

def initial_size=(value)
  @initial_size = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



34279
34280
34281
# File 'lib/ovirtsdk4/types.rb', line 34279

def instance_type
  @instance_type
end

#instance_type=(value) ⇒ Object

Sets the value of the instance_type attribute.

The value parameter can be an instance of InstanceType 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.

Parameters:



34292
34293
34294
34295
34296
34297
# File 'lib/ovirtsdk4/types.rb', line 34292

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

#interfaceDiskInterface

Returns the value of the interface attribute.

Returns:



34304
34305
34306
# File 'lib/ovirtsdk4/types.rb', line 34304

def interface
  @interface
end

#interface=(value) ⇒ Object

Sets the value of the interface attribute.

Parameters:



34313
34314
34315
# File 'lib/ovirtsdk4/types.rb', line 34313

def interface=(value)
  @interface = value
end

#logical_nameString

Returns the value of the logical_name attribute.

Returns:

  • (String)


34322
34323
34324
# File 'lib/ovirtsdk4/types.rb', line 34322

def logical_name
  @logical_name
end

#logical_name=(value) ⇒ Object

Sets the value of the logical_name attribute.

Parameters:

  • value (String)


34331
34332
34333
# File 'lib/ovirtsdk4/types.rb', line 34331

def logical_name=(value)
  @logical_name = value
end

#lun_storageHostStorage

Returns the value of the lun_storage attribute.

Returns:



34340
34341
34342
# File 'lib/ovirtsdk4/types.rb', line 34340

def lun_storage
  @lun_storage
end

#lun_storage=(value) ⇒ Object

Sets the value of the lun_storage attribute.

The value parameter can be an instance of 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.

Parameters:



34353
34354
34355
34356
34357
34358
# File 'lib/ovirtsdk4/types.rb', line 34353

def lun_storage=(value)
  if value.is_a?(Hash)
    value = HostStorage.new(value)
  end
  @lun_storage = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


34365
34366
34367
# File 'lib/ovirtsdk4/types.rb', line 34365

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


34374
34375
34376
# File 'lib/ovirtsdk4/types.rb', line 34374

def name=(value)
  @name = value
end

#openstack_volume_typeOpenStackVolumeType

Returns the value of the openstack_volume_type attribute.

Returns:



34383
34384
34385
# File 'lib/ovirtsdk4/types.rb', line 34383

def openstack_volume_type
  @openstack_volume_type
end

#openstack_volume_type=(value) ⇒ Object

Sets the value of the openstack_volume_type attribute.

The value parameter can be an instance of OpenStackVolumeType 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.

Parameters:



34396
34397
34398
34399
34400
34401
# File 'lib/ovirtsdk4/types.rb', line 34396

def openstack_volume_type=(value)
  if value.is_a?(Hash)
    value = OpenStackVolumeType.new(value)
  end
  @openstack_volume_type = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



34408
34409
34410
# File 'lib/ovirtsdk4/types.rb', line 34408

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
# File 'lib/ovirtsdk4/types.rb', line 34417

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

#propagate_errorsBoolean

Returns the value of the propagate_errors attribute.

Returns:

  • (Boolean)


34434
34435
34436
# File 'lib/ovirtsdk4/types.rb', line 34434

def propagate_errors
  @propagate_errors
end

#propagate_errors=(value) ⇒ Object

Sets the value of the propagate_errors attribute.

Parameters:

  • value (Boolean)


34443
34444
34445
# File 'lib/ovirtsdk4/types.rb', line 34443

def propagate_errors=(value)
  @propagate_errors = value
end

#provisioned_sizeInteger

Returns the value of the provisioned_size attribute.

Returns:

  • (Integer)


34452
34453
34454
# File 'lib/ovirtsdk4/types.rb', line 34452

def provisioned_size
  @provisioned_size
end

#provisioned_size=(value) ⇒ Object

Sets the value of the provisioned_size attribute.

Parameters:

  • value (Integer)


34461
34462
34463
# File 'lib/ovirtsdk4/types.rb', line 34461

def provisioned_size=(value)
  @provisioned_size = value
end

#qcow_versionQcowVersion

Returns the value of the qcow_version attribute.

Returns:



34470
34471
34472
# File 'lib/ovirtsdk4/types.rb', line 34470

def qcow_version
  @qcow_version
end

#qcow_version=(value) ⇒ Object

Sets the value of the qcow_version attribute.

Parameters:



34479
34480
34481
# File 'lib/ovirtsdk4/types.rb', line 34479

def qcow_version=(value)
  @qcow_version = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



34488
34489
34490
# File 'lib/ovirtsdk4/types.rb', line 34488

def quota
  @quota
end

#quota=(value) ⇒ Object

Sets the value of the quota attribute.

The value parameter can be an instance of Quota 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.

Parameters:



34501
34502
34503
34504
34505
34506
# File 'lib/ovirtsdk4/types.rb', line 34501

def quota=(value)
  if value.is_a?(Hash)
    value = Quota.new(value)
  end
  @quota = value
end

#read_onlyBoolean

Returns the value of the read_only attribute.

Returns:

  • (Boolean)


34513
34514
34515
# File 'lib/ovirtsdk4/types.rb', line 34513

def read_only
  @read_only
end

#read_only=(value) ⇒ Object

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


34522
34523
34524
# File 'lib/ovirtsdk4/types.rb', line 34522

def read_only=(value)
  @read_only = value
end

#sgioScsiGenericIO

Returns the value of the sgio attribute.

Returns:



34531
34532
34533
# File 'lib/ovirtsdk4/types.rb', line 34531

def sgio
  @sgio
end

#sgio=(value) ⇒ Object

Sets the value of the sgio attribute.

Parameters:



34540
34541
34542
# File 'lib/ovirtsdk4/types.rb', line 34540

def sgio=(value)
  @sgio = value
end

#shareableBoolean

Returns the value of the shareable attribute.

Returns:

  • (Boolean)


34549
34550
34551
# File 'lib/ovirtsdk4/types.rb', line 34549

def shareable
  @shareable
end

#shareable=(value) ⇒ Object

Sets the value of the shareable attribute.

Parameters:

  • value (Boolean)


34558
34559
34560
# File 'lib/ovirtsdk4/types.rb', line 34558

def shareable=(value)
  @shareable = value
end

#snapshotSnapshot

Returns the value of the snapshot attribute.

Returns:



34567
34568
34569
# File 'lib/ovirtsdk4/types.rb', line 34567

def snapshot
  @snapshot
end

#snapshot=(value) ⇒ Object

Sets the value of the snapshot attribute.

The value parameter can be an instance of Snapshot 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.

Parameters:



34580
34581
34582
34583
34584
34585
# File 'lib/ovirtsdk4/types.rb', line 34580

def snapshot=(value)
  if value.is_a?(Hash)
    value = Snapshot.new(value)
  end
  @snapshot = value
end

#sparseBoolean

Returns the value of the sparse attribute.

Returns:

  • (Boolean)


34592
34593
34594
# File 'lib/ovirtsdk4/types.rb', line 34592

def sparse
  @sparse
end

#sparse=(value) ⇒ Object

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


34601
34602
34603
# File 'lib/ovirtsdk4/types.rb', line 34601

def sparse=(value)
  @sparse = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



34610
34611
34612
# File 'lib/ovirtsdk4/types.rb', line 34610

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
# File 'lib/ovirtsdk4/types.rb', line 34619

def statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Statistic.new(value)
      end
    end
  end
  @statistics = list
end

#statusDiskStatus

Returns the value of the status attribute.

Returns:



34636
34637
34638
# File 'lib/ovirtsdk4/types.rb', line 34636

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



34645
34646
34647
# File 'lib/ovirtsdk4/types.rb', line 34645

def status=(value)
  @status = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



34654
34655
34656
# File 'lib/ovirtsdk4/types.rb', line 34654

def storage_domain
  @storage_domain
end

#storage_domain=(value) ⇒ Object

Sets the value of the storage_domain attribute.

The value parameter can be an instance of StorageDomain 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.

Parameters:



34667
34668
34669
34670
34671
34672
# File 'lib/ovirtsdk4/types.rb', line 34667

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end

#storage_domainsArray<StorageDomain>

Returns the value of the storage_domains attribute.

Returns:



34679
34680
34681
# File 'lib/ovirtsdk4/types.rb', line 34679

def storage_domains
  @storage_domains
end

#storage_domains=(list) ⇒ Object

Sets the value of the storage_domains attribute.

Parameters:



34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
# File 'lib/ovirtsdk4/types.rb', line 34688

def storage_domains=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = StorageDomain.new(value)
      end
    end
  end
  @storage_domains = list
end

#storage_typeDiskStorageType

Returns the value of the storage_type attribute.

Returns:



34705
34706
34707
# File 'lib/ovirtsdk4/types.rb', line 34705

def storage_type
  @storage_type
end

#storage_type=(value) ⇒ Object

Sets the value of the storage_type attribute.

Parameters:



34714
34715
34716
# File 'lib/ovirtsdk4/types.rb', line 34714

def storage_type=(value)
  @storage_type = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



34723
34724
34725
# File 'lib/ovirtsdk4/types.rb', line 34723

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

The value parameter can be an instance of Template 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.

Parameters:



34736
34737
34738
34739
34740
34741
# File 'lib/ovirtsdk4/types.rb', line 34736

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#total_sizeInteger

Returns the value of the total_size attribute.

Returns:

  • (Integer)


34748
34749
34750
# File 'lib/ovirtsdk4/types.rb', line 34748

def total_size
  @total_size
end

#total_size=(value) ⇒ Object

Sets the value of the total_size attribute.

Parameters:

  • value (Integer)


34757
34758
34759
# File 'lib/ovirtsdk4/types.rb', line 34757

def total_size=(value)
  @total_size = value
end

#uses_scsi_reservationBoolean

Returns the value of the uses_scsi_reservation attribute.

Returns:

  • (Boolean)


34766
34767
34768
# File 'lib/ovirtsdk4/types.rb', line 34766

def uses_scsi_reservation
  @uses_scsi_reservation
end

#uses_scsi_reservation=(value) ⇒ Object

Sets the value of the uses_scsi_reservation attribute.

Parameters:

  • value (Boolean)


34775
34776
34777
# File 'lib/ovirtsdk4/types.rb', line 34775

def uses_scsi_reservation=(value)
  @uses_scsi_reservation = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



34784
34785
34786
# File 'lib/ovirtsdk4/types.rb', line 34784

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

The value parameter can be an instance of Vm 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.

Parameters:

  • value (Vm, Hash)


34797
34798
34799
34800
34801
34802
# File 'lib/ovirtsdk4/types.rb', line 34797

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end

#vmsArray<Vm>

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


34809
34810
34811
# File 'lib/ovirtsdk4/types.rb', line 34809

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
# File 'lib/ovirtsdk4/types.rb', line 34818

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

#wipe_after_deleteBoolean

Returns the value of the wipe_after_delete attribute.

Returns:

  • (Boolean)


34835
34836
34837
# File 'lib/ovirtsdk4/types.rb', line 34835

def wipe_after_delete
  @wipe_after_delete
end

#wipe_after_delete=(value) ⇒ Object

Sets the value of the wipe_after_delete attribute.

Parameters:

  • value (Boolean)


34844
34845
34846
# File 'lib/ovirtsdk4/types.rb', line 34844

def wipe_after_delete=(value)
  @wipe_after_delete = value
end