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.
45270 45271 45272 45273 45274 45275 45276 45277 45278 45279 45280 45281 45282 45283 45284 |
# File 'lib/ovirtsdk4/types.rb', line 45270 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.
45289 45290 45291 45292 45293 45294 45295 45296 45297 45298 45299 45300 45301 45302 45303 |
# File 'lib/ovirtsdk4/types.rb', line 45289 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.
44897 44898 44899 |
# File 'lib/ovirtsdk4/types.rb', line 44897 def capability @capability end |
#capability=(value) ⇒ Object
Sets the value of the capability
attribute.
44906 44907 44908 |
# File 'lib/ovirtsdk4/types.rb', line 44906 def capability=(value) @capability = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
44915 44916 44917 |
# File 'lib/ovirtsdk4/types.rb', line 44915 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
44924 44925 44926 |
# File 'lib/ovirtsdk4/types.rb', line 44924 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
44933 44934 44935 |
# File 'lib/ovirtsdk4/types.rb', line 44933 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
44942 44943 44944 |
# File 'lib/ovirtsdk4/types.rb', line 44942 def description=(value) @description = value end |
#driver ⇒ String
Returns the value of the driver
attribute.
44951 44952 44953 |
# File 'lib/ovirtsdk4/types.rb', line 44951 def driver @driver end |
#driver=(value) ⇒ Object
Sets the value of the driver
attribute.
44960 44961 44962 |
# File 'lib/ovirtsdk4/types.rb', line 44960 def driver=(value) @driver = value end |
#hash ⇒ Object
Generates a hash value for this object.
45308 45309 45310 45311 45312 45313 45314 45315 45316 45317 45318 45319 45320 45321 45322 |
# File 'lib/ovirtsdk4/types.rb', line 45308 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.
44969 44970 44971 |
# File 'lib/ovirtsdk4/types.rb', line 44969 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.
44982 44983 44984 44985 44986 44987 |
# File 'lib/ovirtsdk4/types.rb', line 44982 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.
44994 44995 44996 |
# File 'lib/ovirtsdk4/types.rb', line 44994 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
45003 45004 45005 |
# File 'lib/ovirtsdk4/types.rb', line 45003 def id=(value) @id = value end |
#iommu_group ⇒ Integer
Returns the value of the iommu_group
attribute.
45012 45013 45014 |
# File 'lib/ovirtsdk4/types.rb', line 45012 def iommu_group @iommu_group end |
#iommu_group=(value) ⇒ Object
Sets the value of the iommu_group
attribute.
45021 45022 45023 |
# File 'lib/ovirtsdk4/types.rb', line 45021 def iommu_group=(value) @iommu_group = value end |
#m_dev_types ⇒ Array<MDevType>
Returns the value of the m_dev_types
attribute.
45030 45031 45032 |
# File 'lib/ovirtsdk4/types.rb', line 45030 def m_dev_types @m_dev_types end |
#m_dev_types=(list) ⇒ Object
Sets the value of the m_dev_types
attribute.
45039 45040 45041 45042 45043 45044 45045 45046 45047 45048 45049 |
# File 'lib/ovirtsdk4/types.rb', line 45039 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.
45056 45057 45058 |
# File 'lib/ovirtsdk4/types.rb', line 45056 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
45065 45066 45067 |
# File 'lib/ovirtsdk4/types.rb', line 45065 def name=(value) @name = value end |
#parent_device ⇒ HostDevice
Returns the value of the parent_device
attribute.
45074 45075 45076 |
# File 'lib/ovirtsdk4/types.rb', line 45074 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.
45087 45088 45089 45090 45091 45092 |
# File 'lib/ovirtsdk4/types.rb', line 45087 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.
45099 45100 45101 |
# File 'lib/ovirtsdk4/types.rb', line 45099 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.
45112 45113 45114 45115 45116 45117 |
# File 'lib/ovirtsdk4/types.rb', line 45112 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.
45124 45125 45126 |
# File 'lib/ovirtsdk4/types.rb', line 45124 def placeholder @placeholder end |
#placeholder=(value) ⇒ Object
Sets the value of the placeholder
attribute.
45133 45134 45135 |
# File 'lib/ovirtsdk4/types.rb', line 45133 def placeholder=(value) @placeholder = value end |
#product ⇒ Product
Returns the value of the product
attribute.
45142 45143 45144 |
# File 'lib/ovirtsdk4/types.rb', line 45142 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.
45155 45156 45157 45158 45159 45160 |
# File 'lib/ovirtsdk4/types.rb', line 45155 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.
45167 45168 45169 |
# File 'lib/ovirtsdk4/types.rb', line 45167 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.
45180 45181 45182 45183 45184 45185 |
# File 'lib/ovirtsdk4/types.rb', line 45180 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.
45192 45193 45194 |
# File 'lib/ovirtsdk4/types.rb', line 45192 def virtual_functions @virtual_functions end |
#virtual_functions=(value) ⇒ Object
Sets the value of the virtual_functions
attribute.
45201 45202 45203 |
# File 'lib/ovirtsdk4/types.rb', line 45201 def virtual_functions=(value) @virtual_functions = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
45210 45211 45212 |
# File 'lib/ovirtsdk4/types.rb', line 45210 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.
45223 45224 45225 45226 45227 45228 |
# File 'lib/ovirtsdk4/types.rb', line 45223 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |