saltext.vmware.states.vmc_dhcp_profiles#
VMC DHCP Profiles state module
Add new DHCP profile and delete existing DHCP profile from an SDDC.
Example usage :
ensure_dhcp_profile:
vmc_dhcp_profiles.present:
- hostname: sample-nsx.vmwarevmc.com
- refresh_key: 7jPSGSZpCa8e5Ouks4UY5cZyOtynAhF
- authorization_host: console-stg.cloud.vmware.com
- org_id: 10e1092f-51d0-473a-80f8-137652c39fd0
- sddc_id: b43da080-2626-f64c-88e8-7f31d9d2c306
- type: server
- dhcp_profile_id: dhcp-test
- verify_ssl: False
- cert: /path/to/client/certificate
Warning
It is recommended to pass the VMC authentication details using Pillars rather than specifying as plain text in SLS files.
- saltext.vmware.states.vmc_dhcp_profiles.present(name, hostname, refresh_key, authorization_host, org_id, sddc_id, type, dhcp_profile_id, verify_ssl=True, cert=None, server_addresses=None, tags='USER_DEFINED_NONE', lease_time=None, display_name=None)[source]#
Ensure a given DHCP profile exists for given SDDC
- hostname
The host name of NSX-T manager
- refresh_key
API Token of the user which is used to get the Access Token required for VMC operations
- authorization_host
Hostname of the VMC cloud console
- org_id
The Id of organization to which the SDDC belongs to
- sddc_id
The Id of SDDC for which the DHCP profile should be added
- type
The type of DHCP profile for which the given dhcp belongs to. Possible values: server, relay
- dhcp_profile_id
DHCP profile id, any static unique string identifying the DHCP profile. Also same as the display_name by default.
- 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 VMC Cloud Console. The certificate can be retrieved from browser.
- server_addresses
when type is relay, this field indicates DHCP relay addresses(DHCP server IP addresses for DHCP relay configuration). Both IPv4 and IPv6 addresses are supported.
when type is server, this field indicates DHCP server address in CIDR format. Both IPv4 and IPv6 address families are supported. Prefix length should be less than or equal to 30 for IPv4 address family and less than or equal to 126 for IPv6. When not specified, IPv4 value is auto-assigned to 100.96.0.1/30.
Note: This field is optional only when type is server and is mandatory when type is relay.
- tags
(Optional) Opaque identifiers meaningful to the user.
tags: - tag: <tag-key-1> scope: <tag-value-1> - tag: <tag-key-2> scope: <tag-value-2>
- lease_time
(Optional) IP address lease time in seconds. Minimum value is 60. Maximum value is 4294967295. Default value is 86400 Note: This field is applicable only when type is server
- display_name
Identifier to use when displaying entity in logs or GUI.
Example values:
for dhcp-server-profiles: server_addresses: - 10.22.12.2/23 tags: - tag: tag1 scope: scope1 lease_time: 86400 for dhcp-relay-profiles: server_addresses: - 10.1.1.1 tags: - tag: tag1 scope: scope1
- saltext.vmware.states.vmc_dhcp_profiles.absent(name, hostname, refresh_key, authorization_host, org_id, sddc_id, type, dhcp_profile_id, verify_ssl=True, cert=None)[source]#
Ensure a given DHCP profile does not exist on given SDDC
- hostname
The host name of NSX-T manager
- refresh_key
API Token of the user which is used to get the Access Token required for VMC operations
- authorization_host
Hostname of the VMC cloud console
- org_id
The Id of organization to which the SDDC belongs to
- sddc_id
The Id of SDDC from which the DHCP profile should be deleted
- type
The type of DHCP profile for which the given dhcp belongs to. Possible values: server, relay
- dhcp_profile_id
DHCP profile id, any static unique string identifying the DHCP profile.
- 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 VMC Cloud Console. The certificate can be retrieved from browser.