Class: OvirtSDK4::DiskAttachment
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::DiskAttachment
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#active ⇒ Boolean
Returns the value of the
active
attribute. -
#active=(value) ⇒ Object
Sets the value of the
active
attribute. -
#bootable ⇒ Boolean
Returns the value of the
bootable
attribute. -
#bootable=(value) ⇒ Object
Sets the value of the
bootable
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disk ⇒ Disk
Returns the value of the
disk
attribute. -
#disk=(value) ⇒ Object
Sets the value of the
disk
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ DiskAttachment
constructor
Creates a new instance of the DiskAttachment class.
-
#interface ⇒ DiskInterface
Returns the value of the
interface
attribute. -
#interface=(value) ⇒ Object
Sets the value of the
interface
attribute. -
#logical_name ⇒ String
Returns the value of the
logical_name
attribute. -
#logical_name=(value) ⇒ Object
Sets the value of the
logical_name
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#pass_discard ⇒ Boolean
Returns the value of the
pass_discard
attribute. -
#pass_discard=(value) ⇒ Object
Sets the value of the
pass_discard
attribute. -
#read_only ⇒ Boolean
Returns the value of the
read_only
attribute. -
#read_only=(value) ⇒ Object
Sets the value of the
read_only
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
attribute. -
#uses_scsi_reservation ⇒ Boolean
Returns the value of the
uses_scsi_reservation
attribute. -
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the
uses_scsi_reservation
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DiskAttachment
Creates a new instance of the OvirtSDK4::DiskAttachment class.
34678 34679 34680 34681 34682 34683 34684 34685 34686 34687 34688 34689 34690 |
# File 'lib/ovirtsdk4/types.rb', line 34678 def initialize(opts = {}) super(opts) self.active = opts[:active] self.bootable = opts[:bootable] self.disk = opts[:disk] self.interface = opts[:interface] self.logical_name = opts[:logical_name] self.pass_discard = opts[:pass_discard] self.read_only = opts[:read_only] self.template = opts[:template] self.uses_scsi_reservation = opts[:uses_scsi_reservation] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
34695 34696 34697 34698 34699 34700 34701 34702 34703 34704 34705 34706 34707 |
# File 'lib/ovirtsdk4/types.rb', line 34695 def ==(other) super && @active == other.active && @bootable == other.bootable && @disk == other.disk && @interface == other.interface && @logical_name == other.logical_name && @pass_discard == other.pass_discard && @read_only == other.read_only && @template == other.template && @uses_scsi_reservation == other.uses_scsi_reservation && @vm == other.vm end |
#active ⇒ Boolean
Returns the value of the active
attribute.
34374 34375 34376 |
# File 'lib/ovirtsdk4/types.rb', line 34374 def active @active end |
#active=(value) ⇒ Object
Sets the value of the active
attribute.
34383 34384 34385 |
# File 'lib/ovirtsdk4/types.rb', line 34383 def active=(value) @active = value end |
#bootable ⇒ Boolean
Returns the value of the bootable
attribute.
34392 34393 34394 |
# File 'lib/ovirtsdk4/types.rb', line 34392 def bootable @bootable end |
#bootable=(value) ⇒ Object
Sets the value of the bootable
attribute.
34401 34402 34403 |
# File 'lib/ovirtsdk4/types.rb', line 34401 def bootable=(value) @bootable = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
34410 34411 34412 |
# File 'lib/ovirtsdk4/types.rb', line 34410 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34419 34420 34421 |
# File 'lib/ovirtsdk4/types.rb', line 34419 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
34428 34429 34430 |
# File 'lib/ovirtsdk4/types.rb', line 34428 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34437 34438 34439 |
# File 'lib/ovirtsdk4/types.rb', line 34437 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
34446 34447 34448 |
# File 'lib/ovirtsdk4/types.rb', line 34446 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.
34459 34460 34461 34462 34463 34464 |
# File 'lib/ovirtsdk4/types.rb', line 34459 def disk=(value) if value.is_a?(Hash) value = Disk.new(value) end @disk = value end |
#hash ⇒ Object
Generates a hash value for this object.
34712 34713 34714 34715 34716 34717 34718 34719 34720 34721 34722 34723 34724 |
# File 'lib/ovirtsdk4/types.rb', line 34712 def hash super + @active.hash + @bootable.hash + @disk.hash + @interface.hash + @logical_name.hash + @pass_discard.hash + @read_only.hash + @template.hash + @uses_scsi_reservation.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
34471 34472 34473 |
# File 'lib/ovirtsdk4/types.rb', line 34471 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34480 34481 34482 |
# File 'lib/ovirtsdk4/types.rb', line 34480 def id=(value) @id = value end |
#interface ⇒ DiskInterface
Returns the value of the interface
attribute.
34489 34490 34491 |
# File 'lib/ovirtsdk4/types.rb', line 34489 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
34498 34499 34500 |
# File 'lib/ovirtsdk4/types.rb', line 34498 def interface=(value) @interface = value end |
#logical_name ⇒ String
Returns the value of the logical_name
attribute.
34507 34508 34509 |
# File 'lib/ovirtsdk4/types.rb', line 34507 def logical_name @logical_name end |
#logical_name=(value) ⇒ Object
Sets the value of the logical_name
attribute.
34516 34517 34518 |
# File 'lib/ovirtsdk4/types.rb', line 34516 def logical_name=(value) @logical_name = value end |
#name ⇒ String
Returns the value of the name
attribute.
34525 34526 34527 |
# File 'lib/ovirtsdk4/types.rb', line 34525 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34534 34535 34536 |
# File 'lib/ovirtsdk4/types.rb', line 34534 def name=(value) @name = value end |
#pass_discard ⇒ Boolean
Returns the value of the pass_discard
attribute.
34543 34544 34545 |
# File 'lib/ovirtsdk4/types.rb', line 34543 def pass_discard @pass_discard end |
#pass_discard=(value) ⇒ Object
Sets the value of the pass_discard
attribute.
34552 34553 34554 |
# File 'lib/ovirtsdk4/types.rb', line 34552 def pass_discard=(value) @pass_discard = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
34561 34562 34563 |
# File 'lib/ovirtsdk4/types.rb', line 34561 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
34570 34571 34572 |
# File 'lib/ovirtsdk4/types.rb', line 34570 def read_only=(value) @read_only = value end |
#template ⇒ Template
Returns the value of the template
attribute.
34579 34580 34581 |
# File 'lib/ovirtsdk4/types.rb', line 34579 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.
34592 34593 34594 34595 34596 34597 |
# File 'lib/ovirtsdk4/types.rb', line 34592 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
#uses_scsi_reservation ⇒ Boolean
Returns the value of the uses_scsi_reservation
attribute.
34604 34605 34606 |
# File 'lib/ovirtsdk4/types.rb', line 34604 def uses_scsi_reservation @uses_scsi_reservation end |
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the uses_scsi_reservation
attribute.
34613 34614 34615 |
# File 'lib/ovirtsdk4/types.rb', line 34613 def uses_scsi_reservation=(value) @uses_scsi_reservation = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
34622 34623 34624 |
# File 'lib/ovirtsdk4/types.rb', line 34622 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.
34635 34636 34637 34638 34639 34640 |
# File 'lib/ovirtsdk4/types.rb', line 34635 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |