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.
35363 35364 35365 35366 35367 35368 35369 35370 35371 35372 35373 35374 35375 |
# File 'lib/ovirtsdk4/types.rb', line 35363 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.
35380 35381 35382 35383 35384 35385 35386 35387 35388 35389 35390 35391 35392 |
# File 'lib/ovirtsdk4/types.rb', line 35380 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.
35059 35060 35061 |
# File 'lib/ovirtsdk4/types.rb', line 35059 def active @active end |
#active=(value) ⇒ Object
Sets the value of the active
attribute.
35068 35069 35070 |
# File 'lib/ovirtsdk4/types.rb', line 35068 def active=(value) @active = value end |
#bootable ⇒ Boolean
Returns the value of the bootable
attribute.
35077 35078 35079 |
# File 'lib/ovirtsdk4/types.rb', line 35077 def bootable @bootable end |
#bootable=(value) ⇒ Object
Sets the value of the bootable
attribute.
35086 35087 35088 |
# File 'lib/ovirtsdk4/types.rb', line 35086 def bootable=(value) @bootable = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
35095 35096 35097 |
# File 'lib/ovirtsdk4/types.rb', line 35095 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
35104 35105 35106 |
# File 'lib/ovirtsdk4/types.rb', line 35104 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
35113 35114 35115 |
# File 'lib/ovirtsdk4/types.rb', line 35113 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
35122 35123 35124 |
# File 'lib/ovirtsdk4/types.rb', line 35122 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
35131 35132 35133 |
# File 'lib/ovirtsdk4/types.rb', line 35131 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.
35144 35145 35146 35147 35148 35149 |
# File 'lib/ovirtsdk4/types.rb', line 35144 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.
35397 35398 35399 35400 35401 35402 35403 35404 35405 35406 35407 35408 35409 |
# File 'lib/ovirtsdk4/types.rb', line 35397 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.
35156 35157 35158 |
# File 'lib/ovirtsdk4/types.rb', line 35156 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
35165 35166 35167 |
# File 'lib/ovirtsdk4/types.rb', line 35165 def id=(value) @id = value end |
#interface ⇒ DiskInterface
Returns the value of the interface
attribute.
35174 35175 35176 |
# File 'lib/ovirtsdk4/types.rb', line 35174 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
35183 35184 35185 |
# File 'lib/ovirtsdk4/types.rb', line 35183 def interface=(value) @interface = value end |
#logical_name ⇒ String
Returns the value of the logical_name
attribute.
35192 35193 35194 |
# File 'lib/ovirtsdk4/types.rb', line 35192 def logical_name @logical_name end |
#logical_name=(value) ⇒ Object
Sets the value of the logical_name
attribute.
35201 35202 35203 |
# File 'lib/ovirtsdk4/types.rb', line 35201 def logical_name=(value) @logical_name = value end |
#name ⇒ String
Returns the value of the name
attribute.
35210 35211 35212 |
# File 'lib/ovirtsdk4/types.rb', line 35210 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
35219 35220 35221 |
# File 'lib/ovirtsdk4/types.rb', line 35219 def name=(value) @name = value end |
#pass_discard ⇒ Boolean
Returns the value of the pass_discard
attribute.
35228 35229 35230 |
# File 'lib/ovirtsdk4/types.rb', line 35228 def pass_discard @pass_discard end |
#pass_discard=(value) ⇒ Object
Sets the value of the pass_discard
attribute.
35237 35238 35239 |
# File 'lib/ovirtsdk4/types.rb', line 35237 def pass_discard=(value) @pass_discard = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
35246 35247 35248 |
# File 'lib/ovirtsdk4/types.rb', line 35246 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
35255 35256 35257 |
# File 'lib/ovirtsdk4/types.rb', line 35255 def read_only=(value) @read_only = value end |
#template ⇒ Template
Returns the value of the template
attribute.
35264 35265 35266 |
# File 'lib/ovirtsdk4/types.rb', line 35264 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.
35277 35278 35279 35280 35281 35282 |
# File 'lib/ovirtsdk4/types.rb', line 35277 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.
35289 35290 35291 |
# File 'lib/ovirtsdk4/types.rb', line 35289 def uses_scsi_reservation @uses_scsi_reservation end |
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the uses_scsi_reservation
attribute.
35298 35299 35300 |
# File 'lib/ovirtsdk4/types.rb', line 35298 def uses_scsi_reservation=(value) @uses_scsi_reservation = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
35307 35308 35309 |
# File 'lib/ovirtsdk4/types.rb', line 35307 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.
35320 35321 35322 35323 35324 35325 |
# File 'lib/ovirtsdk4/types.rb', line 35320 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |