diff options
| author | Oleksandr Kuchmystyi <o.kuchmystyi@vyos.io> | 2026-02-13 11:04:37 +0300 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-02-15 13:12:49 +0100 |
| commit | c536954a6a666f59185669cffa9efa79a601673c (patch) | |
| tree | 917eb28ab3f34a0abe4a6bf9c4bf7cd0902934fb /src/migration-scripts/vpp | |
| parent | 4cc7959877a75bf01231aeec6dfd8c3b93660ba1 (diff) | |
| download | vyos-1x-c536954a6a666f59185669cffa9efa79a601673c.tar.gz vyos-1x-c536954a6a666f59185669cffa9efa79a601673c.zip | |
vpp: T8258: Move `poll-sleep-usec` out of `unix` section
Instead of `vpp settings unix poll-sleep-usec`
use `vpp settings poll-sleep-usec`.
Diffstat (limited to 'src/migration-scripts/vpp')
| -rw-r--r-- | src/migration-scripts/vpp/7-to-8 | 13 |
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) |
