Deletes a Palo Alto XPATH to a specific value.

    Use the xpath parameter to specify the location of the object to be deleted.

    name: The name of the module function to execute.

    xpath(str): The XPATH of the configuration API tree to control.

    commit(bool): If true the firewall will commit the changes, if false do not commit changes.

    SLS Example:

    .. code-block:: yaml

        panos/deletegroup:
            panos.delete_config:
              - xpath: /config/devices/entry/vsys/entry[@name='vsys1']/address-group/entry[@name='test']
              - commit: True

def delete_config(name, xpath=None, commit=False):
    '''
    Deletes a Palo Alto XPATH to a specific value.

    Use the xpath parameter to specify the location of the object to be deleted.

    name: The name of the module function to execute.

    xpath(str): The XPATH of the configuration API tree to control.

    commit(bool): If true the firewall will commit the changes, if false do not commit changes.

    SLS Example:

    .. code-block:: yaml

        panos/deletegroup:
            panos.delete_config:
              - xpath: /config/devices/entry/vsys/entry[@name='vsys1']/address-group/entry[@name='test']
              - commit: True

    '''
    ret = _default_ret(name)

    if not xpath:
        return ret

    query = {'type': 'config',
             'action': 'delete',
             'xpath': xpath}

    result, response = _validate_response(__proxy__['panos.call'](query))

    ret.update({
        'changes': response,
        'result': result
    })

    if not result:
        return ret

    if commit is True:
        ret.update({
            'commit': __salt__['panos.commit'](),
            'result': True
        })

    return ret