Beispiel #1
0
def status(request):
    """Provide the server status information."""
    server_info = {
        'api_version': API_VERSION,
    }
    commit_info = commit()
    if commit_info:
        server_info['build'] = commit_info
    server_info['server_address'] = request.META.get('HTTP_HOST', 'localhost')
    server_info['platform'] = platform_info()
    server_info['python'] = python_version()
    server_info['modules'] = modules()
    return Response(server_info)
Beispiel #2
0
def status(request):
    """Provide the server status information."""
    server_info = {
        'api_version': API_VERSION,
    }
    commit_info = commit()
    if commit_info:
        server_info['build'] = commit_info
    server_info['server_address'] = request.META.get('HTTP_HOST', 'localhost')
    server_info['platform'] = platform_info()
    server_info['python'] = python_version()
    server_info['modules'] = modules()
    server_info['server_id'] = ServerInformation.create_or_retreive_server_id()
    env_dict = {}
    for key, value in os.environ.items():
        env_dict[key] = value
    server_info['environment_vars'] = env_dict
    return Response(server_info)
Beispiel #3
0
def create_report_version():
    """Create the report version string."""
    return '0.0.47.%s' % commit()