diff options
author | Christian Breunig <christian@breunig.cc> | 2025-01-18 20:28:16 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2025-02-04 18:09:39 +0100 |
commit | 5a7a9f3a20e19a52572ce1b9b214528b6ce958ce (patch) | |
tree | 2495a4210e82ff8bdaf76e1d01cfd895e931d16b /src/migration-scripts/system/28-to-29 | |
parent | 3f4c6422110c9a242ff3b81abd4f5ac5e01d5ab9 (diff) | |
download | vyos-1x-5a7a9f3a20e19a52572ce1b9b214528b6ce958ce.tar.gz vyos-1x-5a7a9f3a20e19a52572ce1b9b214528b6ce958ce.zip |
syslog: T6989: add possibility to define VRF per remote
Rsyslog supports individual VRFs per omfwd remote entry - so we should support
this, too.
Diffstat (limited to 'src/migration-scripts/system/28-to-29')
-rw-r--r-- | src/migration-scripts/system/28-to-29 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/migration-scripts/system/28-to-29 b/src/migration-scripts/system/28-to-29 index 2ccd4b9c0..ccf7056c4 100644 --- a/src/migration-scripts/system/28-to-29 +++ b/src/migration-scripts/system/28-to-29 @@ -54,6 +54,11 @@ def migrate(config: ConfigTree) -> None: if config.exists(base + ['global']): config.rename(base + ['global'], 'local') + vrf = '' + if config.exists(base + ['vrf']): + vrf = config.return_value(base + ['vrf']) + config.delete(base + ['vrf']) + # Rename host x.x.x.x -> remote x.x.x.x if config.exists(base + ['host']): config.set(base + ['remote']) @@ -61,4 +66,6 @@ def migrate(config: ConfigTree) -> None: for remote in config.list_nodes(base + ['host']): config.copy(base + ['host', remote], base + ['remote', remote]) config.set_tag(base + ['remote']) + if vrf: + config.set(base + ['remote', remote, 'vrf'], value=vrf) config.delete(base + ['host']) |