diff options
author | John Estabrook <jestabro@vyos.io> | 2025-05-05 13:16:54 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2025-05-05 13:50:46 -0500 |
commit | 40c82fd472c4961e506acea86461833e9b244f98 (patch) | |
tree | 96767a6db1cdc9d4c368e57c30940b0ca626292c /src/migration-scripts | |
parent | 53ce5e378ace1d94dedeba0d84c353fbb3b59433 (diff) | |
download | vyos-1x-40c82fd472c4961e506acea86461833e9b244f98.tar.gz vyos-1x-40c82fd472c4961e506acea86461833e9b244f98.zip |
T7417: check existence of table setting before return_value
Migration from 1.3.x may not contain table entries, later required.
The migration script should not fail with error, leaving enforcement to
config scripts.
Diffstat (limited to 'src/migration-scripts')
-rw-r--r-- | src/migration-scripts/vrf/2-to-3 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/migration-scripts/vrf/2-to-3 b/src/migration-scripts/vrf/2-to-3 index acacffb41..5f396e7ed 100644 --- a/src/migration-scripts/vrf/2-to-3 +++ b/src/migration-scripts/vrf/2-to-3 @@ -76,7 +76,8 @@ def migrate(config: ConfigTree) -> None: # Get a list of all currently used VRFs and tables vrfs_current = {} for vrf in config.list_nodes(base): - vrfs_current[vrf] = int(config.return_value(base + [vrf, 'table'])) + if config.exists(base + [vrf, 'table']): + vrfs_current[vrf] = int(config.return_value(base + [vrf, 'table'])) # Check VRF names and table numbers name_regex = re.compile(r'^\d.*$') |