List all jobs on the device.

    state
        The state of the jobs to display. Valid options are all, pending, or processed. Pending jobs are jobs
        that are currently in a running or waiting state. Processed jobs are jobs that have completed
        execution.

    CLI Example:

    .. code-block:: bash

        salt '*' panos.get_jobs
        salt '*' panos.get_jobs state=pending

def get_jobs(state='all'):
    '''
    List all jobs on the device.

    state
        The state of the jobs to display. Valid options are all, pending, or processed. Pending jobs are jobs
        that are currently in a running or waiting state. Processed jobs are jobs that have completed
        execution.

    CLI Example:

    .. code-block:: bash

        salt '*' panos.get_jobs
        salt '*' panos.get_jobs state=pending

    '''
    if state.lower() == 'all':
        query = {'type': 'op', 'cmd': '<show><jobs><all></all></jobs></show>'}
    elif state.lower() == 'pending':
        query = {'type': 'op', 'cmd': '<show><jobs><pending></pending></jobs></show>'}
    elif state.lower() == 'processed':
        query = {'type': 'op', 'cmd': '<show><jobs><processed></processed></jobs></show>'}
    else:
        raise CommandExecutionError("The state parameter must be all, pending, or processed.")

    return __proxy__['panos.call'](query)