diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-03-13 21:08:38 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-03-14 14:46:01 +0100 |
commit | 548d9057e3ed66852bb2be62fe770c265712b4f3 (patch) | |
tree | d973e03f769b151f0a8b75fd4ceadbb76afa7a41 /src/conf_mode/protocols_ospf.py | |
parent | 1d43c2ce2a677454713e9aa93fbb71f3516aa992 (diff) | |
download | vyos-1x-548d9057e3ed66852bb2be62fe770c265712b4f3.tar.gz vyos-1x-548d9057e3ed66852bb2be62fe770c265712b4f3.zip |
vrf: T3344: move dynamic routing protocols under "vrf name <name> protocols"
Instead of having the dynamic routing protocols OSPF and BGP residing under
the "protocols vrf <name> [ospf|bgp]" nodes, rather move them directly under
the "vrf name <name> protocols [ospf|bgp]" node. Now all VRF related parts
are placed under the same root node.
This eases the verify steps tremendously, as we do not need to check wheter a
VRF eists or not, it will always exist as we operate under a child node.
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index 8c2372bd9..e0dc4e7bf 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -24,7 +24,6 @@ from vyos.configdict import dict_merge from vyos.configdict import node_changed from vyos.configverify import verify_route_maps from vyos.configverify import verify_interface_exists -from vyos.configverify import verify_vrf from vyos.template import render_to_string from vyos.util import call from vyos.util import dict_search @@ -50,7 +49,7 @@ def get_config(config=None): base_path = ['protocols', 'ospf'] # eqivalent of the C foo ? 'a' : 'b' statement - base = vrf and ['protocols', 'vrf', vrf, 'ospf'] or base_path + base = vrf and ['vrf', 'name', vrf, 'protocols', 'ospf'] or base_path ospf = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # Assign the name of our VRF context. This MUST be done before the return @@ -141,7 +140,6 @@ def verify(ospf): if not ospf: return None - verify_vrf(ospf) verify_route_maps(ospf) if 'interface' in ospf: |