VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
List of all members
Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec:

## Avaliable Methods
public method | get_cores_per_socket ()
public method | set_hot_add_enabled ()
public method | get_hot_add_enabled ()
public method | set_hot_remove_enabled ()
public method | get_count ()
public method | set_count ()
public method | new ()
public method | set_cores_per_socket ()
public method | get_hot_remove_enabled ()

## Detailed Description

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

## Member Function Documentation

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::get_cores_per_socket | ( |  | ) |

Gets the value of 'cores_per_socket' property.

Return values

  cores_per_socket | - The current value of the field. 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. Optional#

Code:
click to view
# Number of lines of code in get_cores_per_socket: 4
sub get_cores_per_socket {
my ($self, %args) = @_;
return $self->{'cores_per_socket'};
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::get_count | ( |  | ) |

Gets the value of 'count' property.

Return values

  count | - The current value of the field. 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.

Optional#

Code:
click to view
# Number of lines of code in get_count: 4
sub get_count {
my ($self, %args) = @_;
return $self->{'count'};
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::get_hot_add_enabled | ( |  | ) |

Gets the value of 'hot_add_enabled' property.

Return values

  hot_add_enabled | - The current value of the field. 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.

Optional#

Code:
click to view
# Number of lines of code in get_hot_add_enabled: 4
sub get_hot_add_enabled {
my ($self, %args) = @_;
return $self->{'hot_add_enabled'};
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::get_hot_remove_enabled | ( |  | ) |

Gets the value of 'hot_remove_enabled' property.

Return values

  hot_remove_enabled | - The current value of the field. 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.

Optional#

Code:
click to view
# Number of lines of code in get_hot_remove_enabled: 4
sub get_hot_remove_enabled {
my ($self, %args) = @_;
return $self->{'hot_remove_enabled'};
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 22
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{count} = $args{'count'};
$self->{cores_per_socket} = $args{'cores_per_socket'};
$self->{hot_add_enabled} = $args{'hot_add_enabled'};
$self->{hot_remove_enabled} = $args{'hot_remove_enabled'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.vm.hardware.cpu.update_spec');
$self->set_binding_field('key' => 'count', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::LongType()));
$self->set_binding_field('key' => 'cores_per_socket', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::LongType()));
$self->set_binding_field('key' => 'hot_add_enabled', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
$self->set_binding_field('key' => 'hot_remove_enabled', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
bless $self, $class;
return $self;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::set_cores_per_socket | ( |  | ) |

Sets the given value for 'cores_per_socket' property.

Parameters

  cores_per_socket | - New value for the field. 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.

Code:
click to view
# Number of lines of code in set_cores_per_socket: 5
sub set_cores_per_socket {
my ($self, %args) = @_;
$self->{'cores_per_socket'} = $args{'cores_per_socket'};
return;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::set_count | ( |  | ) |

Sets the given value for 'count' property.

Parameters

  count | - New value for the field. 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.

Code:
click to view
# Number of lines of code in set_count: 5
sub set_count {
my ($self, %args) = @_;
$self->{'count'} = $args{'count'};
return;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::set_hot_add_enabled | ( |  | ) |

Sets the given value for 'hot_add_enabled' property.

Parameters

  hot_add_enabled | - New value for the field. 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.

Code:
click to view
# Number of lines of code in set_hot_add_enabled: 5
sub set_hot_add_enabled {
my ($self, %args) = @_;
$self->{'hot_add_enabled'} = $args{'hot_add_enabled'};
return;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Cpu::UpdateSpec::set_hot_remove_enabled | ( |  | ) |

Sets the given value for 'hot_remove_enabled' property.

Parameters

  hot_remove_enabled | - New value for the field. 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.

Code:
click to view
# Number of lines of code in set_hot_remove_enabled: 5
sub set_hot_remove_enabled {
my ($self, %args) = @_;
$self->{'hot_remove_enabled'} = $args{'hot_remove_enabled'};
return;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vcenter/Vm/Hardware/Cpu.pm