.. versionadded:: 2019.2.0

    Confirm a commit scheduled to be reverted via the ``revert_in`` and
    ``revert_at``  arguments from the
    :mod:`net.load_template <salt.modules.napalm_network.load_template>` or
    :mod:`net.load_config <salt.modules.napalm_network.load_config>`
    execution functions. The commit ID is displayed when the commit confirmed
    is scheduled via the functions named above.

    CLI Example:

    .. code-block:: bash

        salt '*' net.confirm_commit 20180726083540640360

def confirm_commit(jid):
    '''
    .. versionadded:: 2019.2.0

    Confirm a commit scheduled to be reverted via the ``revert_in`` and
    ``revert_at``  arguments from the
    :mod:`net.load_template <salt.modules.napalm_network.load_template>` or
    :mod:`net.load_config <salt.modules.napalm_network.load_config>`
    execution functions. The commit ID is displayed when the commit confirmed
    is scheduled via the functions named above.

    CLI Example:

    .. code-block:: bash

        salt '*' net.confirm_commit 20180726083540640360
    '''
    if __grains__['os'] == 'junos':
        # Confirm the commit, by committing (i.e., invoking the RPC call)
        confirmed = __salt__['napalm.junos_commit']()
        confirmed['result'] = confirmed.pop('out')
        confirmed['comment'] = confirmed.pop('message')
    else:
        confirmed = cancel_commit(jid)
    if confirmed['result']:
        confirmed['comment'] = 'Commit #{jid} confirmed.'.format(jid=jid)
    return confirmed