Class: Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec

Inherits:
VAPI::Bindings::VapiStruct
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb

Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec`` class describes the updates to be made to the CPU-related settings of a virtual machine.

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (UpdateSpec) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

  • ruby_values (Hash) (defaults to: nil)

    a map of initial property values (optional)

  • struct_value (VAPI::Data::StructValue) (defaults to: nil)

    a raw StructValue from the wire (optional)



1585
1586
1587
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1585

def initialize(ruby_values=nil, struct_value=nil)
    super(self.class.binding_type, ruby_values, struct_value)
end

Instance Attribute Details

- (Fixnum?) cores_per_socket

New number of CPU cores per socket. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. If nil , the value is unchanged.

Returns:

  • (Fixnum, nil)


1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1556

class UpdateSpec < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vcenter.vm.hardware.cpu.update_spec',
                {
                    'count' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'cores_per_socket' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'hot_add_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'hot_remove_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                },
                UpdateSpec,
                false,
                nil)
        end
    end

    attr_accessor :count,
                  :cores_per_socket,
                  :hot_add_enabled,
                  :hot_remove_enabled

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end
end

- (Fixnum?) count

New number of CPU cores. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket.


 The supported range of CPU counts is constrained by the configured guest operating system and virtual hardware version of the virtual machine.  

 If the virtual machine is running, the number of CPU cores may only be increased if   :attr:`Com::Vmware::Vcenter::Vm::Hardware::Cpu::Info.hot_add_enabled`   is true, and may only be decreased if   :attr:`Com::Vmware::Vcenter::Vm::Hardware::Cpu::Info.hot_remove_enabled`   is true.

If nil , the value is unchanged.

Returns:

  • (Fixnum, nil)


1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1556

class UpdateSpec < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vcenter.vm.hardware.cpu.update_spec',
                {
                    'count' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'cores_per_socket' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'hot_add_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'hot_remove_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                },
                UpdateSpec,
                false,
                nil)
        end
    end

    attr_accessor :count,
                  :cores_per_socket,
                  :hot_add_enabled,
                  :hot_remove_enabled

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end
end

- (Boolean?) hot_add_enabled

Flag indicating whether adding CPUs while the virtual machine is running is enabled.


 This  field  may only be modified if the virtual machine is powered off.

If nil , the value is unchanged.

Returns:

  • (Boolean, nil)


1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1556

class UpdateSpec < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vcenter.vm.hardware.cpu.update_spec',
                {
                    'count' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'cores_per_socket' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'hot_add_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'hot_remove_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                },
                UpdateSpec,
                false,
                nil)
        end
    end

    attr_accessor :count,
                  :cores_per_socket,
                  :hot_add_enabled,
                  :hot_remove_enabled

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end
end

- (Boolean?) hot_remove_enabled

Flag indicating whether removing CPUs while the virtual machine is running is enabled.


 This  field  may only be modified if the virtual machine is powered off.

If nil , the value is unchanged.

Returns:

  • (Boolean, nil)


1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1556

class UpdateSpec < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vcenter.vm.hardware.cpu.update_spec',
                {
                    'count' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'cores_per_socket' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'hot_add_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'hot_remove_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                },
                UpdateSpec,
                false,
                nil)
        end
    end

    attr_accessor :count,
                  :cores_per_socket,
                  :hot_add_enabled,
                  :hot_remove_enabled

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end
end

Class Method Details

+ (VAPI::Bindings::StructType) binding_type

Holds (gets or creates) the binding type metadata for this structure type.

Returns:

  • (VAPI::Bindings::StructType)

    the binding type



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 1562

def binding_type
    @binding_type ||= VAPI::Bindings::StructType.new(
        'com.vmware.vcenter.vm.hardware.cpu.update_spec',
        {
            'count' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
            'cores_per_socket' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
            'hot_add_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
            'hot_remove_enabled' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
        },
        UpdateSpec,
        false,
        nil)
end