Files
deb-python-pyvmomi/docs/vim/IpPoolManager.rst
Shawn Hartsock 15f7be9a52 pyVmomi reStructured Text Documentation
This external documentation for pyVmomi was generated using Googly Docs
(aka Google Standard Documentation) which renders very cleanly in
GitHub. Internal documentation for a class should be done in Sphinx
format because tools like pyCharm and Eclipse can use that documentation
as a hint for code completion.

Note: External docs as Googly Docs, internal docs as Sphinx.

Closes bug#15
2014-06-17 14:07:42 -04:00

6.6 KiB

vim.IpPoolManager

Singleton Managed Object used to manage IP Pools.IP Pools are used to allocate IPv4 and IPv6 addresses to vApps.

since

vSphere API 4.0

Attributes

Methods

QueryIpPools(dc):

Return the list of IP pools for a datacenter.

Privilege:

Args:
dc (vim.Datacenter):

The datacenter for which to look up the IP pools.

Returns:
vim.vApp.IpPool:

The resulting list of pools.

CreateIpPool(dc, pool):

Create a new IP pool.The name field must be defined, all other fields are optional. If unset, they will be given default values.The ID for the pool is generated by the server and should not be defined on the pool object passed to this method.

Privilege:

Args:
dc (vim.Datacenter):

The datacenter on which to create the pool.

pool (vim.vApp.IpPool):

The IP pool to create on the server

Returns:
int:

The generated ID for the pool

Raises:

vmodl.fault.InvalidArgument:

if the name of the pool already exists on the datacenter.

UpdateIpPool(dc, pool):

Update an IP pool on a datacenter.The pool to update is looked up from the value of the id field.All fields in the pool except the id are optional. Only defined values are stored on the server.

Privilege:

Args:
dc (vim.Datacenter):

The datacenter on which to look up the pool.

pool (vim.vApp.IpPool):

The IP pool to update on the server

Returns:

None

Raises:

vmodl.fault.InvalidArgument:

if the name of the pool already exists on the datacenter.

DestroyIpPool(dc, id, force):

Destroys an IP pool on the given datacenter.Looks up the pool on the datacenter by ID and deletes it. If the pool is in use, the method throws InvalidState unless the force flag is true.

Privilege:

Args:
dc (vim.Datacenter):

The datacenter on which to find the pool

id (int):

The unique ID of the pool

force (bool):

If true, the pool will be destroyed even if it is in use

Returns:

None

Raises:

vim.fault.InvalidState:

if the pool is in use and the force flag is false

AllocateIpv4Address(dc, poolId, allocationId):

Allocates an IPv4 address from an IP pool.Allocated IP addresses are reserved in the IP pool until released by calling ReleaseIpAllocation , or until the IP pool is configured to have an IP range that does not contain the IP address, or until the IP pool is destroyed.The caller must be a vCenter extension. Refer to ExtensionManager for details on vCenter extensions.The caller specifies a per extension unique allocation ID. Calling this function twice with the same allocation ID for the same pool yields the same IP address. This makes it possible to do idempotent allocations. since: vSphere API 5.1

Privilege:

dynamic

Args:
dc (vim.Datacenter):

The datacenter on which to find the pool

poolId (int):

The unique ID of the pool

allocationId (str):

The unique ID for this allocation

Returns:
str:

An IPv4 address if the pool has an available IPv4 address in its address ranges, otherwise the empty string.

Raises:

vmodl.fault.InvalidArgument:

if the specified IP pool does not exist on the specified datacenter.

AllocateIpv6Address(dc, poolId, allocationId):

Allocates an IPv6 address from an IP pool.Allocated IP addresses are reserved in the IP pool until released by calling ReleaseIpAllocation , or until the IP pool is configured to have an IP range that does not contain the IP address, or until the IP pool is destroyed.The caller must be a vCenter extension. Refer to ExtensionManager for details on vCenter extensions.The caller specifies a per extension unique allocation ID. Calling this function twice with the same allocation ID for the same pool yields the same IP address. This makes it possible to do idempotent allocations. since: vSphere API 5.1

Privilege:

dynamic

Args:
dc (vim.Datacenter):

The datacenter on which to find the pool

poolId (int):

The unique ID of the pool

allocationId (str):

The unique ID for this allocation

Returns:
str:

An IPv6 address if the pool has an available IPv6 address in its address ranges, otherwise the empty string.

Raises:

vmodl.fault.InvalidArgument:

if the specified IP pool does not exist on the specified datacenter.

ReleaseIpAllocation(dc, poolId, allocationId):

Releases an IP allocation back to it's IP pool.Attempting to release an IP allocation that is not allocated from the specified IP pool with the specified allocation ID silently fails. This makes it possible to release IP allocations idempotently.All IP addresses allocated by an extension are automatically released if the extension is unregistered from vCenter. since: vSphere API 5.1

Privilege:

Args:
dc (vim.Datacenter):

The datacenter on which to find the pool

poolId (int):

The unique ID of the pool

allocationId (str):

The unique ID for this allocation

Returns:

None

Raises:

vmodl.fault.InvalidArgument:

if the specified IP pool does not exist on the specified datacenter.

QueryIPAllocations(dc, poolId, extensionKey):

Query IP allocations by IP pool and extension key. since: vSphere API 5.1

Privilege:

Args:
dc (vim.Datacenter):

The datacenter on which to find the pool

poolId (int):

The unique ID of the pool

extensionKey (str):

The key of the extension

Returns:
vim.IpPoolManager.IpAllocation:

The resulting list of

Raises:

vmodl.fault.InvalidArgument:

if the specified IP pool does not exist on the specified datacenter.