saltext.vmware.modules.vmc_dhcp_profiles#

Salt execution module for VMC DHCP Profiles Provides methods to Create, Read, Update and Delete DHCP Profiles.

saltext.vmware.modules.vmc_dhcp_profiles.get(hostname, refresh_key, authorization_host, org_id, sddc_id, type, verify_ssl=True, cert=None, sort_by=None, sort_ascending=None, page_size=None, cursor=None)[source]#

Retrieves DHCP profiles of given profile type for given SDDC

CLI Example:

salt vm_minion vmc_dhcp_profiles.get hostname=nsxt-manager.local type=server ...
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 profiles should be retrieved

type

The type of DHCP profiles to be retrieved. Possible values: server, relay

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.

sort_by

(Optional) Field by which records are sorted

sort_ascending

(Optional) Boolean value to sort result in ascending order. Enabled by default.

page_size

(Optional) Maximum number of results to return in this page. Default page size is 1000.

cursor

(Optional) Opaque cursor to be used for getting next page of records (supplied by current result page)

saltext.vmware.modules.vmc_dhcp_profiles.get_by_id(hostname, refresh_key, authorization_host, org_id, sddc_id, type, dhcp_profile_id, verify_ssl=True, cert=None)[source]#

Retrieves given DHCP profile of given profile type for given SDDC

CLI Example:

salt vm_minion vmc_dhcp_profiles.get_by_id hostname=nsxt-manager.local type=server ...
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 retrieved

type

The type of DHCP profile for which the given DHCP belongs to. Possible values: server, relay

dhcp_profile_id

Id of the DHCP profile to be retrieved from SDDC.

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.

saltext.vmware.modules.vmc_dhcp_profiles.delete(hostname, refresh_key, authorization_host, org_id, sddc_id, type, dhcp_profile_id, verify_ssl=True, cert=None)[source]#

Deletes given DHCP profile from the given SDDC

CLI Example:

salt vm_minion vmc_dhcp_profiles.delete hostname=nsxt-manager.local type=server ...
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

Id of the DHCP profile to be deleted from SDDC.

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.

saltext.vmware.modules.vmc_dhcp_profiles.create(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)[source]#

Creates DHCP profile of given type for the given SDDC

CLI Example:

salt vm_minion vmc_dhcp_profiles.create hostname=nsxt-manager.local type=server ...
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

Id of the DHCP profile to be added to SDDC

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

Example values:

dhcp-server-profiles:
{
    "server_addresses": [
        "10.22.12.2/23"
    ],
    "tags": [
        {
            "tag": "tag1",
            "scope": "scope1"
        }
    ],
    "lease_time": 86400
}

dhcp-relay-profiles:
{
    "server_addresses": [
        "10.1.1.1"
    ],
    "tags": [
        {
            "tag": "tag1",
            "scope": "scope1"
        }
    ]
}
saltext.vmware.modules.vmc_dhcp_profiles.update(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]#

Updates given DHCP profile for the given SDDC

CLI Example:

salt vm_minion vmc_dhcp_profiles.update hostname=nsxt-manager.local type=relay ...
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 belongs to

type

The type of DHCP profile for which the given dhcp belongs to. Possible values: server, relay

dhcp_profile_id

Id of the DHCP profile to be updated for given SDDC.

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:

dhcp-server-profiles:
{
    "display_name": "dhcp-test",
    "server_addresses": [
        "10.22.12.2/23"
    ],
    "tags": [
        {
            "tag": "tag1",
            "scope": "scope1"
        }
    ],
    "lease_time": 86400
}

dhcp-relay-profiles:
{
    "display_name": "dhcp-test",
    "server_addresses": [
        "10.1.1.1"
    ],
    "tags": [
        {
            "tag": "tag1",
            "scope": "scope1"
        }
    ]
}