diff options
author | John Estabrook <jestabro@vyos.io> | 2024-06-23 14:49:52 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-09-11 12:00:57 -0500 |
commit | b82cd064b0fc4ac1b6c22dc5d065fffe8fbbcb7f (patch) | |
tree | 12cd97531a1f84b38e58b11c16f05326a52a7671 /src/helpers | |
parent | efe2508f891282d207d141282815aa81e7db9d34 (diff) | |
download | vyos-1x-b82cd064b0fc4ac1b6c22dc5d065fffe8fbbcb7f.tar.gz vyos-1x-b82cd064b0fc4ac1b6c22dc5d065fffe8fbbcb7f.zip |
migration: T6007: update vyos_net_name
(cherry picked from commit cd347713196cc8b48ea394365501e54a04d5e6e4)
Diffstat (limited to 'src/helpers')
-rwxr-xr-x | src/helpers/vyos_net_name | 10 |
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() |