.. _int: https://docs.python.org/2/library/stdtypes.html .. _str: https://docs.python.org/2/library/stdtypes.html .. _bool: https://docs.python.org/2/library/stdtypes.html .. _vim.Task: ../vim/Task.rst .. _vim.Datacenter: ../vim/Datacenter.rst .. _vSphere API 4.0: ../vim/version.rst#vimversionversion5 .. _vim.vApp.IpPool: ../vim/vApp/IpPool.rst .. _vSphere API 5.1: ../vim/version.rst#vimversionversion8 .. _ExtensionManager: ../vim/ExtensionManager.rst .. _ReleaseIpAllocation: ../vim/IpPoolManager.rst#releaseIpAllocation .. _vim.fault.InvalidState: ../vim/fault/InvalidState.rst .. _vmodl.fault.InvalidArgument: ../vmodl/fault/InvalidArgument.rst .. _vim.IpPoolManager.IpAllocation: ../vim/IpPoolManager/IpAllocation.rst 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.