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

#href, #href=

Constructor Details

- (Disk) initialize(opts = {})

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.

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

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



26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
# File 'lib/ovirtsdk4/types.rb', line 26543

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


25749
25750
25751
# File 'lib/ovirtsdk4/types.rb', line 25749

def active
  return @active
end

- (Object) active=(value)

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


25758
25759
25760
# File 'lib/ovirtsdk4/types.rb', line 25758

def active=(value)
  @active = value
end

- (Integer) actual_size

Returns the value of the actual_size attribute.

Returns:

  • (Integer)


25767
25768
25769
# File 'lib/ovirtsdk4/types.rb', line 25767

def actual_size
  return @actual_size
end

- (Object) actual_size=(value)

Sets the value of the actual_size attribute.

Parameters:

  • value (Integer)


25776
25777
25778
# File 'lib/ovirtsdk4/types.rb', line 25776

def actual_size=(value)
  @actual_size = value
end

- (String) alias_

Returns the value of the alias_ attribute.

Returns:

  • (String)


25785
25786
25787
# File 'lib/ovirtsdk4/types.rb', line 25785

def alias_
  return @alias_
end

- (Object) alias_=(value)

Sets the value of the alias_ attribute.

Parameters:

  • value (String)


25794
25795
25796
# File 'lib/ovirtsdk4/types.rb', line 25794

def alias_=(value)
  @alias_ = value
end

- (Boolean) bootable

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


25803
25804
25805
# File 'lib/ovirtsdk4/types.rb', line 25803

def bootable
  return @bootable
end

- (Object) bootable=(value)

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


25812
25813
25814
# File 'lib/ovirtsdk4/types.rb', line 25812

def bootable=(value)
  @bootable = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


25821
25822
25823
# File 'lib/ovirtsdk4/types.rb', line 25821

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


25830
25831
25832
# File 'lib/ovirtsdk4/types.rb', line 25830

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


25839
25840
25841
# File 'lib/ovirtsdk4/types.rb', line 25839

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


25848
25849
25850
# File 'lib/ovirtsdk4/types.rb', line 25848

def description=(value)
  @description = value
end

- (DiskProfile) disk_profile

Returns the value of the disk_profile attribute.

Returns:



25857
25858
25859
# File 'lib/ovirtsdk4/types.rb', line 25857

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:



25870
25871
25872
25873
25874
25875
# File 'lib/ovirtsdk4/types.rb', line 25870

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:



25882
25883
25884
# File 'lib/ovirtsdk4/types.rb', line 25882

def format
  return @format
end

- (Object) format=(value)

Sets the value of the format attribute.

Parameters:



25891
25892
25893
# File 'lib/ovirtsdk4/types.rb', line 25891

def format=(value)
  @format = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


25900
25901
25902
# File 'lib/ovirtsdk4/types.rb', line 25900

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


25909
25910
25911
# File 'lib/ovirtsdk4/types.rb', line 25909

def id=(value)
  @id = value
end

- (String) image_id

Returns the value of the image_id attribute.

Returns:

  • (String)


25918
25919
25920
# File 'lib/ovirtsdk4/types.rb', line 25918

def image_id
  return @image_id
end

- (Object) image_id=(value)

Sets the value of the image_id attribute.

Parameters:

  • value (String)


25927
25928
25929
# File 'lib/ovirtsdk4/types.rb', line 25927

def image_id=(value)
  @image_id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



25936
25937
25938
# File 'lib/ovirtsdk4/types.rb', line 25936

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:



25949
25950
25951
25952
25953
25954
# File 'lib/ovirtsdk4/types.rb', line 25949

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:



25961
25962
25963
# File 'lib/ovirtsdk4/types.rb', line 25961

def interface
  return @interface
end

- (Object) interface=(value)

Sets the value of the interface attribute.

Parameters:



25970
25971
25972
# File 'lib/ovirtsdk4/types.rb', line 25970

def interface=(value)
  @interface = value
end

- (String) logical_name

Returns the value of the logical_name attribute.

Returns:

  • (String)


25979
25980
25981
# File 'lib/ovirtsdk4/types.rb', line 25979

def logical_name
  return @logical_name
end

- (Object) logical_name=(value)

Sets the value of the logical_name attribute.

Parameters:

  • value (String)


25988
25989
25990
# File 'lib/ovirtsdk4/types.rb', line 25988

def logical_name=(value)
  @logical_name = value
end

- (HostStorage) lun_storage

Returns the value of the lun_storage attribute.

Returns:



25997
25998
25999
# File 'lib/ovirtsdk4/types.rb', line 25997

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:



26010
26011
26012
26013
26014
26015
# File 'lib/ovirtsdk4/types.rb', line 26010

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)


26022
26023
26024
# File 'lib/ovirtsdk4/types.rb', line 26022

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


26031
26032
26033
# File 'lib/ovirtsdk4/types.rb', line 26031

def name=(value)
  @name = value
end

- (OpenStackVolumeType) openstack_volume_type

Returns the value of the openstack_volume_type attribute.

Returns:



26040
26041
26042
# File 'lib/ovirtsdk4/types.rb', line 26040

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:



26053
26054
26055
26056
26057
26058
# File 'lib/ovirtsdk4/types.rb', line 26053

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:



26065
26066
26067
# File 'lib/ovirtsdk4/types.rb', line 26065

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
# File 'lib/ovirtsdk4/types.rb', line 26073

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)


26090
26091
26092
# File 'lib/ovirtsdk4/types.rb', line 26090

