def ext_pillar(minion_id,
               pillar,  # pylint: disable=W0613
               key=None,
               only=()):
    url = __opts__['foreman.url']
    user = __opts__['foreman.user']
    password = __opts__['foreman.password']
    api = __opts__['foreman.api']
    verify = __opts__['foreman.verifyssl']
    certfile = __opts__['foreman.certfile']
    keyfile = __opts__['foreman.keyfile']
    cafile = __opts__['foreman.cafile']
    lookup_parameters = __opts__['foreman.lookup_parameters']

    log.info("Querying Foreman at %r for information for %r", url, minion_id)
    try:
        # Foreman API version 1 is currently not supported
        if api != 2:
            log.error('Foreman API v2 is supported only, please specify'
                    'version 2 in your Salt master config')
            raise Exception

        headers = {'accept': 'version=' + str(api) + ',application/json'}

        if verify and cafile is not None:
            verify = cafile

        resp = requests.get(
                url + '/hosts/' + minion_id,
                auth=(user, password),
                headers=headers,
                verify=verify,
                cert=(certfile, keyfile)
                )
        result = resp.json()

        log.debug('Raw response of the Foreman request is %r', format(result))

        if lookup_parameters:
            parameters = dict()
            for param in result['all_parameters']:
                parameters.update({param[u'name']: param[u'value']})

            result[u'parameters'] = parameters

        if only:
            result = dict((k, result[k]) for k in only if k in result)

    except Exception:
        log.exception(
            'Could not fetch host data via Foreman API:'
        )
        return {}

    if key:
        result = {key: result}

    return result
Loads the encoded object.  This function raises :class:`BadPayload`
dataset/ETHPy150Open saltstack/salt/salt/pillar/foreman.py/ext_pillar--crossover with--dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/itsdangerous.py/Serializer.load_payload