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
true
ifself
andother
have the same attributes and values. -
#capability ⇒ String
Returns the value of the
capability
attribute. -
#capability=(value) ⇒ Object
Sets the value of the
capability
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. -
#driver ⇒ String
Returns the value of the
driver
attribute. -
#driver=(value) ⇒ Object
Sets the value of the
driver
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ HostDevice
constructor
Creates a new instance of the HostDevice class.
-
#iommu_group ⇒ Integer
Returns the value of the
iommu_group
attribute. -
#iommu_group=(value) ⇒ Object
Sets the value of the
iommu_group
attribute. -
#m_dev_types ⇒ Array<MDevType>
Returns the value of the
m_dev_types
attribute. -
#m_dev_types=(list) ⇒ Object
Sets the value of the
m_dev_types
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#parent_device ⇒ HostDevice
Returns the value of the
parent_device
attribute. -
#parent_device=(value) ⇒ Object
Sets the value of the
parent_device
attribute. -
#physical_function ⇒ HostDevice
Returns the value of the
physical_function
attribute. -
#physical_function=(value) ⇒ Object
Sets the value of the
physical_function
attribute. -
#placeholder ⇒ Boolean
Returns the value of the
placeholder
attribute. -
#placeholder=(value) ⇒ Object
Sets the value of the
placeholder
attribute. -
#product ⇒ Product
Returns the value of the
product
attribute. -
#product=(value) ⇒ Object
Sets the value of the
product
attribute. -
#vendor ⇒ Vendor
Returns the value of the
vendor
attribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendor
attribute. -
#virtual_functions ⇒ Integer
Returns the value of the
virtual_functions
attribute. -
#virtual_functions=(value) ⇒ Object
Sets the value of the
virtual_functions
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 = {}) ⇒ HostDevice
Creates a new instance of the OvirtSDK4::HostDevice class.
46412 46413 46414 46415 46416 46417 46418 46419 46420 46421 46422 46423 46424 46425 46426 |
# File 'lib/ovirtsdk4/types.rb', line 46412 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.
46431 46432 46433 46434 46435 46436 46437 46438 46439 46440 46441 46442 46443 46444 46445 |
# File 'lib/ovirtsdk4/types.rb', line 46431 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.
46039 46040 46041 |
# File 'lib/ovirtsdk4/types.rb', line 46039 def capability @capability end |
#capability=(value) ⇒ Object
Sets the value of the capability
attribute.
46048 46049 46050 |
# File 'lib/ovirtsdk4/types.rb', line 46048 def capability=(value) @capability = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
46057 46058 46059 |
# File 'lib/ovirtsdk4/types.rb', line 46057 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
46066 46067 46068 |
# File 'lib/ovirtsdk4/types.rb', line 46066 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
46075 46076 46077 |
# File 'lib/ovirtsdk4/types.rb', line 46075 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
46084 46085 46086 |
# File 'lib/ovirtsdk4/types.rb', line 46084 def description=(value) @description = value end |
#driver ⇒ String
Returns the value of the driver
attribute.
46093 46094 46095 |
# File 'lib/ovirtsdk4/types.rb', line 46093 def driver @driver end |
#driver=(value) ⇒ Object
Sets the value of the driver
attribute.
46102 46103 46104 |
# File 'lib/ovirtsdk4/types.rb', line 46102 def driver=(value) @driver = value end |
#hash ⇒ Object
Generates a hash value for this object.
46450 46451 46452 46453 46454 46455 46456 46457 46458 46459 46460 46461 46462 46463 46464 |
# File 'lib/ovirtsdk4/types.rb', line 46450 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.
46111 46112 46113 |
# File 'lib/ovirtsdk4/types.rb', line 46111 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.
46124 46125 46126 46127 46128 46129 |
# File 'lib/ovirtsdk4/types.rb', line 46124 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.
46136 46137 46138 |
# File 'lib/ovirtsdk4/types.rb', line 46136 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
46145 46146 46147 |
# File 'lib/ovirtsdk4/types.rb', line 46145 def id=(value) @id = value end |
#iommu_group ⇒ Integer
Returns the value of the iommu_group
attribute.
46154 46155 46156 |
# File 'lib/ovirtsdk4/types.rb', line 46154 def iommu_group @iommu_group end |
#iommu_group=(value) ⇒ Object
Sets the value of the iommu_group
attribute.
46163 46164 46165 |
# File 'lib/ovirtsdk4/types.rb', line 46163 def iommu_group=(value) @iommu_group = value end |
#m_dev_types ⇒ Array<MDevType>
Returns the value of the m_dev_types
attribute.
46172 46173 46174 |
# File 'lib/ovirtsdk4/types.rb', line 46172 def m_dev_types @m_dev_types end |
#m_dev_types=(list) ⇒ Object
Sets the value of the m_dev_types
attribute.
46181 46182 46183 46184 46185 46186 46187 46188 46189 46190 46191 |
# File 'lib/ovirtsdk4/types.rb', line 46181 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.
46198 46199 46200 |
# File 'lib/ovirtsdk4/types.rb', line 46198 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
46207 46208 46209 |
# File 'lib/ovirtsdk4/types.rb', line 46207 def name=(value) @name = value end |
#parent_device ⇒ HostDevice
Returns the value of the parent_device
attribute.
46216 46217 46218 |
# File 'lib/ovirtsdk4/types.rb', line 46216 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.
46229 46230 46231 46232 46233 46234 |
# File 'lib/ovirtsdk4/types.rb', line 46229 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.
46241 46242 46243 |
# File 'lib/ovirtsdk4/types.rb', line 46241 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.
46254 46255 46256 46257 46258 46259 |
# File 'lib/ovirtsdk4/types.rb', line 46254 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.
46266 46267 46268 |
# File 'lib/ovirtsdk4/types.rb', line 46266 def placeholder @placeholder end |
#placeholder=(value) ⇒ Object
Sets the value of the placeholder
attribute.
46275 46276 46277 |
# File 'lib/ovirtsdk4/types.rb', line 46275 def placeholder=(value) @placeholder = value end |
#product ⇒ Product
Returns the value of the product
attribute.
46284 46285 46286 |
# File 'lib/ovirtsdk4/types.rb', line 46284 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.
46297 46298 46299 46300 46301 46302 |
# File 'lib/ovirtsdk4/types.rb', line 46297 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.
46309 46310 46311 |
# File 'lib/ovirtsdk4/types.rb', line 46309 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.
46322 46323 46324 46325 46326 46327 |
# File 'lib/ovirtsdk4/types.rb', line 46322 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.
46334 46335 46336 |
# File 'lib/ovirtsdk4/types.rb', line 46334 def virtual_functions @virtual_functions end |
#virtual_functions=(value) ⇒ Object
Sets the value of the virtual_functions
attribute.
46343 46344 46345 |
# File 'lib/ovirtsdk4/types.rb', line 46343 def virtual_functions=(value) @virtual_functions = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
46352 46353 46354 |
# File 'lib/ovirtsdk4/types.rb', line 46352 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.
46365 46366 46367 46368 46369 46370 |
# File 'lib/ovirtsdk4/types.rb', line 46365 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |