diff options
author | John Estabrook <jestabro@vyos.io> | 2020-03-30 15:12:06 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2020-03-30 15:23:59 -0500 |
commit | d41b9e56058c50117e70c7d2639ebbead466da27 (patch) | |
tree | f6d3a391917c4dcddb3b6ae5969ddd94e155228e | |
parent | 69dda9497229b56bf68e7e66135688561598b892 (diff) | |
download | vyos-1x-d41b9e56058c50117e70c7d2639ebbead466da27.tar.gz vyos-1x-d41b9e56058c50117e70c7d2639ebbead466da27.zip |
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.
-rw-r--r-- | python/vyos/migrator.py | 5 | ||||
-rwxr-xr-x | 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() |