Class: OvirtSDK4::DiskSnapshot

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

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ DiskSnapshot

Creates a new instance of the OvirtSDK4::DiskSnapshot 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.

  • :description (String)

    The value of attribute description.

  • :disk (Disk, Hash)

    The value of attribute disk.

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



35643
35644
35645
35646
# File 'lib/ovirtsdk4/types.rb', line 35643

def initialize(opts = {})
  super(opts)
  self.disk = opts[:disk]
end

Instance Method Details

#==(other) ⇒ Object

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



35651
35652
35653
35654
# File 'lib/ovirtsdk4/types.rb', line 35651

def ==(other)
  super &&
  @disk == other.disk
end

#activeBoolean

Returns the value of the active attribute.

Returns:

  • (Boolean)


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

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


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

def active=(value)
  @active = value
end

#actual_sizeInteger

Returns the value of the actual_size attribute.

Returns:

  • (Integer)


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

def actual_size
  @actual_size
end

#actual_size=(value) ⇒ Object

Sets the value of the actual_size attribute.

Parameters:

  • value (Integer)


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

def actual_size=(value)
  @actual_size = value
end

#alias_String

Returns the value of the alias_ attribute.

Returns:

  • (String)


34794
34795
34796
# File 'lib/ovirtsdk4/types.rb', line 34794

def alias_
  @alias_
end

#alias_=(value) ⇒ Object

Sets the value of the alias_ attribute.

Parameters:

  • value (String)


34803
34804
34805
# File 'lib/ovirtsdk4/types.rb', line 34803

def alias_=(value)
  @alias_ = value
end

#bootableBoolean

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


34812
34813
34814
# File 'lib/ovirtsdk4/types.rb', line 34812

def bootable
  @bootable
end

#bootable=(value) ⇒ Object

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


34821
34822
34823
# File 'lib/ovirtsdk4/types.rb', line 34821

def bootable=(value)
  @bootable = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


34830
34831
34832
# File 'lib/ovirtsdk4/types.rb', line 34830

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


34839
34840
34841
# File 'lib/ovirtsdk4/types.rb', line 34839

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


34848
34849
34850
# File 'lib/ovirtsdk4/types.rb', line 34848

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


34857
34858
34859
# File 'lib/ovirtsdk4/types.rb', line 34857

def description=(value)
  @description = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



34866
34867
34868
# File 'lib/ovirtsdk4/types.rb', line 34866

def disk
  @disk
end

#disk=(value) ⇒ Object

Sets the value of the disk attribute.

The value parameter can be an instance of OvirtSDK4::Disk 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 (Disk, Hash)


34879
34880
34881
34882
34883
34884
# File 'lib/ovirtsdk4/types.rb', line 34879

def disk=(value)
  if value.is_a?(Hash)
    value = Disk.new(value)
  end
  @disk = value
end

#disk_profileDiskProfile

Returns the value of the disk_profile attribute.

Returns:



34891
34892
34893
# File 'lib/ovirtsdk4/types.rb', line 34891

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:



34904
34905
34906
34907
34908
34909
# File 'lib/ovirtsdk4/types.rb', line 34904

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:



34916
34917
34918
# File 'lib/ovirtsdk4/types.rb', line 34916

def format
  @format
end

#format=(value) ⇒ Object

Sets the value of the format attribute.

Parameters:



34925
34926
34927
# File 'lib/ovirtsdk4/types.rb', line 34925

def format=(value)
  @format = value
end

#hashObject

Generates a hash value for this object.



35659
35660
35661
35662
# File 'lib/ovirtsdk4/types.rb', line 35659

def hash
  super +
  @disk.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


34934
34935
34936
# File 'lib/ovirtsdk4/types.rb', line 34934

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


34943
34944
34945
# File 'lib/ovirtsdk4/types.rb', line 34943

def id=(value)
  @id = value
end

#image_idString

Returns the value of the image_id attribute.

Returns:

  • (String)


34952
34953
34954
# File 'lib/ovirtsdk4/types.rb', line 34952

def image_id
  @image_id
end

#image_id=(value) ⇒ Object

Sets the value of the image_id attribute.

Parameters:

  • value (String)


34961
34962
34963
# File 'lib/ovirtsdk4/types.rb', line 34961

def image_id=(value)
  @image_id = value
end

#initial_sizeInteger

Returns the value of the initial_size attribute.

Returns:

  • (Integer)


34970
34971
34972
# File 'lib/ovirtsdk4/types.rb', line 34970

def initial_size
  @initial_size
end

#initial_size=(value) ⇒ Object

Sets the value of the initial_size attribute.

Parameters:

  • value (Integer)


34979
34980
34981
# File 'lib/ovirtsdk4/types.rb', line 34979

def initial_size=(value)
  @initial_size = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



34988
34989
34990
# File 'lib/ovirtsdk4/types.rb', line 34988

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:



35001
35002
35003
35004
35005
35006
# File 'lib/ovirtsdk4/types.rb', line 35001

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:



35013
35014
35015
# File 'lib/ovirtsdk4/types.rb', line 35013

def interface
  @interface
end

#interface=(value) ⇒ Object

Sets the value of the interface attribute.

Parameters:



35022
35023
35024
# File 'lib/ovirtsdk4/types.rb', line 35022

def interface=(value)
  @interface = value
end

#logical_nameString

Returns the value of the logical_name attribute.

Returns:

  • (String)


35031
35032
35033
# File 'lib/ovirtsdk4/types.rb', line 35031

def logical_name
  @logical_name
end

#logical_name=(value) ⇒ Object

Sets the value of the logical_name attribute.

Parameters:

  • value (String)


35040
35041
35042
# File 'lib/ovirtsdk4/types.rb', line 35040

def logical_name=(value)
  @logical_name = value
end

#lun_storageHostStorage

Returns the value of the lun_storage attribute.

Returns:



35049
35050
35051
# File 'lib/ovirtsdk4/types.rb', line 35049

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:



35062
35063
35064
35065
35066
35067
# File 'lib/ovirtsdk4/types.rb', line 35062

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)


35074
35075
35076
# File 'lib/ovirtsdk4/types.rb', line 35074

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


35083
35084
35085
# File 'lib/ovirtsdk4/types.rb', line 35083

def name=(value)
  @name = value
end

#openstack_volume_typeOpenStackVolumeType

Returns the value of the openstack_volume_type attribute.

Returns:



35092
35093
35094
# File 'lib/ovirtsdk4/types.rb', line 35092

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:



35105
35106
35107
35108
35109
35110
# File 'lib/ovirtsdk4/types.rb', line 35105

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:



35117
35118
35119
# File 'lib/ovirtsdk4/types.rb', line 35117

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
# File 'lib/ovirtsdk4/types.rb', line 35126

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)


35143
35144
35145
# File 'lib/ovirtsdk4/types.rb', line 35143

def propagate_errors
  @propagate_errors
end

#propagate_errors=(value) ⇒ Object

Sets the value of the propagate_errors attribute.

Parameters:

  • value (Boolean)


35152
35153
35154
# File 'lib/ovirtsdk4/types.rb', line 35152

def propagate_errors=(value)
  @propagate_errors = value
end

#provisioned_sizeInteger

Returns the value of the provisioned_size attribute.

Returns:

  • (Integer)


35161
35162
35163
# File 'lib/ovirtsdk4/types.rb', line 35161

def provisioned_size
  @provisioned_size
end

#provisioned_size=(value) ⇒ Object

Sets the value of the provisioned_size attribute.

Parameters:

  • value (Integer)


35170
35171
35172
# File 'lib/ovirtsdk4/types.rb', line 35170

def provisioned_size=(value)
  @provisioned_size = value
end

#qcow_versionQcowVersion

Returns the value of the qcow_version attribute.

Returns:



35179
35180
35181
# File 'lib/ovirtsdk4/types.rb', line 35179

def qcow_version
  @qcow_version
end

#qcow_version=(value) ⇒ Object

Sets the value of the qcow_version attribute.

Parameters:



35188
35189
35190
# File 'lib/ovirtsdk4/types.rb', line 35188

def qcow_version=(value)
  @qcow_version = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



35197
35198
35199
# File 'lib/ovirtsdk4/types.rb', line 35197

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:



35210
35211
35212
35213
35214
35215
# File 'lib/ovirtsdk4/types.rb', line 35210

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)


35222
35223
35224
# File 'lib/ovirtsdk4/types.rb', line 35222

def read_only
  @read_only
end

#read_only=(value) ⇒ Object

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


35231
35232
35233
# File 'lib/ovirtsdk4/types.rb', line 35231

def read_only=(value)
  @read_only = value
end

