summaryrefslogtreecommitdiff
path: root/src/helpers/vyos-load-config.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-03-30 16:32:14 -0500
committerJohn Estabrook <jestabro@vyos.io>2020-03-30 16:32:14 -0500
commit1c74d7ec8a239427c8f7e9f6d864c5085372b0e6 (patch)
treec766470ec065a0edb9eeddd97fc27512dff891de /src/helpers/vyos-load-config.py
parentb8ff6641837c164b056324e9eca5f266023472d7 (diff)
downloadvyos-1x-1c74d7ec8a239427c8f7e9f6d864c5085372b0e6.tar.gz
vyos-1x-1c74d7ec8a239427c8f7e9f6d864c5085372b0e6.zip
config load: T2053: update for version string syntax change
Diffstat (limited to 'src/helpers/vyos-load-config.py')
-rwxr-xr-xsrc/helpers/vyos-load-config.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/helpers/vyos-load-config.py b/src/helpers/vyos-load-config.py
index 4e6d67efa..693529c23 100755
--- a/src/helpers/vyos-load-config.py
+++ b/src/helpers/vyos-load-config.py
@@ -28,7 +28,7 @@ import tempfile
import vyos.defaults
import vyos.remote
from vyos.config import Config, VyOSError
-from vyos.migrator import Migrator, MigratorError
+from vyos.migrator import Migrator, VirtualMigrator, MigratorError
system_config_file = 'config.boot'
@@ -73,6 +73,12 @@ with tempfile.NamedTemporaryFile() as fp:
with open(fp.name, 'w') as fd:
fd.write(config_file)
+ virtual_migration = VirtualMigrator(fp.name)
+ try:
+ virtual_migration.run()
+ except MigratorError as err:
+ sys.exit('{}'.format(err))
+
migration = Migrator(fp.name)
try:
migration.run()