Class: OvirtSDK4::CpuTune

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

- (CpuTune) initialize(opts = {})

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

  • :vcpu_pins (Array<VcpuPin>, Array<Hash>)

    The values of attribute vcpu_pins.



1968
1969
1970
1971
# File 'lib/ovirtsdk4/types.rb', line 1968

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

Instance Method Details

- (Array<VcpuPin>) vcpu_pins

Returns the value of the vcpu_pins attribute.

Returns:



1938
1939
1940
# File 'lib/ovirtsdk4/types.rb', line 1938

def vcpu_pins
  return @vcpu_pins
end

- (Object) vcpu_pins=(list)

Sets the value of the vcpu_pins attribute.

Parameters:



1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
# File 'lib/ovirtsdk4/types.rb', line 1946

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