Set the NTP servers of the Palo Alto proxy minion. A commit will be required before this is processed.

    CLI Example:

    Args:
        primary_server(str): The primary NTP server IP address or FQDN.

        secondary_server(str): The secondary NTP server IP address or FQDN.

        deploy (bool): If true then commit the full candidate configuration, if false only set pending change.

    .. code-block:: bash

        salt '*' ntp.set_servers 0.pool.ntp.org 1.pool.ntp.org
        salt '*' ntp.set_servers primary_server=0.pool.ntp.org secondary_server=1.pool.ntp.org
        salt '*' ntp.ser_servers 0.pool.ntp.org 1.pool.ntp.org deploy=True

def set_ntp_servers(primary_server=None, secondary_server=None, deploy=False):
    '''
    Set the NTP servers of the Palo Alto proxy minion. A commit will be required before this is processed.

    CLI Example:

    Args:
        primary_server(str): The primary NTP server IP address or FQDN.

        secondary_server(str): The secondary NTP server IP address or FQDN.

        deploy (bool): If true then commit the full candidate configuration, if false only set pending change.

    .. code-block:: bash

        salt '*' ntp.set_servers 0.pool.ntp.org 1.pool.ntp.org
        salt '*' ntp.set_servers primary_server=0.pool.ntp.org secondary_server=1.pool.ntp.org
        salt '*' ntp.ser_servers 0.pool.ntp.org 1.pool.ntp.org deploy=True

    '''
    ret = {}

    if primary_server:
        query = {'type': 'config',
                 'action': 'set',
                 'xpath': '/config/devices/entry[@name=\'localhost.localdomain\']/deviceconfig/system/ntp-servers/'
                          'primary-ntp-server',
                 'element': '<ntp-server-address>{0}</ntp-server-address>'.format(primary_server)}
        ret.update({'primary_server': __proxy__['panos.call'](query)})

    if secondary_server:
        query = {'type': 'config',
                 'action': 'set',
                 'xpath': '/config/devices/entry[@name=\'localhost.localdomain\']/deviceconfig/system/ntp-servers/'
                          'secondary-ntp-server',
                 'element': '<ntp-server-address>{0}</ntp-server-address>'.format(secondary_server)}
        ret.update({'secondary_server': __proxy__['panos.call'](query)})

    if deploy is True:
        ret.update(commit())

    return ret