saltext.vmware.states.nsxt_ip_pools#

Salt State file to create/update/delete an IP Address Pool

Example:

create_ip_pool:
  nsxt_ip_pools.present:
    - name: Create IP Pool
      hostname: {{ pillar['nsxt_manager_hostname'] }}
      username: {{ pillar['nsxt_manager_username'] }}
      password: {{ pillar['nsxt_manager_password'] }}
      cert: {{ pillar['nsxt_manager_certificate'] }}
      verify_ssl: <False/True>
      display_name: <ip pool name>
      description: <ip pool description>
      tags:
        - tag: <tag-key-1>
          scope: <tag-value-1>
        - tag: <tag-key-2>
          scope: <tag-value-2>
      subnets:
        - cidr: <cidr_value>
          gateway_ip: <gateway_ip_value>
          dns_nameservers:
            - <dns_nameserver1>
            - <dns_nameserver2>
          allocation_ranges:
            - "start": <IP-Address-Range-start-1>
              "end": <IP-Address-Range-end-1>
      ip_release_delay: <delay in milliseconds>
saltext.vmware.states.nsxt_ip_pools.__virtual__()[source]#

Only load if the nsxt_ip_pools module is available in __salt__

saltext.vmware.states.nsxt_ip_pools.present(name, display_name, hostname, username, password, cert=None, verify_ssl=True, cert_common_name=None, description=None, tags=None, subnets=None, ip_release_delay=None)[source]#

Creates/Updates(if present with the same name) an IP Address Pool

create_ip_pool:
  nsxt_ip_pools.present:
    - name: Create IP Pool
      hostname: {{ pillar['nsxt_manager_hostname'] }}
      username: {{ pillar['nsxt_manager_username'] }}
      password: {{ pillar['nsxt_manager_password'] }}
      cert: {{ pillar['nsxt_manager_certificate'] }}
      verify_ssl: <False/True>
      display_name: <ip pool name>
      description: <ip pool description>
      tags:
        - tag: <tag-key-1>
          scope: <tag-value-1>
        - tag: <tag-key-2>
          scope: <tag-value-2>
      subnets:
        - cidr: <cidr_value>
          gateway_ip: <gateway_ip_value>
          dns_nameservers:
            - <dns_nameserver1>
            - <dns_nameserver2>
          allocation_ranges:
            - start: <IP-Address-Range-start-1>
              end: <IP-Address-Range-end-1>
      ip_release_delay: <delay in milliseconds>
name

The Operation to perform

hostname

The host name of NSX-T manager

username

Username to connect to NSX-T manager

password

Password to connect to NSX-T manager

verify_ssl

(Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.

cert

(Optional) Path to the SSL client certificate file to connect to NSX-T manager. The certificate can be retrieved from browser.

cert_common_name

(Optional) By default, the hostname parameter and the common name in certificate is compared for host name verification. If the client certificate common name and hostname do not match (in case of self-signed certificates), specify the certificate common name as part of this parameter. This value is then used to compare against

display_name

The name using which IP Address Pool will be created. In case of update the provided display_name should be unique else the method will raise an error

description

(Optional) description for the IP Address Pool

tags

(Optional) Opaque identifiers meaningful to the API user. Maximum 30 tags can be associated:

tags:
    - tag: <tag-key-1>
      scope: <tag-value-1>
    - tag: <tag-key-2>
      scope: <tag-value-2>
subnets

(Optional) The collection of one or more subnet objects in a pool. Subnets can be IPv4 or IPv6 and they should not overlap. The maximum number will not exceed 5 subnets.

subnets:
    - cidr: <cidr_value>
      gateway_ip: <gateway_ip_value>
      dns_nameservers:
        - <dns_nameserver1>
          <dns_nameserver2>
      allocation_ranges:
        - start: <IP-Address-Range-start-1>
          end: <IP-Address-Range-end-1>
ip_release_delay

(Optional) Delay in milliseconds, while releasing allocated IP address from IP pool (Default is 2 mins - configured on NSX device).

saltext.vmware.states.nsxt_ip_pools.absent(name, display_name, hostname, username, password, cert=None, verify_ssl=True, cert_common_name=None)[source]#

Deletes an IP Address Pool of provided name (if present)


delete_ip_pool:
nsxt_ip_pools.absent:
  • name: Delete IP Pool hostname: {{ pillar[‘nsxt_manager_hostname’] }} username: {{ pillar[‘nsxt_manager_username’] }} password: {{ pillar[‘nsxt_manager_password’] }} cert: {{ pillar[‘nsxt_manager_certificate’] }} verify_ssl: <False/True> display_name: <ip pool name>

name

The Operation to perform

hostname

The host name of NSX-T manager

username

Username to connect to NSX-T manager

password

Password to connect to NSX-T manager

verify_ssl

(Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.

cert

(Optional) Path to the SSL client certificate file to connect to NSX-T manager. The certificate can be retrieved from browser.

cert_common_name

(Optional) By default, the hostname parameter and the common name in certificate is compared for host name verification. If the client certificate common name and hostname do not match (in case of self-signed certificates), specify the certificate common name as part of this parameter. This value is then used to compare against

display_name

Display name of IP Address Pool to delete