#sgioScsiGenericIO

Returns the value of the sgio attribute.

Returns:



35240
35241
35242
# File 'lib/ovirtsdk4/types.rb', line 35240

def sgio
  @sgio
end

#sgio=(value) ⇒ Object

Sets the value of the sgio attribute.

Parameters:



35249
35250
35251
# File 'lib/ovirtsdk4/types.rb', line 35249

def sgio=(value)
  @sgio = value
end

#shareableBoolean

Returns the value of the shareable attribute.

Returns:

  • (Boolean)


35258
35259
35260
# File 'lib/ovirtsdk4/types.rb', line 35258

def shareable
  @shareable
end

#shareable=(value) ⇒ Object

Sets the value of the shareable attribute.

Parameters:

  • value (Boolean)


35267
35268
35269
# File 'lib/ovirtsdk4/types.rb', line 35267

def shareable=(value)
  @shareable = value
end

#snapshotSnapshot

Returns the value of the snapshot attribute.

Returns:



35276
35277
35278
# File 'lib/ovirtsdk4/types.rb', line 35276

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:



35289
35290
35291
35292
35293
35294
# File 'lib/ovirtsdk4/types.rb', line 35289

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)


35301
35302
35303
# File 'lib/ovirtsdk4/types.rb', line 35301

def sparse
  @sparse
end

#sparse=(value) ⇒ Object

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


35310
35311
35312
# File 'lib/ovirtsdk4/types.rb', line 35310

def sparse=(value)
  @sparse = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



35319
35320
35321
# File 'lib/ovirtsdk4/types.rb', line 35319

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
# File 'lib/ovirtsdk4/types.rb', line 35328

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:



35345
35346
35347
# File 'lib/ovirtsdk4/types.rb', line 35345

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



35354
35355
35356
# File 'lib/ovirtsdk4/types.rb', line 35354

def status=(value)
  @status = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



35363
35364
35365
# File 'lib/ovirtsdk4/types.rb', line 35363

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:



35376
35377
35378
35379
35380
35381
# File 'lib/ovirtsdk4/types.rb', line 35376

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:



35388
35389
35390
# File 'lib/ovirtsdk4/types.rb', line 35388

def storage_domains
  @storage_domains
end

#storage_domains=(list) ⇒ Object

Sets the value of the storage_domains attribute.

Parameters:



35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
# File 'lib/ovirtsdk4/types.rb', line 35397

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:



35414
35415
35416
# File 'lib/ovirtsdk4/types.rb', line 35414

def storage_type
  @storage_type
end

#storage_type=(value) ⇒ Object

Sets the value of the storage_type attribute.

Parameters:



35423
35424
35425
# File 'lib/ovirtsdk4/types.rb', line 35423

def storage_type=(value)
  @storage_type = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



35432
35433
35434
# File 'lib/ovirtsdk4/types.rb', line 35432

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:



35445
35446
35447
35448
35449
35450
# File 'lib/ovirtsdk4/types.rb', line 35445

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)


35457
35458
35459
# File 'lib/ovirtsdk4/types.rb', line 35457

def total_size
  @total_size
end

#total_size=(value) ⇒ Object

Sets the value of the total_size attribute.

Parameters:

  • value (Integer)


35466
35467
35468
# File 'lib/ovirtsdk4/types.rb', line 35466

def total_size=(value)
  @total_size = value
end

#uses_scsi_reservationBoolean

Returns the value of the uses_scsi_reservation attribute.

Returns:

  • (Boolean)


35475
35476
35477
# File 'lib/ovirtsdk4/types.rb', line 35475

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)


35484
35485
35486
# File 'lib/ovirtsdk4/types.rb', line 35484

def uses_scsi_reservation=(value)
  @uses_scsi_reservation = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



35493
35494
35495
# File 'lib/ovirtsdk4/types.rb', line 35493

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)


35506
35507
35508
35509
35510
35511
# File 'lib/ovirtsdk4/types.rb', line 35506

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


35518
35519
35520
# File 'lib/ovirtsdk4/types.rb', line 35518

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
# File 'lib/ovirtsdk4/types.rb', line 35527

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)


35544
35545
35546
# File 'lib/ovirtsdk4/types.rb', line 35544

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)


35553
35554
35555
# File 'lib/ovirtsdk4/types.rb', line 35553

def wipe_after_delete=(value)
  @wipe_after_delete = value
end