Class: OvirtSDK4::Cpu
- Inherits:
-
Struct
- Object
- Struct
- OvirtSDK4::Cpu
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary (collapse)
-
- (Architecture) architecture
Returns the value of the
architecture
attribute. -
- (Object) architecture=(value)
Sets the value of the
architecture
attribute. -
- (Array<Core>) cores
Returns the value of the
cores
attribute. -
- (Object) cores=(list)
Sets the value of the
cores
attribute. -
- (CpuTune) cpu_tune
Returns the value of the
cpu_tune
attribute. -
- (Object) cpu_tune=(value)
Sets the value of the
cpu_tune
attribute. -
- (Cpu) initialize(opts = {})
constructor
Creates a new instance of the Cpu class.
-
- (Integer) level
Returns the value of the
level
attribute. -
- (Object) level=(value)
Sets the value of the
level
attribute. -
- (CpuMode) mode
Returns the value of the
mode
attribute. -
- (Object) mode=(value)
Sets the value of the
mode
attribute. -
- (String) name
Returns the value of the
name
attribute. -
- (Object) name=(value)
Sets the value of the
name
attribute. -
- (Fixnum) speed
Returns the value of the
speed
attribute. -
- (Object) speed=(value)
Sets the value of the
speed
attribute. -
- (CpuTopology) topology
Returns the value of the
topology
attribute. -
- (Object) topology=(value)
Sets the value of the
topology
attribute. -
- (String) type
Returns the value of the
type
attribute. -
- (Object) type=(value)
Sets the value of the
type
attribute.
Methods included from Type
Constructor Details
- (Cpu) initialize(opts = {})
Creates a new instance of the OvirtSDK4::Cpu class.
1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 |
# File 'lib/ovirtsdk4/types.rb', line 1837 def initialize(opts = {}) super(opts) self.architecture = opts[:architecture] self.cores = opts[:cores] self.cpu_tune = opts[:cpu_tune] self.level = opts[:level] self.mode = opts[:mode] self.name = opts[:name] self.speed = opts[:speed] self.topology = opts[:topology] self.type = opts[:type] end |
Instance Method Details
- (Architecture) architecture
Returns the value of the architecture
attribute.
1633 1634 1635 |
# File 'lib/ovirtsdk4/types.rb', line 1633 def architecture return @architecture end |
- (Object) architecture=(value)
Sets the value of the architecture
attribute.
1642 1643 1644 |
# File 'lib/ovirtsdk4/types.rb', line 1642 def architecture=(value) @architecture = value end |
- (Array<Core>) cores
Returns the value of the cores
attribute.
1651 1652 1653 |
# File 'lib/ovirtsdk4/types.rb', line 1651 def cores return @cores end |
- (Object) cores=(list)
Sets the value of the cores
attribute.
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 |
# File 'lib/ovirtsdk4/types.rb', line 1659 def cores=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Core.new(value) end end end @cores = list end |
- (CpuTune) cpu_tune
Returns the value of the cpu_tune
attribute.
1676 1677 1678 |
# File 'lib/ovirtsdk4/types.rb', line 1676 def cpu_tune return @cpu_tune end |
- (Object) cpu_tune=(value)
Sets the value of the cpu_tune
attribute.
The value
parameter can be an instance of OvirtSDK4::CpuTune 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.
1689 1690 1691 1692 1693 1694 |
# File 'lib/ovirtsdk4/types.rb', line 1689 def cpu_tune=(value) if value.is_a?(Hash) value = CpuTune.new(value) end @cpu_tune = value end |
- (Integer) level
Returns the value of the level
attribute.
1701 1702 1703 |
# File 'lib/ovirtsdk4/types.rb', line 1701 def level return @level end |
- (Object) level=(value)
Sets the value of the level
attribute.
1710 1711 1712 |
# File 'lib/ovirtsdk4/types.rb', line 1710 def level=(value) @level = value end |
- (CpuMode) mode
Returns the value of the mode
attribute.
1719 1720 1721 |
# File 'lib/ovirtsdk4/types.rb', line 1719 def mode return @mode end |
- (Object) mode=(value)
Sets the value of the mode
attribute.
1728 1729 1730 |
# File 'lib/ovirtsdk4/types.rb', line 1728 def mode=(value) @mode = value end |
- (String) name
Returns the value of the name
attribute.
1737 1738 1739 |
# File 'lib/ovirtsdk4/types.rb', line 1737 def name return @name end |
- (Object) name=(value)
Sets the value of the name
attribute.
1746 1747 1748 |
# File 'lib/ovirtsdk4/types.rb', line 1746 def name=(value) @name = value end |
- (Fixnum) speed
Returns the value of the speed
attribute.
1755 1756 1757 |
# File 'lib/ovirtsdk4/types.rb', line 1755 def speed return @speed end |
- (Object) speed=(value)
Sets the value of the speed
attribute.
1764 1765 1766 |
# File 'lib/ovirtsdk4/types.rb', line 1764 def speed=(value) @speed = value end |
- (CpuTopology) topology
Returns the value of the topology
attribute.
1773 1774 1775 |
# File 'lib/ovirtsdk4/types.rb', line 1773 def topology return @topology end |
- (Object) topology=(value)
Sets the value of the topology
attribute.
The value
parameter can be an instance of OvirtSDK4::CpuTopology 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.
1786 1787 1788 1789 1790 1791 |
# File 'lib/ovirtsdk4/types.rb', line 1786 def topology=(value) if value.is_a?(Hash) value = CpuTopology.new(value) end @topology = value end |
- (String) type
Returns the value of the type
attribute.
1798 1799 1800 |
# File 'lib/ovirtsdk4/types.rb', line 1798 def type return @type end |
- (Object) type=(value)
Sets the value of the type
attribute.
1807 1808 1809 |
# File 'lib/ovirtsdk4/types.rb', line 1807 def type=(value) @type = value end |