def detect_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    import bottle
    version = getattr(bottle, "__version__", 'xx')

    wsgi_application_wrapper(module.Bottle, '__call__', ('bottle', version))
Exemple #2
0
def detect_wsgi_entrance(module):
    import django

    framework = 'Django'
    version = django.get_version()

    wsgi_application_wrapper(module.WSGIHandler, "__call__",
                             (framework, version))
    trace_uncaught_exception(module.WSGIHandler, "handle_uncaught_exception")
Exemple #3
0
def resource_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'
    try:
        import nova
        version = getattr(nova, "__version__", 'xx')
    except Exception as _:
        pass

    wsgi_application_wrapper(module.Resource, '__call__', ('nova', version, TARGET_NOVA_APP))
Exemple #4
0
def keystone_context_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'
    try:
        import nova
        version = getattr(nova, "__version__", 'xx')
    except Exception as _:
        pass

    wsgi_application_wrapper(module.NovaKeystoneContext, '__call__', ('nova', version, TARGET_NOVA_APP))
Exemple #5
0
def detect_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'
    try:
        import flask
        version = getattr(flask, "__version__", 'xx')
    except Exception as _:
        pass

    wsgi_application_wrapper(module.Flask, '__call__', ('flask', version))
Exemple #6
0
def response_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'
    try:
        import webob
        version = getattr(webob, "__version__", 'xx')
    except Exception as _:
        pass

    wsgi_application_wrapper(module.Response, '__call__',
                             ('nova', version, TARGET_WEB_APP))
Exemple #7
0
def send_request_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'
    try:
        import webob
        version = getattr(webob, "__version__", 'xx')
    except Exception as _:
        pass

    wsgi_application_wrapper(module.SendRequest, '__call__',
                             ('nova', version, TARGET_NOVA_APP))
Exemple #8
0
def detect_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    try:
        import tornado
        version = tornado.version
    except Exception:
        version = "xx"

    if hasattr(module, "WSGIAdapter"):
        wsgi_application_wrapper(module.WSGIAdapter, '__call__', ('Tornado', version))
    else:
        console.warning("WSGIAdapter not exist in tornado 3.x, and we are not support 3.x version now.")
Exemple #9
0
def detect_wsgi_entrance(module):
    """
    :param module:
    :return:
    """
    version = 'xx'

    try:
        import gluon.main
        version = gluon.main.web2py_version.strip()
        version = version[:5]
    except Exception as _:
        pass

    wsgi_application_wrapper(module, 'wsgibase', ('web2py', version))
    trace_serve_controller(module, 'serve_controller')