def insert_initial_category_values(*args, **kwargs): """Insert Task category default database values from a yaml template file.""" run = YamlInfo("aucr_app/plugins/tasks/category.yaml", "none", "none") category_data = run.get() for items in category_data: new_category_table_row = TaskCategory(task_category_name=items) db.session.add(new_category_table_row) db.session.commit()
def insert_initial_severity_values(*args, **kwargs): """Insert severity default database values from a yaml template file.""" run = YamlInfo("aucr_app/plugins/tasks/severity.yaml", "none", "none") severity_data = run.get() for items in severity_data: new_severity_table_row = Severity(severity=items) db.session.add(new_severity_table_row) db.session.commit()
def insert_initial_tasks_states_values(*args, **kwargs): """Insert TLP default database values from a yaml template file.""" run = YamlInfo("aucr_app/plugins/tasks/task_states.yaml", "none", "none") tlp_data = run.get() for items in tlp_data: new_task_state_table_row = TaskStates(task_state_name=items) db.session.add(new_task_state_table_row) db.session.commit()
def insert_initial_tlp_values(*args, **kwargs): """Insert TLP default database values from a yaml template file.""" run = YamlInfo("aucr_app/plugins/tasks/tlp.yaml", "none", "none") tlp_data = run.get() for items in tlp_data: new_tlp_table_row = TrafficLightProtocol( color_name=items, quick_description=tlp_data[items]["quick_description"], how_description=tlp_data[items]["how_description"], when_description=tlp_data[items]["when_description"]) db.session.add(new_tlp_table_row) db.session.commit()