saltext.vmware.states.nsxt_compute_manager#

State module for NSX-T compute manager registration and de-registration

saltext.vmware.states.nsxt_compute_manager.present(name, hostname, username, password, compute_manager_server, credential, server_origin_type='vCenter', verify_ssl=True, cert=None, cert_common_name=None, display_name=None, description=None, set_as_oidc_provider=None)[source]#

Registers compute manager in NSX-T Manager or updates the registration

CLI Example:

salt vm_minion nsxt_compute_manager.present hostname=nsxt-manager.local username=admin ...
register_compute_manager:
  nsxt_compute_manager.present:
    - name: Registration
      hostname: {{ pillar['nsxt_manager_hostname'] }}
      username: {{ pillar['nsxt_manager_username'] }}
      password: {{ pillar['nsxt_manager_password'] }}
      cert: {{ pillar['nsxt_manager_certificate'] }}
      verify_ssl: <False/True>
      compute_manager_server: <compute manager IP address or FQDN>
      server_origin_type: <compute manager origin type>
      credential:
        credential_type:  UsernamePasswordLoginCredential
        username: {{ pillar['compute manager username'] }}
        password: {{ pillar['compute manager password'] }}
        thumbprint: {{ pillar['compute manager thumbprint'] }}
      display_name: <compute manager name>
      description: <compute manager description>
      set_as_oidc_provider: <False/True>
name

name of 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

compute_manager_server

Compute manager server IP address or FQDN

credential

An object which contains credential details to validate compute manager Sample usage in sls file:

credential:
   credential_type: "UsernamePasswordLoginCredential"
   username: "user"
   password: "pass"
   thumbprint: "36:XX:XX:XX:XX:XX:XX66"
credential_type

Type of credential provided. For now only UsernamePasswordLoginCredential is supported.

username

Username of the compute manager

password

Password of the compute manager

thumbprint

Thumbprint of the compute manager

server_origin_type

(Optional) Server origin type of the compute manager. Default is vCenter

display_name

(Optional) Display name of the compute manager

description

(Optional) description for the compute manager

set_as_oidc_provider
(Optional) Specifies whether compute manager has been set as OIDC provider. Default is false. If the

compute manager is VC and need to set set as OIDC provider for NSX then this flag should be set as true.

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 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 certificate common name.

For more information, see VMware API docs for NSX-T

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

De-Registers compute manager in NSX-T Manager if present. Requires either compute_manager_server or compute_manager_id to be provided

CLI Example:

salt vm_minion nsxt_compute_manager.absent hostname=nsxt-manager.local username=admin ...
register_compute_manager:
  nsxt_compute_manager.absent:
    - name: Registration
      hostname: {{ pillar['nsxt_manager_hostname'] }}
      username: {{ pillar['nsxt_manager_username'] }}
      password: {{ pillar['nsxt_manager_password'] }}
      cert: {{ pillar['nsxt_manager_certificate'] }}
      verify_ssl: <False/True>
      compute_manager_server: <compute manager IP address or FQDN>
name

Name of 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

compute_manager_server

(Optional) Compute manager server IP address or FQDN

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 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 certificate common name.