summaryrefslogtreecommitdiff
path: root/src/helpers/vyos_net_name
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-23 14:49:52 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-06-26 15:45:19 -0500
commitcd347713196cc8b48ea394365501e54a04d5e6e4 (patch)
tree9a3be6a8afbf5ba97df4a25cf9f69fc71b7b41fa /src/helpers/vyos_net_name
parentf67753bf10ac217040aa7d86117fb44c7b743327 (diff)
downloadvyos-1x-cd347713196cc8b48ea394365501e54a04d5e6e4.tar.gz
vyos-1x-cd347713196cc8b48ea394365501e54a04d5e6e4.zip
migration: T6007: update vyos_net_name
Diffstat (limited to 'src/helpers/vyos_net_name')
-rwxr-xr-xsrc/helpers/vyos_net_name10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/helpers/vyos_net_name b/src/helpers/vyos_net_name
index 8c0992414..518e204f9 100755
--- a/src/helpers/vyos_net_name
+++ b/src/helpers/vyos_net_name
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021-2023 VyOS maintainers and contributors
+# Copyright (C) 2021-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -26,7 +26,7 @@ from vyos.configtree import ConfigTree
from vyos.defaults import directories
from vyos.utils.process import cmd
from vyos.utils.boot import boot_configuration_complete
-from vyos.migrator import VirtualMigrator
+from vyos.migrate import ConfigMigrate
vyos_udev_dir = directories['vyos_udev_dir']
vyos_log_dir = '/run/udev/log'
@@ -147,8 +147,10 @@ def get_configfile_interfaces() -> dict:
with tempfile.NamedTemporaryFile() as fp:
with open(fp.name, 'w') as fd:
fd.write(config_file)
- virtual_migration = VirtualMigrator(fp.name)
- virtual_migration.run()
+ config_migrate = ConfigMigrate(fp.name)
+ if config_migrate.syntax_update_needed():
+ config_migrate.update_syntax()
+ config_migrate.write_config()
with open(fp.name) as fd:
config_file = fd.read()