This function gets called when the proxy starts up.

def init(opts):
    '''
    This function gets called when the proxy starts up.
    '''
    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 'password' not in opts['proxy']:
        log.critical('No \'passwords\' key found in pillar for this proxy.')
        return False
    if 'auth' not in opts['proxy']:
        log.critical('No \'auth\' key found in pillar for this proxy.')
        return False

    DETAILS['url'] = 'https://{0}/json'.format(opts['proxy']['host'])
    DETAILS['headers'] = {'Content-Type': 'application/json-rpc'}

    # Set configuration details
    DETAILS['host'] = opts['proxy']['host']
    DETAILS['username'] = opts['proxy'].get('username')
    DETAILS['password'] = opts['proxy'].get('password')
    DETAILS['auth'] = opts['proxy'].get('auth')

    # Ensure connectivity to the device
    log.debug("Attempting to connect to bluecoat_sslv proxy host.")
    session, cookies, csrf_token = logon()
    log.debug("Successfully connected to bluecoat_sslv proxy host.")
    logout(session, cookies, csrf_token)

    DETAILS['initialized'] = True