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.
36629 36630 36631 36632 36633 36634 36635 36636 36637 36638 36639 36640 36641 |
# File 'lib/ovirtsdk4/types.rb', line 36629 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.
36646 36647 36648 36649 36650 36651 36652 36653 36654 36655 36656 36657 36658 |
# File 'lib/ovirtsdk4/types.rb', line 36646 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.
36325 36326 36327 |
# File 'lib/ovirtsdk4/types.rb', line 36325 def active @active end |
#active=(value) ⇒ Object
Sets the value of the active
attribute.
36334 36335 36336 |
# File 'lib/ovirtsdk4/types.rb', line 36334 def active=(value) @active = value end |
#bootable ⇒ Boolean
Returns the value of the bootable
attribute.
36343 36344 36345 |
# File 'lib/ovirtsdk4/types.rb', line 36343 def bootable @bootable end |
#bootable=(value) ⇒ Object
Sets the value of the bootable
attribute.
36352 36353 36354 |
# File 'lib/ovirtsdk4/types.rb', line 36352 def bootable=(value) @bootable = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
36361 36362 36363 |
# File 'lib/ovirtsdk4/types.rb', line 36361 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
36370 36371 36372 |
# File 'lib/ovirtsdk4/types.rb', line 36370 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
36379 36380 36381 |
# File 'lib/ovirtsdk4/types.rb', line 36379 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
36388 36389 36390 |
# File 'lib/ovirtsdk4/types.rb', line 36388 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
36397 36398 36399 |
# File 'lib/ovirtsdk4/types.rb', line 36397 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.
36410 36411 36412 36413 36414 36415 |
# File 'lib/ovirtsdk4/types.rb', line 36410 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.
36663 36664 36665 36666 36667 36668 36669 36670 36671 36672 36673 36674 36675 |
# File 'lib/ovirtsdk4/types.rb', line 36663 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.
36422 36423 36424 |
# File 'lib/ovirtsdk4/types.rb', line 36422 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
36431 36432 36433 |
# File 'lib/ovirtsdk4/types.rb', line 36431 def id=(value) @id = value end |
#interface ⇒ DiskInterface
Returns the value of the interface
attribute.
36440 36441 36442 |
# File 'lib/ovirtsdk4/types.rb', line 36440 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
36449 36450 36451 |
# File 'lib/ovirtsdk4/types.rb', line 36449 def interface=(value) @interface = value end |
#logical_name ⇒ String
Returns the value of the logical_name
attribute.
36458 36459 36460 |
# File 'lib/ovirtsdk4/types.rb', line 36458 def logical_name @logical_name end |
#logical_name=(value) ⇒ Object
Sets the value of the logical_name
attribute.
36467 36468 36469 |
# File 'lib/ovirtsdk4/types.rb', line 36467 def logical_name=(value) @logical_name = value end |
#name ⇒ String
Returns the value of the name
attribute.
36476 36477 36478 |
# File 'lib/ovirtsdk4/types.rb', line 36476 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
36485 36486 36487 |
# File 'lib/ovirtsdk4/types.rb', line 36485 def name=(value) @name = value end |
#pass_discard ⇒ Boolean
Returns the value of the pass_discard
attribute.
36494 36495 36496 |
# File 'lib/ovirtsdk4/types.rb', line 36494 def pass_discard @pass_discard end |
#pass_discard=(value) ⇒ Object
Sets the value of the pass_discard
attribute.
36503 36504 36505 |
# File 'lib/ovirtsdk4/types.rb', line 36503 def pass_discard=(value) @pass_discard = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
36512 36513 36514 |
# File 'lib/ovirtsdk4/types.rb', line 36512 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
36521 36522 36523 |
# File 'lib/ovirtsdk4/types.rb', line 36521 def read_only=(value) @read_only = value end |
#template ⇒ Template
Returns the value of the template
attribute.
36530 36531 36532 |
# File 'lib/ovirtsdk4/types.rb', line 36530 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.
36543 36544 36545 36546 36547 36548 |
# File 'lib/ovirtsdk4/types.rb', line 36543 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.
36555 36556 36557 |
# File 'lib/ovirtsdk4/types.rb', line 36555 def uses_scsi_reservation @uses_scsi_reservation end |
#uses_scsi_reservation=(value) ⇒ Object
Sets the value of the uses_scsi_reservation
attribute.
36564 36565 36566 |
# File 'lib/ovirtsdk4/types.rb', line 36564 def uses_scsi_reservation=(value) @uses_scsi_reservation = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
36573 36574 36575 |
# File 'lib/ovirtsdk4/types.rb', line 36573 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.
36586 36587 36588 36589 36590 36591 |
# File 'lib/ovirtsdk4/types.rb', line 36586 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |