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

#href, #href=

Constructor Details

- (DiskSnapshot) initialize(opts = {})

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.

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

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

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



27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
# File 'lib/ovirtsdk4/types.rb', line 27794

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.actual_size = opts[:actual_size]
  self.alias_ = opts[:alias_]
  self.bootable = opts[:bootable]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.disk = opts[:disk]
  self.disk_profile = opts[:disk_profile]
  self.format = opts[:format]
  self.id = opts[:id]
  self.image_id = opts[:image_id]
  self.instance_type = opts[:instance_type]
  self.interface = opts[:interface]
  self.logical_name = opts[:logical_name]
  self.lun_storage = opts[:lun_storage]
  self.name = opts[:name]
  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.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.template = opts[:template]
  self.uses_scsi_reservation = opts[:uses_scsi_reservation]
  self.vm = opts[:vm]
  self.vms = opts[:vms]
  self.wipe_after_delete = opts[:wipe_after_delete]
end

Instance Method Details

- (Boolean) active

Returns the value of the active attribute.

Returns:

  • (Boolean)


26973
26974
26975
# File 'lib/ovirtsdk4/types.rb', line 26973

def active
  return @active
end

- (Object) active=(value)

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


26982
26983
26984
# File 'lib/ovirtsdk4/types.rb', line 26982

def active=(value)
  @active = value
end

- (Integer) actual_size

Returns the value of the actual_size attribute.

Returns:

  • (Integer)


26991
26992
26993
# File 'lib/ovirtsdk4/types.rb', line 26991

def actual_size
  return @actual_size
end

- (Object) actual_size=(value)

Sets the value of the actual_size attribute.

Parameters:

  • value (Integer)


27000
27001
27002
# File 'lib/ovirtsdk4/types.rb', line 27000

def actual_size=(value)
  @actual_size = value
end

- (String) alias_

Returns the value of the alias_ attribute.

Returns:

  • (String)


27009
27010
27011
# File 'lib/ovirtsdk4/types.rb', line 27009

def alias_
  return @alias_
end

- (Object) alias_=(value)

Sets the value of the alias_ attribute.

Parameters:

  • value (String)


27018
27019
27020
# File 'lib/ovirtsdk4/types.rb', line 27018

def alias_=(value)
  @alias_ = value
end

- (Boolean) bootable

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


27027
27028
27029
# File 'lib/ovirtsdk4/types.rb', line 27027

def bootable
  return @bootable
end

- (Object) bootable=(value)

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


27036
27037
27038
# File 'lib/ovirtsdk4/types.rb', line 27036

def bootable=(value)
  @bootable = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


27045
27046
27047
# File 'lib/ovirtsdk4/types.rb', line 27045

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


27054
27055
27056
# File 'lib/ovirtsdk4/types.rb', line 27054

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


27063
27064
27065
# File 'lib/ovirtsdk4/types.rb', line 27063

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


27072
27073
27074
# File 'lib/ovirtsdk4/types.rb', line 27072

def description=(value)
  @description = value
end

- (Disk) disk

Returns the value of the disk attribute.

Returns:



27081
27082
27083
# File 'lib/ovirtsdk4/types.rb', line 27081

def disk
  return @disk
end

- (Object) disk=(value)

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)


27094
27095
27096
27097
27098
27099
# File 'lib/ovirtsdk4/types.rb', line 27094

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

- (DiskProfile) disk_profile

Returns the value of the disk_profile attribute.

Returns:



27106
27107
27108
# File 'lib/ovirtsdk4/types.rb', line 27106

def disk_profile
  return @disk_profile
end

- (Object) disk_profile=(value)

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:



27119
27120
27121
27122
27123
27124
# File 'lib/ovirtsdk4/types.rb', line 27119

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

- (DiskFormat) format

Returns the value of the format attribute.

Returns:



27131
27132
27133
# File 'lib/ovirtsdk4/types.rb', line 27131

def format
  return @format
end

- (Object) format=(value)

Sets the value of the format attribute.

Parameters:



27140
27141
27142
# File 'lib/ovirtsdk4/types.rb', line 27140

def format=(value)
  @format = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


27149
27150
27151
# File 'lib/ovirtsdk4/types.rb', line 27149

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


27158
27159
27160
# File 'lib/ovirtsdk4/types.rb', line 27158

def id=(value)
  @id = value
end

- (String) image_id

Returns the value of the image_id attribute.

Returns:

  • (String)


27167
27168
27169
# File 'lib/ovirtsdk4/types.rb', line 27167

def image_id
  return @image_id
end

- (Object) image_id=(value)

Sets the value of the image_id attribute.

Parameters:

  • value (String)


27176
27177
27178
# File 'lib/ovirtsdk4/types.rb', line 27176

def image_id=(value)
  @image_id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



27185
27186
27187
# File 'lib/ovirtsdk4/types.rb', line 27185

def instance_type
  return @instance_type
end

- (Object) instance_type=(value)

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:



27198
27199
27200
27201
27202
27203
# File 'lib/ovirtsdk4/types.rb', line 27198

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

- (DiskInterface) interface

Returns the value of the interface attribute.

Returns:



27210
27211
27212
# File 'lib/ovirtsdk4/types.rb', line 27210

def interface
  return @interface
end

- (Object) interface=(value)

Sets the value of the interface attribute.

Parameters:



27219
27220
27221
# File 'lib/ovirtsdk4/types.rb', line 27219

def interface=(value)
  @interface = value
end

- (String) logical_name

Returns the value of the logical_name attribute.

Returns:

  • (String)


27228
27229
27230
# File 'lib/ovirtsdk4/types.rb', line 27228

def logical_name
  return @logical_name
end

- (Object) logical_name=(value)

Sets the value of the logical_name attribute.

Parameters:

  • value (String)


27237
27238
27239
# File 'lib/ovirtsdk4/types.rb', line 27237

def logical_name=(value)
  @logical_name = value
end

- (HostStorage) lun_storage

Returns the value of the lun_storage attribute.

Returns:



27246
27247
27248
# File 'lib/ovirtsdk4/types.rb', line 27246

def lun_storage
  return @lun_storage
end

- (Object) lun_storage=(value)

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:



27259
27260
27261
27262
27263
27264
# File 'lib/ovirtsdk4/types.rb', line 27259

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

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


27271
27272
27273
# File 'lib/ovirtsdk4/types.rb', line 27271

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


27280
27281
27282
# File 'lib/ovirtsdk4/types.rb', line 27280

def name=(value)
  @name = value
end

- (OpenStackVolumeType) openstack_volume_type

Returns the value of the openstack_volume_type attribute.

Returns:



27289
27290
27291
# File 'lib/ovirtsdk4/types.rb', line 27289

def openstack_volume_type
  return @openstack_volume_type
end

- (Object) openstack_volume_type=(value)

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:



27302
27303
27304
27305
27306
27307
# File 'lib/ovirtsdk4/types.rb', line 27302

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

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



27314
27315
27316
# File 'lib/ovirtsdk4/types.rb', line 27314

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
# File 'lib/ovirtsdk4/types.rb', line 27322

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

- (Boolean) propagate_errors

Returns the value of the propagate_errors attribute.

Returns:

  • (Boolean)


27339
27340
27341
# File 'lib/ovirtsdk4/types.rb', line 27339

def propagate_errors
  return @propagate_errors
end

- (Object) propagate_errors=(value)

Sets the value of the propagate_errors attribute.

Parameters:

  • value (Boolean)


27348
27349
27350
# File 'lib/ovirtsdk4/types.rb', line 27348

def propagate_errors=(value)
  @propagate_errors = value
end

- (Integer) provisioned_size

Returns the value of the provisioned_size attribute.

Returns:

  • (Integer)


27357
27358
27359
# File 'lib/ovirtsdk4/types.rb', line 27357

def provisioned_size
  return @provisioned_size
end

- (Object) provisioned_size=(value)

Sets the value of the provisioned_size attribute.

Parameters:

  • value (Integer)


27366
27367
27368
# File 'lib/ovirtsdk4/types.rb', line 27366

def provisioned_size=(value)
  @provisioned_size = value
end

- (Quota) quota

Returns the value of the quota attribute.

Returns:



27375
27376
27377
# File 'lib/ovirtsdk4/types.rb', line 27375

def quota
  return @quota
end

- (Object) quota=(value)

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:



27388
27389
27390
27391
27392
27393
# File 'lib/ovirtsdk4/types.rb', line 27388

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

- (Boolean) read_only

Returns the value of the read_only attribute.

Returns:

  • (Boolean)


27400
27401
27402
# File 'lib/ovirtsdk4/types.rb', line 27400

def read_only
  return @read_only
end

- (Object) read_only=(value)

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


27409
27410
27411
# File 'lib/ovirtsdk4/types.rb', line 27409

def read_only=(value)
  @read_only = value
end

- (ScsiGenericIO) sgio

Returns the value of the sgio attribute.

Returns:



27418
27419
27420
# File 'lib/ovirtsdk4/types.rb', line 27418

def sgio
  return @sgio
end

- (Object) sgio=(value)

Sets the value of the sgio attribute.

Parameters:



27427
27428
27429
# File 'lib/ovirtsdk4/types.rb', line 27427

def sgio=(value)
  @sgio = value
end

- (Boolean) shareable

Returns the value of the shareable attribute.

Returns:

  • (Boolean)


27436
27437
27438
# File 'lib/ovirtsdk4/types.rb', line 27436

def shareable
  return @shareable
end

- (Object) shareable=(value)

Sets the value of the shareable attribute.

Parameters:

  • value (Boolean)


27445
27446
27447
# File 'lib/ovirtsdk4/types.rb', line 27445

def shareable=(value)
  @shareable = value
end

- (Snapshot) snapshot

Returns the value of the snapshot attribute.

Returns:



27454
27455
27456
# File 'lib/ovirtsdk4/types.rb', line 27454

def snapshot
  return @snapshot
end

- (Object) snapshot=(value)

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:



27467
27468
27469
27470
27471
27472
# File 'lib/ovirtsdk4/types.rb', line 27467

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

- (Boolean) sparse

Returns the value of the sparse attribute.

Returns:

  • (Boolean)


27479
27480
27481
# File 'lib/ovirtsdk4/types.rb', line 27479

def sparse
  return @sparse
end

- (Object) sparse=(value)

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


27488
27489
27490
# File 'lib/ovirtsdk4/types.rb', line 27488

def sparse=(value)
  @sparse = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



27497
27498
27499
# File 'lib/ovirtsdk4/types.rb', line 27497

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
# File 'lib/ovirtsdk4/types.rb', line 27505

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

- (DiskStatus) status

Returns the value of the status attribute.

Returns:



27522
27523
27524
# File 'lib/ovirtsdk4/types.rb', line 27522

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



27531
27532
27533
# File 'lib/ovirtsdk4/types.rb', line 27531

def status=(value)
  @status = value
end

- (StorageDomain) storage_domain

Returns the value of the storage_domain attribute.

Returns:



27540
27541
27542
# File 'lib/ovirtsdk4/types.rb', line 27540

def storage_domain
  return @storage_domain
end

- (Object) storage_domain=(value)

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:



27553
27554
27555
27556
27557
27558
# File 'lib/ovirtsdk4/types.rb', line 27553

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

- (Array<StorageDomain>) storage_domains

Returns the value of the storage_domains attribute.

Returns:



27565
27566
27567
# File 'lib/ovirtsdk4/types.rb', line 27565

def storage_domains
  return @storage_domains
end

- (Object) storage_domains=(list)

Sets the value of the storage_domains attribute.

Parameters:



27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
# File 'lib/ovirtsdk4/types.rb', line 27573

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

- (DiskStorageType) storage_type

Returns the value of the storage_type attribute.

Returns:



27590
27591
27592
# File 'lib/ovirtsdk4/types.rb', line 27590

def storage_type
  return @storage_type
end

- (Object) storage_type=(value)

Sets the value of the storage_type attribute.

Parameters:



27599
27600
27601
# File 'lib/ovirtsdk4/types.rb', line 27599

def storage_type=(value)
  @storage_type = value
end

- (Template) template

Returns the value of the template attribute.

Returns:



27608
27609
27610
# File 'lib/ovirtsdk4/types.rb', line 27608

def template
  return @template
end

- (Object) template=(value)

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:



27621
27622
27623
27624
27625
27626
# File 'lib/ovirtsdk4/types.rb', line 27621

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

- (Boolean) uses_scsi_reservation

Returns the value of the uses_scsi_reservation attribute.

Returns:

  • (Boolean)


27633
27634
27635
# File 'lib/ovirtsdk4/types.rb', line 27633

def uses_scsi_reservation
  return @uses_scsi_reservation
end

- (Object) uses_scsi_reservation=(value)

Sets the value of the uses_scsi_reservation attribute.

Parameters:

  • value (Boolean)


27642
27643
27644
# File 'lib/ovirtsdk4/types.rb', line 27642

def uses_scsi_reservation=(value)
  @uses_scsi_reservation = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



27651
27652
27653
# File 'lib/ovirtsdk4/types.rb', line 27651

def vm
  return @vm
end

- (Object) vm=(value)

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)


27664
27665
27666
27667
27668
27669
# File 'lib/ovirtsdk4/types.rb', line 27664

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

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


27676
27677
27678
# File 'lib/ovirtsdk4/types.rb', line 27676

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
# File 'lib/ovirtsdk4/types.rb', line 27684

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

- (Boolean) wipe_after_delete

Returns the value of the wipe_after_delete attribute.

Returns:

  • (Boolean)


27701
27702
27703
# File 'lib/ovirtsdk4/types.rb', line 27701

def wipe_after_delete
  return @wipe_after_delete
end

- (Object) wipe_after_delete=(value)

Sets the value of the wipe_after_delete attribute.

Parameters:

  • value (Boolean)


27710
27711
27712
# File 'lib/ovirtsdk4/types.rb', line 27710

def wipe_after_delete=(value)
  @wipe_after_delete = value
end