def propagate_errors
  return @propagate_errors
end

- (Object) propagate_errors=(value)

Sets the value of the propagate_errors attribute.

Parameters:

  • value (Boolean)


26099
26100
26101
# File 'lib/ovirtsdk4/types.rb', line 26099

def propagate_errors=(value)
  @propagate_errors = value
end

- (Integer) provisioned_size

Returns the value of the provisioned_size attribute.

Returns:

  • (Integer)


26108
26109
26110
# File 'lib/ovirtsdk4/types.rb', line 26108

def provisioned_size
  return @provisioned_size
end

- (Object) provisioned_size=(value)

Sets the value of the provisioned_size attribute.

Parameters:

  • value (Integer)


26117
26118
26119
# File 'lib/ovirtsdk4/types.rb', line 26117

def provisioned_size=(value)
  @provisioned_size = value
end

- (Quota) quota

Returns the value of the quota attribute.

Returns:



26126
26127
26128
# File 'lib/ovirtsdk4/types.rb', line 26126

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:



26139
26140
26141
26142
26143
26144
# File 'lib/ovirtsdk4/types.rb', line 26139

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)


26151
26152
26153
# File 'lib/ovirtsdk4/types.rb', line 26151

def read_only
  return @read_only
end

- (Object) read_only=(value)

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


26160
26161
26162
# File 'lib/ovirtsdk4/types.rb', line 26160

def read_only=(value)
  @read_only = value
end

- (ScsiGenericIO) sgio

Returns the value of the sgio attribute.

Returns:



26169
26170
26171
# File 'lib/ovirtsdk4/types.rb', line 26169

def sgio
  return @sgio
end

- (Object) sgio=(value)

Sets the value of the sgio attribute.

Parameters:



26178
26179
26180
# File 'lib/ovirtsdk4/types.rb', line 26178

def sgio=(value)
  @sgio = value
end

- (Boolean) shareable

Returns the value of the shareable attribute.

Returns:

  • (Boolean)


26187
26188
26189
# File 'lib/ovirtsdk4/types.rb', line 26187

def shareable
  return @shareable
end

- (Object) shareable=(value)

Sets the value of the shareable attribute.

Parameters:

  • value (Boolean)


26196
26197
26198
# File 'lib/ovirtsdk4/types.rb', line 26196

def shareable=(value)
  @shareable = value
end

- (Snapshot) snapshot

Returns the value of the snapshot attribute.

Returns:



26205
26206
26207
# File 'lib/ovirtsdk4/types.rb', line 26205

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:



26218
26219
26220
26221
26222
26223
# File 'lib/ovirtsdk4/types.rb', line 26218

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)


26230
26231
26232
# File 'lib/ovirtsdk4/types.rb', line 26230

def sparse
  return @sparse
end

- (Object) sparse=(value)

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


26239
26240
26241
# File 'lib/ovirtsdk4/types.rb', line 26239

def sparse=(value)
  @sparse = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



26248
26249
26250
# File 'lib/ovirtsdk4/types.rb', line 26248

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
# File 'lib/ovirtsdk4/types.rb', line 26256

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:



26273
26274
26275
# File 'lib/ovirtsdk4/types.rb', line 26273

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



26282
26283
26284
# File 'lib/ovirtsdk4/types.rb', line 26282

def status=(value)
  @status = value
end

- (StorageDomain) storage_domain

Returns the value of the storage_domain attribute.

Returns:



26291
26292
26293
# File 'lib/ovirtsdk4/types.rb', line 26291

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:



26304
26305
26306
26307
26308
26309
# File 'lib/ovirtsdk4/types.rb', line 26304

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:



26316
26317
26318
# File 'lib/ovirtsdk4/types.rb', line 26316

def storage_domains
  return @storage_domains
end

- (Object) storage_domains=(list)

Sets the value of the storage_domains attribute.

Parameters:



26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
# File 'lib/ovirtsdk4/types.rb', line 26324

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:



26341
26342
26343
# File 'lib/ovirtsdk4/types.rb', line 26341

def storage_type
  return @storage_type
end

- (Object) storage_type=(value)

Sets the value of the storage_type attribute.

Parameters:



26350
26351
26352
# File 'lib/ovirtsdk4/types.rb', line 26350

def storage_type=(value)
  @storage_type = value
end

- (Template) template

Returns the value of the template attribute.

Returns:



26359
26360
26361
# File 'lib/ovirtsdk4/types.rb', line 26359

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:



26372
26373
26374
26375
26376
26377
# File 'lib/ovirtsdk4/types.rb', line 26372

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)


26384
26385
26386
# File 'lib/ovirtsdk4/types.rb', line 26384

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)


26393
26394
26395
# File 'lib/ovirtsdk4/types.rb', line 26393

def uses_scsi_reservation=(value)
  @uses_scsi_reservation = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



26402
26403
26404
# File 'lib/ovirtsdk4/types.rb', line 26402

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)


26415
26416
26417
26418
26419
26420
# File 'lib/ovirtsdk4/types.rb', line 26415

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


26427
26428
26429
# File 'lib/ovirtsdk4/types.rb', line 26427

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
# File 'lib/ovirtsdk4/types.rb', line 26435

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)


26452
26453
26454
# File 'lib/ovirtsdk4/types.rb', line 26452

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)


26461
26462
26463
# File 'lib/ovirtsdk4/types.rb', line 26461

def wipe_after_delete=(value)
  @wipe_after_delete = value
end