def init(opts):
    '''
    This function gets called when the proxy starts up. For
    ESXi devices, the host, login credentials, and, if configured,
    the protocol and port are cached.
    '''
    if 'host' not in opts['proxy']:
        log.critical('No \'host\' key found in pillar for this proxy.')
        return False
    if 'username' not in opts['proxy']:
        log.critical('No \'username\' key found in pillar for this proxy.')
        return False
    if opts['proxy'] not in 'passwords':
        log.critical('No \'passwords\' key found in pillar for this proxy.')
        return False

    host = opts['proxy']['host']

    # Get the correct login details
    try:
        username, password = find_credentials(host)
    except SaltSystemExit as err:
        log.critical('Error: {0}'.format(err))
        return False

    # Set configuration details
    DETAILS['host'] = host
    DETAILS['username'] = username
    DETAILS['password'] = password
    DETAILS['protocol'] = opts['proxy'].get('protocol')
    DETAILS['port'] = opts['proxy'].get('port')
dataset/ETHPy150Open saltstack/salt/salt/proxy/esxi.py/init/swapped operands of `not in`