(server)
return status
Get the TAXII Server config in the DB.

    :return dictionary
Get the TAXII Server config in the DB.
Get the TAXII Server config in the DB .
def get_taxii_server_config(server):
    """
    Get the TAXII Server config in the DB.

    :return dictionary
    """

    cfg = ''
    feeds = []
    status = {'success': False}

    if server:
        service = CRITsService.objects(name='taxii_service',
                                       status__ne="unavailable").first()
        if not service:
            msg = 'Service "%s" unavailable. Please review error logs.' % name
            status['config_error'] = msg
            status['form'] = ''
            status['service'] = ''
            return status

        cfg = service.config.taxii_servers[server]
        try:
            feeds = [(x, cfg['feeds'][x]['feedname']) for x in cfg['feeds']]
        except (AttributeError, KeyError):
            feeds = []

        cfg['servername'] = server
        cfg['cur_sname'] = server
    status['form'] = forms.TAXIIServerConfigForm(feeds, initial=cfg)

    # Add TAXII Feed config buttons to form
    status['html'] = add_feed_config_buttons(status['form'])

    status['success'] = True
    return status
def get_taxii_server_config ( server ) : cfg = '' feeds = [ ] status = { 'success' : False } if server : service = CRITsService . objects ( name = 'taxii_service' , status__ne = "unavailable" ) . first ( ) if not service : msg = 'Service "%s" unavailable. Please review error logs.' % name status [ 'config_error' ] = msg status [ 'form' ] = '' status [ 'service' ] = '' return status cfg = service . config . taxii_servers [ server ] try : feeds = [ ( x , cfg [ 'feeds' ] [ x ] [ 'feedname' ] ) for x in cfg [ 'feeds' ] ] except ( AttributeError , KeyError ) : feeds = [ ] cfg [ 'servername' ] = server cfg [ 'cur_sname' ] = server status [ 'form' ] = forms . TAXIIServerConfigForm ( feeds , initial = cfg ) # Add TAXII Feed config buttons to form status [ 'html' ] = add_feed_config_buttons ( status [ 'form' ] ) status [ 'success' ] = True return status