def export_ano_flow_para(self): if EXPORT_ABNORMAL_FLOW_PARA_FILE is None: raise Exception("need to set EXPORT_ABNORMAL_FLOW_PARA_FILE" "environment variable before export abnormal ip" "address") self.ano_flow_para = copy.deepcopy(self.ano_desc) self.ano_flow_para['ano_node_ipdests'] = self.ano_node.ipdests zdump(self.ano_flow_para, EXPORT_ABNORMAL_FLOW_PARA_FILE) # For export abnormal flows
def export_ano_flow_para(self, new_generator_list): """export para to help to export ano flows Parameters ----------------- new_generator_list : a list of generators the abnormal traffic generators Returns ------------------ None Notes ------------------- Will dump the parameter data to the **EXPORT_ABNORMAL_FLOW_PARA_FILE** """ assert(len(new_generator_list) == 1) new_generator = new_generator_list[0] ano_flow_para = copy.deepcopy(new_generator.para) ano_flow_para['ano_type'] = self.ano_desc['anoType'] zdump(ano_flow_para, EXPORT_ABNORMAL_FLOW_PARA_FILE) # For export abnormal flows