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.
9359 9360 9361 9362 9363 9364 9365 9366 |
# File 'lib/ovirtsdk4/types.rb', line 9359 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.
9371 9372 9373 9374 9375 9376 9377 9378 |
# File 'lib/ovirtsdk4/types.rb', line 9371 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.
9242 9243 9244 |
# File 'lib/ovirtsdk4/types.rb', line 9242 def ballooning @ballooning end |
#ballooning=(value) ⇒ Object
Sets the value of the ballooning
attribute.
9251 9252 9253 |
# File 'lib/ovirtsdk4/types.rb', line 9251 def ballooning=(value) @ballooning = value end |
#guaranteed ⇒ Integer
Returns the value of the guaranteed
attribute.
9260 9261 9262 |
# File 'lib/ovirtsdk4/types.rb', line 9260 def guaranteed @guaranteed end |
#guaranteed=(value) ⇒ Object
Sets the value of the guaranteed
attribute.
9269 9270 9271 |
# File 'lib/ovirtsdk4/types.rb', line 9269 def guaranteed=(value) @guaranteed = value end |
#hash ⇒ Object
Generates a hash value for this object.
9383 9384 9385 9386 9387 9388 9389 9390 |
# File 'lib/ovirtsdk4/types.rb', line 9383 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.
9278 9279 9280 |
# File 'lib/ovirtsdk4/types.rb', line 9278 def max @max end |
#max=(value) ⇒ Object
Sets the value of the max
attribute.
9287 9288 9289 |
# File 'lib/ovirtsdk4/types.rb', line 9287 def max=(value) @max = value end |
#over_commit ⇒ MemoryOverCommit
Returns the value of the over_commit
attribute.
9296 9297 9298 |
# File 'lib/ovirtsdk4/types.rb', line 9296 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.
9309 9310 9311 9312 9313 9314 |
# File 'lib/ovirtsdk4/types.rb', line 9309 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.
9321 9322 9323 |
# File 'lib/ovirtsdk4/types.rb', line 9321 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.
9334 9335 9336 9337 9338 9339 |
# File 'lib/ovirtsdk4/types.rb', line 9334 def transparent_huge_pages=(value) if value.is_a?(Hash) value = TransparentHugePages.new(value) end @transparent_huge_pages = value end |