From 59005c1b816a5706787291dd2f9c7c5299bd7563 Mon Sep 17 00:00:00 2001 From: azam Date: Thu, 9 May 2024 13:31:46 +0300 Subject: [PATCH] fix schema migration versions --- Products/ZenModel/migrate/addConfigCacheProperties.py | 3 +-- Products/ZenModel/migrate/addzNoRelationshipCopy.py | 3 +-- Products/ZenModel/migrate/zensyslogSvcDefForMsgFiltering.py | 2 +- Products/ZenModel/migrate/zensyslogSvcDefForMsgParsing.py | 5 +---- Products/ZenModel/migrate/zentrapSvcDefForFiltering.py | 5 +---- SCHEMA_VERSION | 2 +- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Products/ZenModel/migrate/addConfigCacheProperties.py b/Products/ZenModel/migrate/addConfigCacheProperties.py index 0b4cdbfef7..22eb3a50d6 100644 --- a/Products/ZenModel/migrate/addConfigCacheProperties.py +++ b/Products/ZenModel/migrate/addConfigCacheProperties.py @@ -13,7 +13,6 @@ from Products.ZenRelations.zPropertyCategory import setzPropertyCategory from . import Migrate -from Products.ZenModel.ZMigrateVersion import SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION _properties = ( @@ -73,7 +72,7 @@ class addConfigCacheProperties(Migrate.Step): zDeviceConfigPendingTimeout z-properties to /Devices. """ - version = Migrate.Version(SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION) + version = Migrate.Version(300, 2, 1) def cutover(self, dmd): for args, kwargs in _properties: diff --git a/Products/ZenModel/migrate/addzNoRelationshipCopy.py b/Products/ZenModel/migrate/addzNoRelationshipCopy.py index eab05621a4..14af8af737 100644 --- a/Products/ZenModel/migrate/addzNoRelationshipCopy.py +++ b/Products/ZenModel/migrate/addzNoRelationshipCopy.py @@ -13,13 +13,12 @@ import logging import Migrate -from Products.ZenModel.ZMigrateVersion import SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION log = logging.getLogger("zen.migrate") class addzNoRelationshipCopy(Migrate.Step): - version = Migrate.Version(SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION) + version = Migrate.Version(300, 2, 0) def cutover(self, dmd): if not hasattr(dmd.Devices, "zNoRelationshipCopy"): diff --git a/Products/ZenModel/migrate/zensyslogSvcDefForMsgFiltering.py b/Products/ZenModel/migrate/zensyslogSvcDefForMsgFiltering.py index 58daecef1c..7479c9dcb2 100644 --- a/Products/ZenModel/migrate/zensyslogSvcDefForMsgFiltering.py +++ b/Products/ZenModel/migrate/zensyslogSvcDefForMsgFiltering.py @@ -34,7 +34,7 @@ class ZensyslogSvcDevForMsgParsing(Migrate.Step): add 'Filter Dropped Events' to zensyslog 'Events' graph ''' - version = Migrate.Version(SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION) + version = Migrate.Version(300, 2, 0) def cutover(self, dmd): try: diff --git a/Products/ZenModel/migrate/zensyslogSvcDefForMsgParsing.py b/Products/ZenModel/migrate/zensyslogSvcDefForMsgParsing.py index a69d8b98c2..b10500559f 100644 --- a/Products/ZenModel/migrate/zensyslogSvcDefForMsgParsing.py +++ b/Products/ZenModel/migrate/zensyslogSvcDefForMsgParsing.py @@ -21,9 +21,6 @@ from servicemigration.metrics import Metric from servicemigration.graphdatapoint import GraphDatapoint -from Products.ZenModel.ZMigrateVersion import SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION - - log = logging.getLogger("zen.migrate") svcNamesToUpdate = ['zensyslog'] sm.require("1.0.0") @@ -34,7 +31,7 @@ class ZensyslogSvcDevForMsgParsing(Migrate.Step): add 'Parser Dropped Events' to zensyslog 'Events' graph ''' - version = Migrate.Version(SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION) + version = Migrate.Version(300, 2, 0) def cutover(self, dmd): try: diff --git a/Products/ZenModel/migrate/zentrapSvcDefForFiltering.py b/Products/ZenModel/migrate/zentrapSvcDefForFiltering.py index c05b27557a..a4ad965618 100644 --- a/Products/ZenModel/migrate/zentrapSvcDefForFiltering.py +++ b/Products/ZenModel/migrate/zentrapSvcDefForFiltering.py @@ -24,9 +24,6 @@ from servicemigration.graphconfig import GraphConfig from servicemigration.graphdatapoint import GraphDatapoint -from Products.ZenModel.ZMigrateVersion import SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION - - log = logging.getLogger("zen.migrate") svcNamesToUpdate = ['zentrap'] sm.require("1.0.0") @@ -37,7 +34,7 @@ class ZentrapSvcDevForMsgParsing(Migrate.Step): add 'Filter Dropped Events' to zentrap 'Events' graph ''' - version = Migrate.Version(SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_REVISION) + version = Migrate.Version(300, 2, 0) def cutover(self, dmd): try: diff --git a/SCHEMA_VERSION b/SCHEMA_VERSION index e47da960f0..6f0d7fad95 100644 --- a/SCHEMA_VERSION +++ b/SCHEMA_VERSION @@ -1 +1 @@ -300.1.0 +300.2.1