File tree Expand file tree Collapse file tree 4 files changed +31
-21
lines changed Expand file tree Collapse file tree 4 files changed +31
-21
lines changed Original file line number Diff line number Diff line change 11<!-- include start from include/version/bgp-version.xml.i -->
2- <syntaxVersion component=' bgp' version=' 7 ' ></syntaxVersion>
2+ <syntaxVersion component=' bgp' version=' 8 ' ></syntaxVersion>
33<!-- include end -->
Original file line number Diff line number Diff line change 5757 </properties >
5858 <children >
5959 #include <include /bgp/protocol-common-config.xml.i>
60- <leafNode name =" system-as" >
61- <properties >
62- <help >Autonomous System Number (ASN) - DEPRECATED</help >
63- <valueHelp >
64- <format >u32:1-4294967294</format >
65- <description >Autonomous System Number</description >
66- </valueHelp >
67- <constraint >
68- <validator name =" numeric" argument =" --range 1-4294967294" />
69- </constraint >
70- </properties >
71- </leafNode >
7260 </children >
7361 </node >
7462 <node name =" eigrp" owner =" ${vyos_conf_scripts_dir}/protocols_eigrp.py $VAR(../../@)" >
Original file line number Diff line number Diff line change 1818from sys import argv
1919
2020from vyos .base import Warning
21- from vyos .base import DeprecationWarning
2221from vyos .config import Config
2322from vyos .configverify import has_frr_protocol_in_dict
2423from vyos .configverify import verify_prefix_list
@@ -219,13 +218,6 @@ def verify(config_dict):
219218 if not system_as :
220219 raise ConfigError (ERR_MSG_GLOBAL_VRF_AS_MISSING )
221220
222- if 'system_as' in bgp :
223- tmp_as = bgp ['system_as' ]
224- DeprecationWarning (f'CLI command "vrf name { vrf } protocols bgp system-as ' \
225- f'{ tmp_as } " is ignored and will be removed in VyOS 1.5! ' \
226- f'\n \n Global "protocols bgp system-as { system_as } " option ' \
227- 'applies, use per neighbor "local-as" option to override.' )
228-
229221 elif 'system_as' not in bgp :
230222 raise ConfigError (ERR_MSG_GLOBAL_VRF_AS_MISSING )
231223
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ #
3+ # Copyright VyOS maintainers and contributors <[email protected] > 4+ #
5+ # This program is free software; you can redistribute it and/or modify
6+ # it under the terms of the GNU General Public License version 2 or later as
7+ # published by the Free Software Foundation.
8+ #
9+ # This program is distributed in the hope that it will be useful,
10+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+ # GNU General Public License for more details.
13+ #
14+ # You should have received a copy of the GNU General Public License
15+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+ # T7760: Remove per VRF setting for system-as option in VyOS 1.5 and onwards
18+
19+ from vyos .configtree import ConfigTree
20+
21+ def migrate (config : ConfigTree ) -> None :
22+ vrf_base = ['vrf' , 'name' ]
23+ if not config .exists (vrf_base ):
24+ return
25+
26+ for vrf in config .list_nodes (vrf_base ):
27+ # bail out early if there is no per VRF BGP instance defined
28+ vrf_bgp_base = vrf_base + [vrf , 'protocols' , 'bgp' ]
29+ if config .exists (vrf_bgp_base + ['system-as' ]):
30+ config .delete (vrf_bgp_base + ['system-as' ])
You can’t perform that action at this time.
0 commit comments