示例#1
0
def create_vdn_detector(d, server):
    vdn_detector = VDNDetector()
    vdn_detector.server = server
    vdn_detector.name = d['name']
    vdn_detector.description = d['description']
    vdn_detector.download_url = d['download_url']
    vdn_detector.url = d['url']
    vdn_detector.aws_bucket = d['aws_bucket']
    vdn_detector.aws_key = d['aws_key']
    vdn_detector.aws_region = d['aws_region']
    vdn_detector.aws_requester_pays = d['aws_requester_pays']
    vdn_detector.organization_url = d['organization']['url']
    vdn_detector.response = json.dumps(d)
    vdn_detector.save()
    return vdn_detector
示例#2
0
def create_vdn_detector(d, server):
    vdn_detector = VDNDetector()
    vdn_detector.server = server
    vdn_detector.name = d['name']
    vdn_detector.description = d['description']
    vdn_detector.download_url = d['download_url']
    vdn_detector.url = d['url']
    vdn_detector.aws_bucket = d['aws_bucket']
    vdn_detector.aws_key = d['aws_key']
    vdn_detector.aws_region = d['aws_region']
    vdn_detector.aws_requester_pays = d['aws_requester_pays']
    vdn_detector.organization_url = d['organization']['url']
    vdn_detector.response = json.dumps(d)
    vdn_detector.save()
    return vdn_detector