Class: OvirtSDK4::MemoryPolicy

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (MemoryPolicy) initialize(opts = {})

Creates a new instance of the OvirtSDK4::MemoryPolicy class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :ballooning (Boolean)

    The value of attribute ballooning.

  • :guaranteed (Integer)

    The value of attribute guaranteed.

  • :over_commit (MemoryOverCommit, Hash)

    The value of attribute over_commit.

  • :transparent_huge_pages (TransparentHugePages, Hash)

    The value of attribute transparent_huge_pages.



6493
6494
6495
6496
6497
6498
6499
# File 'lib/ovirtsdk4/types.rb', line 6493

def initialize(opts = {})
  super(opts)
  self.ballooning = opts[:ballooning]
  self.guaranteed = opts[:guaranteed]
  self.over_commit = opts[:over_commit]
  self.transparent_huge_pages = opts[:transparent_huge_pages]
end

Instance Method Details

- (Boolean) ballooning

Returns the value of the ballooning attribute.

Returns:

  • (Boolean)


6396
6397
6398
# File 'lib/ovirtsdk4/types.rb', line 6396

def ballooning
  return @ballooning
end

- (Object) ballooning=(value)

Sets the value of the ballooning attribute.

Parameters:

  • value (Boolean)


6405
6406
6407
# File 'lib/ovirtsdk4/types.rb', line 6405

def ballooning=(value)
  @ballooning = value
end

- (Integer) guaranteed

Returns the value of the guaranteed attribute.

Returns:

  • (Integer)


6414
6415
6416
# File 'lib/ovirtsdk4/types.rb', line 6414

def guaranteed
  return @guaranteed
end

- (Object) guaranteed=(value)

Sets the value of the guaranteed attribute.

Parameters:

  • value (Integer)


6423
6424
6425
# File 'lib/ovirtsdk4/types.rb', line 6423

def guaranteed=(value)
  @guaranteed = value
end

- (MemoryOverCommit) over_commit

Returns the value of the over_commit attribute.

Returns:



6432
6433
6434
# File 'lib/ovirtsdk4/types.rb', line 6432

def over_commit
  return @over_commit
end

- (Object) over_commit=(value)

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.

Parameters:



6445
6446
6447
6448
6449
6450
# File 'lib/ovirtsdk4/types.rb', line 6445

def over_commit=(value)
  if value.is_a?(Hash)
    value = MemoryOverCommit.new(value)
  end
  @over_commit = value
end

- (TransparentHugePages) transparent_huge_pages

Returns the value of the transparent_huge_pages attribute.



6457
6458
6459
# File 'lib/ovirtsdk4/types.rb', line 6457

def transparent_huge_pages
  return @transparent_huge_pages
end

- (Object) transparent_huge_pages=(value)

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.

Parameters:



6470
6471
6472
6473
6474
6475
# File 'lib/ovirtsdk4/types.rb', line 6470

def transparent_huge_pages=(value)
  if value.is_a?(Hash)
    value = TransparentHugePages.new(value)
  end
  @transparent_huge_pages = value
end