summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-02-15 13:13:12 +0100
committerGitHub <noreply@github.com>2026-02-15 13:13:12 +0100
commit82461ce7856aaf91d1b8a85ca45080e26783fc5e (patch)
tree917eb28ab3f34a0abe4a6bf9c4bf7cd0902934fb /src
parent4cc7959877a75bf01231aeec6dfd8c3b93660ba1 (diff)
parentc536954a6a666f59185669cffa9efa79a601673c (diff)
downloadvyos-1x-82461ce7856aaf91d1b8a85ca45080e26783fc5e.tar.gz
vyos-1x-82461ce7856aaf91d1b8a85ca45080e26783fc5e.zip
Merge pull request #4986 from alexandr-san4ez/T8258-current
vpp: T8258: Move `poll-sleep-usec` out of `unix` section
Diffstat (limited to 'src')
-rw-r--r--src/migration-scripts/vpp/7-to-813
1 files changed, 11 insertions, 2 deletions
diff --git a/src/migration-scripts/vpp/7-to-8 b/src/migration-scripts/vpp/7-to-8
index 1e95bb43e..fa105a6b5 100644
--- a/src/migration-scripts/vpp/7-to-8
+++ b/src/migration-scripts/vpp/7-to-8
@@ -21,16 +21,24 @@
#
# Delete 'ipsec' node and all settings and replace it with single 'ipsec-acceleration' flag (T8262)
-
from vyos.configtree import ConfigTree
+def _migrate_vpp_unix_settings(config: ConfigTree) -> None:
+ base_path = ['vpp', 'settings']
+ old_base_path = base_path + ['unix']
+ old_path = old_base_path + ['poll-sleep-usec']
+ new_path = base_path + ['poll-sleep-usec']
+
+ if config.exists(old_path):
+ poll_sleep_usec = config.return_value(old_path)
+ config.set(new_path, value=poll_sleep_usec)
+ config.delete(old_base_path)
def _migrate_vpp_log(config: ConfigTree) -> None:
base = ['vpp', 'settings', 'logging']
if config.exists(base + ['default-log-level']):
config.rename(base + ['default-log-level'], 'default-level')
-
def _migrate_vpp_nat44(config: ConfigTree) -> None:
base_path = ['vpp', 'nat44']
new_base_path = ['vpp', 'nat', 'nat44']
@@ -69,6 +77,7 @@ def migrate(config: ConfigTree) -> None:
# Nothing to do
return
+ _migrate_vpp_unix_settings(config)
_migrate_vpp_log(config)
_migrate_vpp_nat44(config)
_migrate_vpp_ipsec(config)