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.
34860 34861 34862 34863 34864 34865 34866 34867 34868 34869 34870 34871 34872 |
# File 'lib/ovirtsdk4/types.rb', line 34860 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.
34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 34887 34888 34889 |
# File 'lib/ovirtsdk4/types.rb', line 34877 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.
34556 34557 34558 |
# File 'lib/ovirtsdk4/types.rb', line 34556 def active @active end |
#active=(value) ⇒ Object
Sets the value of the active
attribute.
34565 34566 34567 |
# File 'lib/ovirtsdk4/types.rb', line 34565 def active=(value) @active = value end |
#bootable ⇒ Boolean
Returns the value of the bootable
attribute.
34574 34575 34576 |
# File 'lib/ovirtsdk4/types.rb', line 34574 def bootable @bootable end |
#bootable=(value) ⇒ Object
Sets the value of the bootable
attribute.
34583 34584 34585 |
# File 'lib/ovirtsdk4/types.rb', line 34583 def bootable=(value) @bootable = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
34592 34593 34594 |
# File 'lib/ovirtsdk4/types.rb', line 34592 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34601 34602 34603 |
# File 'lib/ovirtsdk4/types.rb', line 34601 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
34610 34611 34612 |
# File 'lib/ovirtsdk4/types.rb', line 34610 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34619 34620 34621 |
# File 'lib/ovirtsdk4/types.rb', line 34619 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
34628 34629 34630 |
# File 'lib/ovirtsdk4/types.rb', line 34628 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.
34641 34642 34643 34644 34645 34646 |
# File 'lib/ovirtsdk4/types.rb', line 34641 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.
34894 34895 34896 34897 34898 34899 34900 34901 34902 34903 34904 34905 34906 |
# File 'lib/ovirtsdk4/types.rb', line 34894 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.
34653 34654 34655 |
# File 'lib/ovirtsdk4/types.rb', line 34653 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34662 34663 34664 |
# File 'lib/ovirtsdk4/types.rb', line 34662 def id=(value) @id = value end |
#interface ⇒ DiskInterface
Returns the value of the interface
attribute.
34671 34672 34673 |
# File 'lib/ovirtsdk4/types.rb', line 34671 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
34680 34681 34682 |
# File 'lib/ovirtsdk4/types.rb', line 34680 def interface=(value) @interface = value end |
#logical_name ⇒ String
Returns the value of the logical_name
attribute.
34689 34690 34691 |
# File 'lib/ovirtsdk4/types.rb', line 34689 def logical_name @logical_name end |
#logical_name=(value) ⇒ Object
Sets the value of the logical_name
attribute.
34698 34699 34700 |
# File 'lib/ovirtsdk4/types.rb', line 34698 def logical_name=(value) @logical_name = value end |
#name ⇒ String
Returns the value of the name
attribute.
34707 34708 34709 |
# File 'lib/ovirtsdk4/types.rb', line 34707 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34716 34717 34718 |
# File 'lib/ovirtsdk4/types.rb', line 34716 def name=(value) @name = value end |
#pass_discard ⇒ Boolean
Returns the value of the pass_discard
attribute.
34725 34726 34727 |
# File 'lib/ovirtsdk4/types.rb', line 34725 def pass_discard @pass_discard end |
#pass_discard=(value) ⇒ Object
Sets the value of the pass_discard
attribute.
34734 34735 34736 |
# File 'lib/ovirtsdk4/types.rb', line 34734 def pass_discard=(value) @pass_discard = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
34743 34744 34745 |
# File 'lib/ovirtsdk4/types.rb', line 34743 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
34752 34753 34754 |
# File 'lib/ovirtsdk4/types.rb', line 34752 def read_only=(value) @read_only = value end |
#template ⇒ Template
Returns the value of the template
attribute.
34761 34762 34763 |
# File 'lib/ovirtsdk4/types.rb', line 34761 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.
34774 34775 34776 34777 34778 34779 |
# File 'lib/ovirtsdk4/types.rb', line 34774 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.
34786 34787 34788 |
# File 'lib/ovirtsdk4/types.rb', line 34786 def uses_scsi_reservation @uses_scsi_reservation end |
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the uses_scsi_reservation
attribute.
34795 34796 34797 |
# File 'lib/ovirtsdk4/types.rb', line 34795 def uses_scsi_reservation=(value) @uses_scsi_reservation = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
34804 34805 34806 |
# File 'lib/ovirtsdk4/types.rb', line 34804 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.
34817 34818 34819 34820 34821 34822 |
# File 'lib/ovirtsdk4/types.rb', line 34817 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |