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::UpdateSpec Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Vm::Hardware::UpdateSpec:

## Avaliable Methods
public method | set_upgrade_version ()
public method | get_upgrade_version ()
public method | set_upgrade_policy ()
public method | get_upgrade_policy ()
public method | new ()

## Detailed Description

The `Com::Vmware::Vcenter::Vm::Hardware::UpdateSpec` class describes the updates to virtual hardware settings of a virtual machine.

## Member Function Documentation

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

Gets the value of 'upgrade_policy' property.

Return values

  upgrade_policy | - The current value of the field. Scheduled upgrade policy.

If set to :attr:`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy.NEVER` , the :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.upgrade_version` field will be reset to null .

Optional#

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

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

Gets the value of 'upgrade_version' property.

Return values

  upgrade_version | - The current value of the field. Target hardware version to be used on the next scheduled virtual hardware upgrade.

If specified, this field must represent a newer virtual hardware version than the current virtual hardware version reported in :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.version` .

Optional#

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

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

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

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 27
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'upgrade_policy',
'case_map' => {
'AFTER_CLEAN_SHUTDOWN' => ['upgrade_version'],
'ALWAYS' => ['upgrade_version'],
'NEVER' => [],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{upgrade_policy} = $args{'upgrade_policy'};
$self->{upgrade_version} = $args{'upgrade_version'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Vm::Hardware::UpdateSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.vm.hardware.update_spec');
$self->set_binding_field('key' => 'upgrade_policy', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm', 'type_name' => 'Hardware::UpgradePolicy')));
$self->set_binding_field('key' => 'upgrade_version', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm', 'type_name' => 'Hardware::Version')));
bless $self, $class;
return $self;
}

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

Sets the given value for 'upgrade_policy' property.

Parameters

  upgrade_policy | - New value for the field. Scheduled upgrade policy.

If set to :attr:`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy.NEVER` , the :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.upgrade_version` field will be reset to null .

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

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

Sets the given value for 'upgrade_version' property.

Parameters

  upgrade_version | - New value for the field. Target hardware version to be used on the next scheduled virtual hardware upgrade.

If specified, this field must represent a newer virtual hardware version than the current virtual hardware version reported in :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.version` .

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

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

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