def parse_server(server):
    parsed_server = {'addrs': set(),
                     'ssl': False,
                     'names': set()}

    for directive in server:
        if directive[0] == 'listen':
            addr = obj.Addr.fromstring(directive[1])
            parsed_server['addrs'].add(addr)
            if not parsed_server['ssl'] and addr.ssl:
                parsed_server['ssl'] = True
        elif directive[0] == 'server_name':
            parsed_server['names'].update(
                _get_servernames(directive[1]))
        elif directive[0] == 'ssl' and directive[1] == 'on':
            parsed_server['ssl'] = True

    return parsed_server
Load a specific document from the given database.
dataset/ETHPy150Open letsencrypt/letsencrypt/certbot-nginx/certbot_nginx/parser.py/parse_server--crossover with--dataset/ETHPy150Open djc/couchdb-python/couchdb/mapping.py/Document.load