def _get_options(ret=None):
    attrs = {'url': 'url',
             'token': 'token',
             'service': 'service',
             'checktype': 'checktype',
             }

    _options = salt.returners.get_returner_options(__virtualname__,
                                                   ret,
                                                   attrs,
                                                   __salt__=__salt__,
                                                   __opts__=__opts__)

    log.debug('attrs {0}'.format(attrs))
    if 'checktype' not in _options or _options['checktype'] == '':
        # default to passive check type
        _options['checktype'] = '1'

    if _options['checktype'] == 'active':
        _options['checktype'] = '0'

    if _options['checktype'] == 'passive':
        _options['checktype'] = '1'

    # checktype should be a string
    _options['checktype'] = str(_options['checktype'])

    return _options
Get the requests options from salt.
dataset/ETHPy150Open saltstack/salt/salt/returners/nagios_return.py/_get_options