summaryrefslogtreecommitdiff
path: root/src/helpers/vyos-merge-config.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-03-30 15:17:59 -0500
committerJohn Estabrook <jestabro@vyos.io>2020-03-30 15:23:59 -0500
commitb8ff6641837c164b056324e9eca5f266023472d7 (patch)
tree6deae09a5a3c6d0ad68919e5288d5a16ef35530e /src/helpers/vyos-merge-config.py
parent66e0b6fa6e26786660912edd20df49c91ce13e40 (diff)
downloadvyos-1x-b8ff6641837c164b056324e9eca5f266023472d7.tar.gz
vyos-1x-b8ff6641837c164b056324e9eca5f266023472d7.zip
config merge: T2052: update for version string syntax change
Diffstat (limited to 'src/helpers/vyos-merge-config.py')
-rwxr-xr-xsrc/helpers/vyos-merge-config.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/helpers/vyos-merge-config.py b/src/helpers/vyos-merge-config.py
index c5216daa6..10a5ea4bc 100755
--- a/src/helpers/vyos-merge-config.py
+++ b/src/helpers/vyos-merge-config.py
@@ -21,9 +21,9 @@ import subprocess
import tempfile
import vyos.defaults
import vyos.remote
-import vyos.migrator
from vyos.config import Config
from vyos.configtree import ConfigTree
+from vyos.migrator import Migrator, VirtualMigrator
if (len(sys.argv) < 2):
@@ -61,9 +61,13 @@ with tempfile.NamedTemporaryFile() as file_to_migrate:
with open(file_to_migrate.name, 'w') as fd:
fd.write(config_file)
- migration = vyos.migrator.Migrator(file_to_migrate.name)
+ virtual_migration = VirtualMigrator(file_to_migrate.name)
+ virtual_migration.run()
+
+ migration = Migrator(file_to_migrate.name)
migration.run()
- if migration.config_changed():
+
+ if virtual_migration.config_changed() or migration.config_changed():
with open(file_to_migrate.name, 'r') as fd:
config_file = fd.read()