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.
37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 |
# File 'lib/ovirtsdk4/types.rb', line 37484 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.
37501 37502 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513 |
# File 'lib/ovirtsdk4/types.rb', line 37501 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.
37180 37181 37182 |
# File 'lib/ovirtsdk4/types.rb', line 37180 def active @active end |
#active=(value) ⇒ Object
Sets the value of the active
attribute.
37189 37190 37191 |
# File 'lib/ovirtsdk4/types.rb', line 37189 def active=(value) @active = value end |
#bootable ⇒ Boolean
Returns the value of the bootable
attribute.
37198 37199 37200 |
# File 'lib/ovirtsdk4/types.rb', line 37198 def bootable @bootable end |
#bootable=(value) ⇒ Object
Sets the value of the bootable
attribute.
37207 37208 37209 |
# File 'lib/ovirtsdk4/types.rb', line 37207 def bootable=(value) @bootable = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
37216 37217 37218 |
# File 'lib/ovirtsdk4/types.rb', line 37216 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
37225 37226 37227 |
# File 'lib/ovirtsdk4/types.rb', line 37225 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
37234 37235 37236 |
# File 'lib/ovirtsdk4/types.rb', line 37234 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
37243 37244 37245 |
# File 'lib/ovirtsdk4/types.rb', line 37243 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
37252 37253 37254 |
# File 'lib/ovirtsdk4/types.rb', line 37252 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.
37265 37266 37267 37268 37269 37270 |
# File 'lib/ovirtsdk4/types.rb', line 37265 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.
37518 37519 37520 37521 37522 37523 37524 37525 37526 37527 37528 37529 37530 |
# File 'lib/ovirtsdk4/types.rb', line 37518 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.
37277 37278 37279 |
# File 'lib/ovirtsdk4/types.rb', line 37277 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
37286 37287 37288 |
# File 'lib/ovirtsdk4/types.rb', line 37286 def id=(value) @id = value end |
#interface ⇒ DiskInterface
Returns the value of the interface
attribute.
37295 37296 37297 |
# File 'lib/ovirtsdk4/types.rb', line 37295 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
37304 37305 37306 |
# File 'lib/ovirtsdk4/types.rb', line 37304 def interface=(value) @interface = value end |
#logical_name ⇒ String
Returns the value of the logical_name
attribute.
37313 37314 37315 |
# File 'lib/ovirtsdk4/types.rb', line 37313 def logical_name @logical_name end |
#logical_name=(value) ⇒ Object
Sets the value of the logical_name
attribute.
37322 37323 37324 |
# File 'lib/ovirtsdk4/types.rb', line 37322 def logical_name=(value) @logical_name = value end |
#name ⇒ String
Returns the value of the name
attribute.
37331 37332 37333 |
# File 'lib/ovirtsdk4/types.rb', line 37331 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
37340 37341 37342 |
# File 'lib/ovirtsdk4/types.rb', line 37340 def name=(value) @name = value end |
#pass_discard ⇒ Boolean
Returns the value of the pass_discard
attribute.
37349 37350 37351 |
# File 'lib/ovirtsdk4/types.rb', line 37349 def pass_discard @pass_discard end |
#pass_discard=(value) ⇒ Object
Sets the value of the pass_discard
attribute.
37358 37359 37360 |
# File 'lib/ovirtsdk4/types.rb', line 37358 def pass_discard=(value) @pass_discard = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
37367 37368 37369 |
# File 'lib/ovirtsdk4/types.rb', line 37367 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
37376 37377 37378 |
# File 'lib/ovirtsdk4/types.rb', line 37376 def read_only=(value) @read_only = value end |
#template ⇒ Template
Returns the value of the template
attribute.
37385 37386 37387 |
# File 'lib/ovirtsdk4/types.rb', line 37385 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.
37398 37399 37400 37401 37402 37403 |
# File 'lib/ovirtsdk4/types.rb', line 37398 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.
37410 37411 37412 |
# File 'lib/ovirtsdk4/types.rb', line 37410 def uses_scsi_reservation @uses_scsi_reservation end |
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the uses_scsi_reservation
attribute.
37419 37420 37421 |
# File 'lib/ovirtsdk4/types.rb', line 37419 def uses_scsi_reservation=(value) @uses_scsi_reservation = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
37428 37429 37430 |
# File 'lib/ovirtsdk4/types.rb', line 37428 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.
37441 37442 37443 37444 37445 37446 |
# File 'lib/ovirtsdk4/types.rb', line 37441 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |