Class: OvirtSDK4::MemoryPolicy
- 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. -
#ballooning ⇒ Boolean
Returns the value of the
ballooning
attribute. -
#ballooning=(value) ⇒ Object
Sets the value of the
ballooning
attribute. -
#guaranteed ⇒ Integer
Returns the value of the
guaranteed
attribute. -
#guaranteed=(value) ⇒ Object
Sets the value of the
guaranteed
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ MemoryPolicy
constructor
Creates a new instance of the MemoryPolicy class.
-
#max ⇒ Integer
Returns the value of the
max
attribute. -
#max=(value) ⇒ Object
Sets the value of the
max
attribute. -
#over_commit ⇒ MemoryOverCommit
Returns the value of the
over_commit
attribute. -
#over_commit=(value) ⇒ Object
Sets the value of the
over_commit
attribute. -
#transparent_huge_pages ⇒ TransparentHugePages
Returns the value of the
transparent_huge_pages
attribute. -
#transparent_huge_pages=(value) ⇒ Object
Sets the value of the
transparent_huge_pages
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ MemoryPolicy
Creates a new instance of the OvirtSDK4::MemoryPolicy class.
9763 9764 9765 9766 9767 9768 9769 9770 |
# File 'lib/ovirtsdk4/types.rb', line 9763 def initialize(opts = {}) super(opts) self.ballooning = opts[:ballooning] self.guaranteed = opts[:guaranteed] self.max = opts[:max] self.over_commit = opts[:over_commit] self.transparent_huge_pages = opts[:transparent_huge_pages] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
9775 9776 9777 9778 9779 9780 9781 9782 |
# File 'lib/ovirtsdk4/types.rb', line 9775 def ==(other) super && @ballooning == other.ballooning && @guaranteed == other.guaranteed && @max == other.max && @over_commit == other.over_commit && @transparent_huge_pages == other.transparent_huge_pages end |
#ballooning ⇒ Boolean
Returns the value of the ballooning
attribute.
9646 9647 9648 |
# File 'lib/ovirtsdk4/types.rb', line 9646 def ballooning @ballooning end |
#ballooning=(value) ⇒ Object
Sets the value of the ballooning
attribute.
9655 9656 9657 |
# File 'lib/ovirtsdk4/types.rb', line 9655 def ballooning=(value) @ballooning = value end |
#guaranteed ⇒ Integer
Returns the value of the guaranteed
attribute.
9664 9665 9666 |
# File 'lib/ovirtsdk4/types.rb', line 9664 def guaranteed @guaranteed end |
#guaranteed=(value) ⇒ Object
Sets the value of the guaranteed
attribute.
9673 9674 9675 |
# File 'lib/ovirtsdk4/types.rb', line 9673 def guaranteed=(value) @guaranteed = value end |
#hash ⇒ Object
Generates a hash value for this object.
9787 9788 9789 9790 9791 9792 9793 9794 |
# File 'lib/ovirtsdk4/types.rb', line 9787 def hash super + @ballooning.hash + @guaranteed.hash + @max.hash + @over_commit.hash + @transparent_huge_pages.hash end |
#max ⇒ Integer
Returns the value of the max
attribute.
9682 9683 9684 |
# File 'lib/ovirtsdk4/types.rb', line 9682 def max @max end |
#max=(value) ⇒ Object
Sets the value of the max
attribute.
9691 9692 9693 |
# File 'lib/ovirtsdk4/types.rb', line 9691 def max=(value) @max = value end |
#over_commit ⇒ MemoryOverCommit
Returns the value of the over_commit
attribute.
9700 9701 9702 |
# File 'lib/ovirtsdk4/types.rb', line 9700 def over_commit @over_commit end |
#over_commit=(value) ⇒ Object
Sets the value of the over_commit
attribute.
The value
parameter can be an instance of OvirtSDK4::MemoryOverCommit 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.
9713 9714 9715 9716 9717 9718 |
# File 'lib/ovirtsdk4/types.rb', line 9713 def over_commit=(value) if value.is_a?(Hash) value = MemoryOverCommit.new(value) end @over_commit = value end |
#transparent_huge_pages ⇒ TransparentHugePages
Returns the value of the transparent_huge_pages
attribute.
9725 9726 9727 |
# File 'lib/ovirtsdk4/types.rb', line 9725 def transparent_huge_pages @transparent_huge_pages end |
#transparent_huge_pages=(value) ⇒ Object
Sets the value of the transparent_huge_pages
attribute.
The value
parameter can be an instance of TransparentHugePages 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.
9738 9739 9740 9741 9742 9743 |
# File 'lib/ovirtsdk4/types.rb', line 9738 def transparent_huge_pages=(value) if value.is_a?(Hash) value = TransparentHugePages.new(value) end @transparent_huge_pages = value end |