From 910a69f6118abdf86f15421f025a195e81c276c8 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Tue, 7 Dec 2021 19:47:54 +0500 Subject: [PATCH] Remove 'Alarm Group Default' migration. --- fm/migrations/0053_alarmgrouprules_default.py | 69 ------------------- ...ocument.py => 0053_escalation_document.py} | 0 2 files changed, 69 deletions(-) delete mode 100644 fm/migrations/0053_alarmgrouprules_default.py rename fm/migrations/{0054_escalation_document.py => 0053_escalation_document.py} (100%) diff --git a/fm/migrations/0053_alarmgrouprules_default.py b/fm/migrations/0053_alarmgrouprules_default.py deleted file mode 100644 index c53c9a3f12..0000000000 --- a/fm/migrations/0053_alarmgrouprules_default.py +++ /dev/null @@ -1,69 +0,0 @@ -# ---------------------------------------------------------------------- -# Alarm Group Default -# ---------------------------------------------------------------------- -# Copyright (C) 2007-2020 The NOC Project -# See LICENSE for details -# ---------------------------------------------------------------------- - -# Third-party modules -from bson import ObjectId -import uuid - -# NOC modules -from noc.core.migration.base import BaseMigration - - -class Migration(BaseMigration): - def migrate(self): - db = self.mongo_db - # Alarm Class - db["noc.alarmclasses"].insert_one( - { - "_id": ObjectId("6172add005d0668829888eae"), - "name": "Group", - "uuid": uuid.UUID("4644ca2a-4cfc-4818-9467-49d7e57cb47d"), - "description": "Default Alarm Class for grouping alarms", - "is_unique": False, - "is_ephemeral": True, - "reference": [], - "user_clearable": False, - "datasources": [], - "components": [], - "vars": [ - {"name": "name", "description": "Alarm Group name"}, - ], - "subject_template": "Group Alarm {{alarm.vars.name}}", - "body_template": "Group Alarm", - "recommended_actions": "Ignore this", - "flap_condition": "none", - "flap_window": 0, - "flap_threshold": 0, - "root_cause": [], - "topology_rca": False, - "handlers": [], - "clear_handlers": [], - "plugins": [], - "recover_time": 0, - "bi_id": 6432359933583168679, - "category": ObjectId("6172adba835d62a6f337f55e"), - } - ) - # Alarm Group Rule - db["alarmrules"].insert_one( - { - "_id": ObjectId("6172a2c994b882e61820692b"), - "name": "default", - "is_active": True, - "description": "Default Alarm Group", - "match": [], - "groups": [ - { - "reference_template": "", - "alarm_class": ObjectId("6172add005d0668829888eae"), - "title_template": "", - } - ], - "actions": [], - "bi_id": 8422126749852039790, - } - ) diff --git a/fm/migrations/0054_escalation_document.py b/fm/migrations/0053_escalation_document.py similarity index 100% rename from fm/migrations/0054_escalation_document.py rename to fm/migrations/0053_escalation_document.py -- GitLab