Class: OvirtSDK4::GlusterBrickMemoryInfo

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

- (GlusterBrickMemoryInfo) initialize(opts = {})

Creates a new instance of the OvirtSDK4::GlusterBrickMemoryInfo 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):

  • :memory_pools (Array<GlusterMemoryPool>, Array<Hash>)

    The values of attribute memory_pools.



2856
2857
2858
2859
# File 'lib/ovirtsdk4/types.rb', line 2856

def initialize(opts = {})
  super(opts)
  self.memory_pools = opts[:memory_pools]
end

Instance Method Details

- (Array<GlusterMemoryPool>) memory_pools

Returns the value of the memory_pools attribute.

Returns:



2826
2827
2828
# File 'lib/ovirtsdk4/types.rb', line 2826

def memory_pools
  return @memory_pools
end

- (Object) memory_pools=(list)

Sets the value of the memory_pools attribute.

Parameters:



2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
# File 'lib/ovirtsdk4/types.rb', line 2834

def memory_pools=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = GlusterMemoryPool.new(value)
      end
    end
  end
  @memory_pools = list
end