Class: OvirtSDK4::NumaNode
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::NumaNode
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#cpu ⇒ Cpu
Returns the value of the
cpu
attribute. -
#cpu=(value) ⇒ Object
Sets the value of the
cpu
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
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. -
#index ⇒ Integer
Returns the value of the
index
attribute. -
#index=(value) ⇒ Object
Sets the value of the
index
attribute. -
#initialize(opts = {}) ⇒ NumaNode
constructor
Creates a new instance of the NumaNode class.
-
#memory ⇒ Integer
Returns the value of the
memory
attribute. -
#memory=(value) ⇒ Object
Sets the value of the
memory
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#node_distance ⇒ String
Returns the value of the
node_distance
attribute. -
#node_distance=(value) ⇒ Object
Sets the value of the
node_distance
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NumaNode
Creates a new instance of the OvirtSDK4::NumaNode class.
11863 11864 11865 11866 11867 11868 11869 11870 11871 |
# File 'lib/ovirtsdk4/types.rb', line 11863 def initialize(opts = {}) super(opts) self.cpu = opts[:cpu] self.host = opts[:host] self.index = opts[:index] self.memory = opts[:memory] self.node_distance = opts[:node_distance] self.statistics = opts[:statistics] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
11876 11877 11878 11879 11880 11881 11882 11883 11884 |
# File 'lib/ovirtsdk4/types.rb', line 11876 def ==(other) super && @cpu == other.cpu && @host == other.host && @index == other.index && @memory == other.memory && @node_distance == other.node_distance && @statistics == other.statistics end |
#comment ⇒ String
Returns the value of the comment
attribute.
11638 11639 11640 |
# File 'lib/ovirtsdk4/types.rb', line 11638 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
11647 11648 11649 |
# File 'lib/ovirtsdk4/types.rb', line 11647 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
11656 11657 11658 |
# File 'lib/ovirtsdk4/types.rb', line 11656 def cpu @cpu end |
#cpu=(value) ⇒ Object
Sets the value of the cpu
attribute.
The value
parameter can be an instance of Cpu 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.
11669 11670 11671 11672 11673 11674 |
# File 'lib/ovirtsdk4/types.rb', line 11669 def cpu=(value) if value.is_a?(Hash) value = Cpu.new(value) end @cpu = value end |
#description ⇒ String
Returns the value of the description
attribute.
11681 11682 11683 |
# File 'lib/ovirtsdk4/types.rb', line 11681 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
11690 11691 11692 |
# File 'lib/ovirtsdk4/types.rb', line 11690 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
11889 11890 11891 11892 11893 11894 11895 11896 11897 |
# File 'lib/ovirtsdk4/types.rb', line 11889 def hash super + @cpu.hash + @host.hash + @index.hash + @memory.hash + @node_distance.hash + @statistics.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
11699 11700 11701 |
# File 'lib/ovirtsdk4/types.rb', line 11699 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of 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.
11712 11713 11714 11715 11716 11717 |
# File 'lib/ovirtsdk4/types.rb', line 11712 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.
11724 11725 11726 |
# File 'lib/ovirtsdk4/types.rb', line 11724 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
11733 11734 11735 |
# File 'lib/ovirtsdk4/types.rb', line 11733 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
11742 11743 11744 |
# File 'lib/ovirtsdk4/types.rb', line 11742 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
11751 11752 11753 |
# File 'lib/ovirtsdk4/types.rb', line 11751 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
11760 11761 11762 |
# File 'lib/ovirtsdk4/types.rb', line 11760 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
11769 11770 11771 |
# File 'lib/ovirtsdk4/types.rb', line 11769 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
11778 11779 11780 |
# File 'lib/ovirtsdk4/types.rb', line 11778 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
11787 11788 11789 |
# File 'lib/ovirtsdk4/types.rb', line 11787 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
11796 11797 11798 |
# File 'lib/ovirtsdk4/types.rb', line 11796 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
11805 11806 11807 |
# File 'lib/ovirtsdk4/types.rb', line 11805 def node_distance=(value) @node_distance = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
11814 11815 11816 |
# File 'lib/ovirtsdk4/types.rb', line 11814 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 |
# File 'lib/ovirtsdk4/types.rb', line 11823 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end |