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

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



34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
# File 'lib/ovirtsdk4/types.rb', line 34254

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.actual_size = opts[:actual_size]
  self.alias_ = opts[:alias_]
  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.



34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
# File 'lib/ovirtsdk4/types.rb', line 34292

def ==(other)
  super &&
  @active == other.active &&
  @actual_size == other.actual_size &&
  @alias_ == other.alias_ &&
  @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)


33376
33377
33378
# File 'lib/ovirtsdk4/types.rb', line 33376

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


33385
33386
33387
# File 'lib/ovirtsdk4/types.rb', line 33385

def active=(value)
  @active = value
end

#actual_sizeInteger

Returns the value of the actual_size attribute.

Returns:

  • (Integer)


33394
33395
33396
# File 'lib/ovirtsdk4/types.rb', line 33394

def actual_size
  @actual_size
end

#actual_size=(value) ⇒ Object

Sets the value of the actual_size attribute.

Parameters:

  • value (Integer)


33403
33404
33405
# File 'lib/ovirtsdk4/types.rb', line 33403

def actual_size=(value)
  @actual_size = value
end

#alias_String

Returns the value of the alias_ attribute.

Returns:

  • (String)


33412
33413
33414
# File 'lib/ovirtsdk4/types.rb', line 33412

def alias_
  @alias_
end

#alias_=(value) ⇒ Object

Sets the value of the alias_ attribute.

Parameters:

  • value (String)


33421
33422
33423
# File 'lib/ovirtsdk4/types.rb', line 33421

def alias_=(value)
  @alias_ = value
end

#bootableBoolean

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


33430
33431
33432
# File 'lib/ovirtsdk4/types.rb', line 33430

def bootable
  @bootable
end

#bootable=(value) ⇒ Object

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


33439
33440
33441
# File 'lib/ovirtsdk4/types.rb', line 33439

def bootable=(value)
  @bootable = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


33448
33449
33450
# File 'lib/ovirtsdk4/types.rb', line 33448

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


33457
33458
33459
# File 'lib/ovirtsdk4/types.rb', line 33457

def comment=(value)
  @comment = value
end

#content_typeDiskContentType

Returns the value of the content_type attribute.

Returns:



33466
33467
33468
# File 'lib/ovirtsdk4/types.rb', line 33466

def content_type
  @content_type
end

#content_type=(value) ⇒ Object

Sets the value of the content_type attribute.

Parameters:



33475
33476
33477
# File 'lib/ovirtsdk4/types.rb', line 33475

def content_type=(value)
  @content_type = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


33484
33485
33486
# File 'lib/ovirtsdk4/types.rb', line 33484

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


33493
33494
33495
# File 'lib/ovirtsdk4/types.rb', line 33493

def description=(value)
  @description = value
end

#disk_profileDiskProfile

Returns the value of the disk_profile attribute.

Returns:



33502
33503
33504
# File 'lib/ovirtsdk4/types.rb', line 33502

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:



33515
33516
33517
33518
33519
33520
# File 'lib/ovirtsdk4/types.rb', line 33515

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:



33527
33528
33529
# File 'lib/ovirtsdk4/types.rb', line 33527

def format
  @format
end

#format=(value) ⇒ Object

Sets the value of the format attribute.

Parameters:



33536
33537
33538
# File 'lib/ovirtsdk4/types.rb', line 33536

def format=(value)
  @format = value
end

#hashObject

Generates a hash value for this object.



34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
# File 'lib/ovirtsdk4/types.rb', line 34330

def hash
  super +
  @active.hash +
  @actual_size.hash +
  @alias_.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)


33545
33546
33547
# File 'lib/ovirtsdk4/types.rb', line 33545

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


33554
33555
33556
# File 'lib/ovirtsdk4/types.rb', line 33554

def id=(value)
  @id = value
end

#image_idString

Returns the value of the image_id attribute.

Returns:

  • (String)


33563
33564
33565
# File 'lib/ovirtsdk4/types.rb', line 33563

def image_id
  @image_id
end

#image_id=(value) ⇒ Object

Sets the value of the image_id attribute.

Parameters:

  • value (String)


33572
33573
33574
# File 'lib/ovirtsdk4/types.rb', line 33572

def image_id=(value)
  @image_id = value
end

#initial_sizeInteger

Returns the value of the initial_size attribute.

Returns:

  • (Integer)


33581
33582
33583
# File 'lib/ovirtsdk4/types.rb', line 33581

def initial_size
  @initial_size
end

#initial_size=(value) ⇒ Object

Sets the value of the initial_size attribute.

Parameters:

  • value (Integer)


33590
33591
33592
# File 'lib/ovirtsdk4/types.rb', line 33590

def initial_size=(value)
  @initial_size = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



33599
33600
33601
# File 'lib/ovirtsdk4/types.rb', line 33599

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:



33612
33613
33614
33615
33616
33617
# File 'lib/ovirtsdk4/types.rb', line 33612

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:



33624
33625
33626
# File 'lib/ovirtsdk4/types.rb', line 33624

def interface
  @interface
end

#interface=(value) ⇒ Object

Sets the value of the interface attribute.

Parameters:



33633
33634
33635
# File 'lib/ovirtsdk4/types.rb', line 33633

def interface=(value)
  @interface = value
end

#logical_nameString

Returns the value of the logical_name attribute.

Returns:

  • (String)


33642
33643
33644
# File 'lib/ovirtsdk4/types.rb', line 33642

def logical_name
  @logical_name
end

#logical_name=(value) ⇒ Object

Sets the value of the logical_name attribute.

Parameters:

  • value (String)


33651
33652
33653
# File 'lib/ovirtsdk4/types.rb', line 33651

def logical_name=(value)
  @logical_name = value
end

#lun_storageHostStorage

Returns the value of the lun_storage attribute.

Returns:



33660
33661
33662
# File 'lib/ovirtsdk4/types.rb', line 33660

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:



33673
33674
33675
33676
33677
33678
# File 'lib/ovirtsdk4/types.rb', line 33673

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)


33685
33686
33687
# File 'lib/ovirtsdk4/types.rb', line 33685

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


33694
33695
33696
# File 'lib/ovirtsdk4/types.rb', line 33694

def name=(value)
  @name = value
end

#openstack_volume_typeOpenStackVolumeType

Returns the value of the openstack_volume_type attribute.

Returns:



33703
33704
33705
# File 'lib/ovirtsdk4/types.rb', line 33703

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:



33716
33717
33718
33719
33720
33721
# File 'lib/ovirtsdk4/types.rb', line 33716

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:



33728
33729
33730
# File 'lib/ovirtsdk4/types.rb', line 33728

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
# File 'lib/ovirtsdk4/types.rb', line 33737

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)


33754
33755
33756
# File 'lib/ovirtsdk4/types.rb', line 33754

def propagate_errors
  @propagate_errors
end

#propagate_errors=(value) ⇒ Object

Sets the value of the propagate_errors attribute.

Parameters:

  • value (Boolean)


33763
33764
33765
# File 'lib/ovirtsdk4/types.rb', line 33763

def propagate_errors=(value)
  @propagate_errors = value
end

#provisioned_sizeInteger

Returns the value of the provisioned_size attribute.

Returns:

  • (Integer)


33772
33773
33774
# File 'lib/ovirtsdk4/types.rb', line 33772

def provisioned_size
  @provisioned_size
end

#provisioned_size=(value) ⇒ Object

Sets the value of the provisioned_size attribute.

Parameters:

  • value (Integer)


33781
33782
33783
# File 'lib/ovirtsdk4/types.rb', line 33781

def provisioned_size=(value)
  @provisioned_size = value
end

#qcow_versionQcowVersion

Returns the value of the qcow_version attribute.

Returns:



33790
33791
33792
# File 'lib/ovirtsdk4/types.rb', line 33790

def qcow_version
  @qcow_version
end

#qcow_version=(value) ⇒ Object

Sets the value of the qcow_version attribute.

Parameters:



33799
33800
33801
# File 'lib/ovirtsdk4/types.rb', line 33799

def qcow_version=(value)
  @qcow_version = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



33808
33809
33810
# File 'lib/ovirtsdk4/types.rb', line 33808

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:



33821
33822
33823
33824
33825
33826
# File 'lib/ovirtsdk4/types.rb', line 33821

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)


33833
33834
33835
# File 'lib/ovirtsdk4/types.rb', line 33833

def read_only
  @read_only
end

#read_only=(value) ⇒ Object

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


33842
33843
33844
# File 'lib/ovirtsdk4/types.rb', line 33842

def read_only=(value)
  @read_only = value
end

#sgioScsiGenericIO

Returns the value of the sgio attribute.

Returns:



33851
33852
33853
# File 'lib/ovirtsdk4/types.rb', line 33851

def sgio
  @sgio
end

#sgio=(value) ⇒ Object

Sets the value of the sgio attribute.

Parameters:



33860
33861
33862
# File 'lib/ovirtsdk4/types.rb', line 33860

def sgio=(value)
  @sgio = value
end

#shareableBoolean

Returns the value of the shareable attribute.

Returns:

  • (Boolean)


33869
33870
33871
# File 'lib/ovirtsdk4/types.rb', line 33869

def shareable
  @shareable
end

#shareable=(value) ⇒ Object

Sets the value of the shareable attribute.

Parameters:

  • value (Boolean)


33878
33879
33880
# File 'lib/ovirtsdk4/types.rb', line 33878

def shareable=(value)
  @shareable = value
end

#snapshotSnapshot

Returns the value of the snapshot attribute.

Returns:



33887
33888
33889
# File 'lib/ovirtsdk4/types.rb', line 33887

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:



33900
33901
33902
33903
33904
33905
# File 'lib/ovirtsdk4/types.rb', line 33900

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)


33912
33913
33914
# File 'lib/ovirtsdk4/types.rb', line 33912

def sparse
  @sparse
end

#sparse=(value) ⇒ Object

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


33921
33922
33923
# File 'lib/ovirtsdk4/types.rb', line 33921

def sparse=(value)
  @sparse = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



33930
33931
33932
# File 'lib/ovirtsdk4/types.rb', line 33930

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
# File 'lib/ovirtsdk4/types.rb', line 33939

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:



33956
33957
33958
# File 'lib/ovirtsdk4/types.rb', line 33956

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



33965
33966
33967
# File 'lib/ovirtsdk4/types.rb', line 33965

def status=(value)
  @status = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



33974
33975
33976
# File 'lib/ovirtsdk4/types.rb', line 33974

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:



33987
33988
33989
33990
33991
33992
# File 'lib/ovirtsdk4/types.rb', line 33987

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:



33999
34000
34001
# File 'lib/ovirtsdk4/types.rb', line 33999

def storage_domains
  @storage_domains
end

#storage_domains=(list) ⇒ Object

Sets the value of the storage_domains attribute.

Parameters:



34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
# File 'lib/ovirtsdk4/types.rb', line 34008

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:



34025
34026
34027
# File 'lib/ovirtsdk4/types.rb', line 34025

def storage_type
  @storage_type
end

#storage_type=(value) ⇒ Object

Sets the value of the storage_type attribute.

Parameters:



34034
34035
34036
# File 'lib/ovirtsdk4/types.rb', line 34034

def storage_type=(value)
  @storage_type = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



34043
34044
34045
# File 'lib/ovirtsdk4/types.rb', line 34043

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:



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

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)


34068
34069
34070
# File 'lib/ovirtsdk4/types.rb', line 34068

def total_size
  @total_size
end

#total_size=(value) ⇒ Object

Sets the value of the total_size attribute.

Parameters:

  • value (Integer)


34077
34078
34079
# File 'lib/ovirtsdk4/types.rb', line 34077

def total_size=(value)
  @total_size = value
end

#uses_scsi_reservationBoolean

Returns the value of the uses_scsi_reservation attribute.

Returns:

  • (Boolean)


34086
34087
34088
# File 'lib/ovirtsdk4/types.rb', line 34086

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)


34095
34096
34097
# File 'lib/ovirtsdk4/types.rb', line 34095

def uses_scsi_reservation=(value)
  @uses_scsi_reservation = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



34104
34105
34106
# File 'lib/ovirtsdk4/types.rb', line 34104

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)


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

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>)


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

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
# File 'lib/ovirtsdk4/types.rb', line 34138

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)


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

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)


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

def wipe_after_delete=(value)
  @wipe_after_delete = value
end