Class: OvirtSDK4::HostDevice
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::HostDevice
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#capability ⇒ String
Returns the value of the
capabilityattribute. -
#capability=(value) ⇒ Object
Sets the value of the
capabilityattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#driver ⇒ String
Returns the value of the
driverattribute. -
#driver=(value) ⇒ Object
Sets the value of the
driverattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ HostDevice
constructor
Creates a new instance of the HostDevice class.
-
#iommu_group ⇒ Integer
Returns the value of the
iommu_groupattribute. -
#iommu_group=(value) ⇒ Object
Sets the value of the
iommu_groupattribute. -
#m_dev_types ⇒ Array<MDevType>
Returns the value of the
m_dev_typesattribute. -
#m_dev_types=(list) ⇒ Object
Sets the value of the
m_dev_typesattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#parent_device ⇒ HostDevice
Returns the value of the
parent_deviceattribute. -
#parent_device=(value) ⇒ Object
Sets the value of the
parent_deviceattribute. -
#physical_function ⇒ HostDevice
Returns the value of the
physical_functionattribute. -
#physical_function=(value) ⇒ Object
Sets the value of the
physical_functionattribute. -
#placeholder ⇒ Boolean
Returns the value of the
placeholderattribute. -
#placeholder=(value) ⇒ Object
Sets the value of the
placeholderattribute. -
#product ⇒ Product
Returns the value of the
productattribute. -
#product=(value) ⇒ Object
Sets the value of the
productattribute. -
#vendor ⇒ Vendor
Returns the value of the
vendorattribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendorattribute. -
#virtual_functions ⇒ Integer
Returns the value of the
virtual_functionsattribute. -
#virtual_functions=(value) ⇒ Object
Sets the value of the
virtual_functionsattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ HostDevice
Creates a new instance of the OvirtSDK4::HostDevice class.
46705 46706 46707 46708 46709 46710 46711 46712 46713 46714 46715 46716 46717 46718 46719 |
# File 'lib/ovirtsdk4/types.rb', line 46705 def initialize(opts = {}) super(opts) self.capability = opts[:capability] self.driver = opts[:driver] self.host = opts[:host] self.iommu_group = opts[:iommu_group] self.m_dev_types = opts[:m_dev_types] self.parent_device = opts[:parent_device] self.physical_function = opts[:physical_function] self.placeholder = opts[:placeholder] self.product = opts[:product] self.vendor = opts[:vendor] self.virtual_functions = opts[:virtual_functions] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
46724 46725 46726 46727 46728 46729 46730 46731 46732 46733 46734 46735 46736 46737 46738 |
# File 'lib/ovirtsdk4/types.rb', line 46724 def ==(other) super && @capability == other.capability && @driver == other.driver && @host == other.host && @iommu_group == other.iommu_group && @m_dev_types == other.m_dev_types && @parent_device == other.parent_device && @physical_function == other.physical_function && @placeholder == other.placeholder && @product == other.product && @vendor == other.vendor && @virtual_functions == other.virtual_functions && @vm == other.vm end |
#capability ⇒ String
Returns the value of the capability attribute.
46332 46333 46334 |
# File 'lib/ovirtsdk4/types.rb', line 46332 def capability @capability end |
#capability=(value) ⇒ Object
Sets the value of the capability attribute.
46341 46342 46343 |
# File 'lib/ovirtsdk4/types.rb', line 46341 def capability=(value) @capability = value end |
#comment ⇒ String
Returns the value of the comment attribute.
46350 46351 46352 |
# File 'lib/ovirtsdk4/types.rb', line 46350 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
46359 46360 46361 |
# File 'lib/ovirtsdk4/types.rb', line 46359 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
46368 46369 46370 |
# File 'lib/ovirtsdk4/types.rb', line 46368 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
46377 46378 46379 |
# File 'lib/ovirtsdk4/types.rb', line 46377 def description=(value) @description = value end |
#driver ⇒ String
Returns the value of the driver attribute.
46386 46387 46388 |
# File 'lib/ovirtsdk4/types.rb', line 46386 def driver @driver end |
#driver=(value) ⇒ Object
Sets the value of the driver attribute.
46395 46396 46397 |
# File 'lib/ovirtsdk4/types.rb', line 46395 def driver=(value) @driver = value end |
#hash ⇒ Object
Generates a hash value for this object.
46743 46744 46745 46746 46747 46748 46749 46750 46751 46752 46753 46754 46755 46756 46757 |
# File 'lib/ovirtsdk4/types.rb', line 46743 def hash super + @capability.hash + @driver.hash + @host.hash + @iommu_group.hash + @m_dev_types.hash + @parent_device.hash + @physical_function.hash + @placeholder.hash + @product.hash + @vendor.hash + @virtual_functions.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host attribute.
46404 46405 46406 |
# File 'lib/ovirtsdk4/types.rb', line 46404 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host attribute.
The value parameter can be an instance of OvirtSDK4::Host 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.
46417 46418 46419 46420 46421 46422 |
# File 'lib/ovirtsdk4/types.rb', line 46417 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id attribute.
46429 46430 46431 |
# File 'lib/ovirtsdk4/types.rb', line 46429 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
46438 46439 46440 |
# File 'lib/ovirtsdk4/types.rb', line 46438 def id=(value) @id = value end |
#iommu_group ⇒ Integer
Returns the value of the iommu_group attribute.
46447 46448 46449 |
# File 'lib/ovirtsdk4/types.rb', line 46447 def iommu_group @iommu_group end |
#iommu_group=(value) ⇒ Object
Sets the value of the iommu_group attribute.
46456 46457 46458 |
# File 'lib/ovirtsdk4/types.rb', line 46456 def iommu_group=(value) @iommu_group = value end |
#m_dev_types ⇒ Array<MDevType>
Returns the value of the m_dev_types attribute.
46465 46466 46467 |
# File 'lib/ovirtsdk4/types.rb', line 46465 def m_dev_types @m_dev_types end |
#m_dev_types=(list) ⇒ Object
Sets the value of the m_dev_types attribute.
46474 46475 46476 46477 46478 46479 46480 46481 46482 46483 46484 |
# File 'lib/ovirtsdk4/types.rb', line 46474 def m_dev_types=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = MDevType.new(value) end end end @m_dev_types = list end |
#name ⇒ String
Returns the value of the name attribute.
46491 46492 46493 |
# File 'lib/ovirtsdk4/types.rb', line 46491 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
46500 46501 46502 |
# File 'lib/ovirtsdk4/types.rb', line 46500 def name=(value) @name = value end |
#parent_device ⇒ HostDevice
Returns the value of the parent_device attribute.
46509 46510 46511 |
# File 'lib/ovirtsdk4/types.rb', line 46509 def parent_device @parent_device end |
#parent_device=(value) ⇒ Object
Sets the value of the parent_device attribute.
The value parameter can be an instance of OvirtSDK4::HostDevice 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.
46522 46523 46524 46525 46526 46527 |
# File 'lib/ovirtsdk4/types.rb', line 46522 def parent_device=(value) if value.is_a?(Hash) value = HostDevice.new(value) end @parent_device = value end |
#physical_function ⇒ HostDevice
Returns the value of the physical_function attribute.
46534 46535 46536 |
# File 'lib/ovirtsdk4/types.rb', line 46534 def physical_function @physical_function end |
#physical_function=(value) ⇒ Object
Sets the value of the physical_function attribute.
The value parameter can be an instance of OvirtSDK4::HostDevice 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.
46547 46548 46549 46550 46551 46552 |
# File 'lib/ovirtsdk4/types.rb', line 46547 def physical_function=(value) if value.is_a?(Hash) value = HostDevice.new(value) end @physical_function = value end |
#placeholder ⇒ Boolean
Returns the value of the placeholder attribute.
46559 46560 46561 |
# File 'lib/ovirtsdk4/types.rb', line 46559 def placeholder @placeholder end |
#placeholder=(value) ⇒ Object
Sets the value of the placeholder attribute.
46568 46569 46570 |
# File 'lib/ovirtsdk4/types.rb', line 46568 def placeholder=(value) @placeholder = value end |
#product ⇒ Product
Returns the value of the product attribute.
46577 46578 46579 |
# File 'lib/ovirtsdk4/types.rb', line 46577 def product @product end |
#product=(value) ⇒ Object
Sets the value of the product attribute.
The value parameter can be an instance of Product 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.
46590 46591 46592 46593 46594 46595 |
# File 'lib/ovirtsdk4/types.rb', line 46590 def product=(value) if value.is_a?(Hash) value = Product.new(value) end @product = value end |
#vendor ⇒ Vendor
Returns the value of the vendor attribute.
46602 46603 46604 |
# File 'lib/ovirtsdk4/types.rb', line 46602 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor attribute.
The value parameter can be an instance of Vendor 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.
46615 46616 46617 46618 46619 46620 |
# File 'lib/ovirtsdk4/types.rb', line 46615 def vendor=(value) if value.is_a?(Hash) value = Vendor.new(value) end @vendor = value end |
#virtual_functions ⇒ Integer
Returns the value of the virtual_functions attribute.
46627 46628 46629 |
# File 'lib/ovirtsdk4/types.rb', line 46627 def virtual_functions @virtual_functions end |
#virtual_functions=(value) ⇒ Object
Sets the value of the virtual_functions attribute.
46636 46637 46638 |
# File 'lib/ovirtsdk4/types.rb', line 46636 def virtual_functions=(value) @virtual_functions = value end |
#vm ⇒ Vm
Returns the value of the vm attribute.
46645 46646 46647 |
# File 'lib/ovirtsdk4/types.rb', line 46645 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.
46658 46659 46660 46661 46662 46663 |
# File 'lib/ovirtsdk4/types.rb', line 46658 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |