From d41b9e56058c50117e70c7d2639ebbead466da27 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 30 Mar 2020 15:12:06 -0500 Subject: migration: T2029: set default vintage; remove target from virtual The VirtualMigrator updates the syntax of the component version string. Remove the default target, allowing downgrade to old syntax. --- python/vyos/migrator.py | 5 +---- src/helpers/run-config-migration.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python/vyos/migrator.py b/python/vyos/migrator.py index f05228041..e60d862ff 100644 --- a/python/vyos/migrator.py +++ b/python/vyos/migrator.py @@ -25,7 +25,7 @@ class MigratorError(Exception): pass class Migrator(object): - def __init__(self, config_file, force=False, set_vintage=None): + def __init__(self, config_file, force=False, set_vintage='vyos'): self._config_file = config_file self._force = force self._set_vintage = set_vintage @@ -204,9 +204,6 @@ class Migrator(object): return self._changed class VirtualMigrator(Migrator): - def __init__(self, config_file, vintage='vyos'): - super().__init__(config_file, set_vintage = vintage) - def run(self): cfg_file = self._config_file diff --git a/src/helpers/run-config-migration.py b/src/helpers/run-config-migration.py index a57a19cdf..6ffd038f3 100755 --- a/src/helpers/run-config-migration.py +++ b/src/helpers/run-config-migration.py @@ -72,7 +72,7 @@ def main(): migration = Migrator(config_file_name, force=force_on, set_vintage=vintage) else: - migration = VirtualMigrator(config_file_name) + migration = VirtualMigrator(config_file_name, set_vintage=vintage) migration.run() -- cgit v1.2.3