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::Appliance::Techpreview::Networking::Ipv4::IPv4Config Class Reference
Inheritance diagram for Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config:

## Avaliable Methods
public method | get_interface_name ()
public method | set_prefix ()
public method | set_default_gateway ()
public method | get_address ()
public method | get_mode ()
public method | set_mode ()
public method | set_address ()
public method | set_interface_name ()
public method | get_prefix ()
public method | new ()
public method | get_default_gateway ()

## Detailed Description

`Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config` class Structure that defines the IPv4 configuration state of a network interface.

## Member Function Documentation

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::get_address | ( |  | ) |

Gets the value of 'address' property.

Return values

  address | - The current value of the field. IPv4 address, for example, "10.20.80.191". Set this argument to an empty string "", if the mode is "unconfigured" or "dhcp". String#

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::get_default_gateway | ( |  | ) |

Gets the value of 'default_gateway' property.

Return values

  default_gateway | - The current value of the field. IPv4 address of the default gateway. This default gateway value is used if the mode argument is set to "static" This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. String#

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::get_interface_name | ( |  | ) |

Gets the value of 'interface_name' property.

Return values

  interface_name | - The current value of the field. Interface name, for example, "nic0", "nic1". String#

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::get_mode | ( |  | ) |

Gets the value of 'mode' property.

Return values

  mode | - The current value of the field. Address assignment mode. IPv4Mode#

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::get_prefix | ( |  | ) |

Gets the value of 'prefix' property.

Return values

  prefix | - The current value of the field. IPv4 CIDR prefix, for example , 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. Set this argument to 0 if the mode is "unconfigured" or "dhcp". long#

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 24
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{interface_name} = $args{'interface_name'};
$self->{mode} = $args{'mode'};
$self->{address} = $args{'address'};
$self->{prefix} = $args{'prefix'};
$self->{default_gateway} = $args{'default_gateway'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config');
$self->set_binding_name('name' => 'com.vmware.appliance.techpreview.networking.ipv4.I_pv4_config');
$self->set_binding_field('key' => 'interface_name', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
$self->set_binding_field('key' => 'mode', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Appliance::Techpreview::Networking', 'type_name' => 'Ipv4::IPv4Mode'));
$self->set_binding_field('key' => 'address', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
$self->set_binding_field('key' => 'prefix', 'value' => new Com::Vmware::Vapi::Bindings::Type::LongType());
$self->set_binding_field('key' => 'default_gateway', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
bless $self, $class;
return $self;
}

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::set_address | ( |  | ) |

Sets the given value for 'address' property.

Parameters

  address | - New value for the field. IPv4 address, for example, "10.20.80.191". Set this argument to an empty string "", if the mode is "unconfigured" or "dhcp".

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::set_default_gateway | ( |  | ) |

Sets the given value for 'default_gateway' property.

Parameters

  default_gateway | - New value for the field. IPv4 address of the default gateway. This default gateway value is used if the mode argument is set to "static" This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces.

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::set_interface_name | ( |  | ) |

Sets the given value for 'interface_name' property.

Parameters

  interface_name | - New value for the field. Interface name, for example, "nic0", "nic1".

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::set_mode | ( |  | ) |

Sets the given value for 'mode' property.

Parameters

  mode | - New value for the field. Address assignment mode.

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

public method Com::Vmware::Appliance::Techpreview::Networking::Ipv4::IPv4Config::set_prefix | ( |  | ) |

Sets the given value for 'prefix' property.

Parameters

  prefix | - New value for the field. IPv4 CIDR prefix, for example , 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. Set this argument to 0 if the mode is "unconfigured" or "dhcp".

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

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

- Com/Vmware/Appliance/Techpreview/Networking/Ipv4.pm