def _get_rule_db_from_file(self, file_path):
    data = self._meta_loader.load(file_path=file_path)
    pack = data.get('pack', 'unknown')
    name = data.get('name', 'unknown')
    trigger = data['trigger']['type']
    criteria = data.get('criteria', None)
    action = data.get('action', {})
    rule_db = RuleDB(pack=pack, name=name, trigger=trigger, criteria=criteria, action=action, enabled=True)
    rule_db.id = 'rule_tester_rule'
    return rule_db
def _get_rule_db_from_file(self, file_path):
    data = self._meta_loader.load(file_path=file_path)
    pack = data.get('pack', 'unknown')
    name = data.get('name', 'unknown')
    trigger = data['trigger']['type']
    criteria = data.get('criteria', None)
    action = data.get('action', {})
    rule_db = RuleDB(pack=pack, name=name, trigger=trigger, criteria=criteria, action=action, enabled=True)
    rule_db.id = 'rule_tester_rule'
    return rule_db