diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-16 15:07:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 15:07:09 +0100 |
commit | dad5c1cd5115bfc87f8abab3238053a3be37f6f5 (patch) | |
tree | 6af3dada0cd814a1669a3ec11d320de37e4caaaf /src/migration-scripts/bgp | |
parent | b2fbff135fe4b83093b36927a8dcaa43ba4ecb9a (diff) | |
parent | 93dc024fccd1b653428f7fe9a1faa4f8e6ba7248 (diff) | |
download | vyos-1x-dad5c1cd5115bfc87f8abab3238053a3be37f6f5.tar.gz vyos-1x-dad5c1cd5115bfc87f8abab3238053a3be37f6f5.zip |
Merge pull request #2835 from vyos/mergify/bp/sagitta/pr-2834
bgp: T5937: fix migration script for IPv6 AFI peer-group (backport #2834)
Diffstat (limited to 'src/migration-scripts/bgp')
-rwxr-xr-x | src/migration-scripts/bgp/0-to-1 | 2 | ||||
-rwxr-xr-x | src/migration-scripts/bgp/1-to-2 | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/migration-scripts/bgp/0-to-1 b/src/migration-scripts/bgp/0-to-1 index 03c45107b..5b8e8a163 100755 --- a/src/migration-scripts/bgp/0-to-1 +++ b/src/migration-scripts/bgp/0-to-1 @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# T3417: migrate IS-IS tagNode to node as we can only have one IS-IS process +# T3417: migrate BGP tagNode to node as we can only have one BGP process from sys import argv from sys import exit diff --git a/src/migration-scripts/bgp/1-to-2 b/src/migration-scripts/bgp/1-to-2 index 96b939b47..a40d86e67 100755 --- a/src/migration-scripts/bgp/1-to-2 +++ b/src/migration-scripts/bgp/1-to-2 @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021-2022 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 @@ -15,6 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # T3741: no-ipv4-unicast is now enabled by default +# T5937: Migrate IPv6 BGP Neighbor Peer Groups from sys import argv from sys import exit @@ -66,6 +67,15 @@ else: if not config.exists(afi_ipv4): config.set(afi_ipv4) +# Migrate IPv6 AFI peer-group +if config.exists(base + ['neighbor']): + for neighbor in config.list_nodes(base + ['neighbor']): + tmp_path = base + ['neighbor', neighbor, 'address-family', 'ipv6-unicast', 'peer-group'] + if config.exists(tmp_path): + peer_group = config.return_value(tmp_path) + config.set(base + ['neighbor', neighbor, 'peer-group'], value=peer_group) + config.delete(tmp_path) + try: with open(file_name, 'w') as f: f.write(config.to_string()) |