Skip to content

Commit

Permalink
Merge pull request #2637 from sever-sever/5823
Browse files Browse the repository at this point in the history
T5823: Add recursive_defaults for BGP get_config dictionary
  • Loading branch information
c-po authored Dec 14, 2023
2 parents 2de7be3 + 4d54457 commit c2bbfc0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/conf_mode/protocols_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ def get_config(config=None):

# eqivalent of the C foo ? 'a' : 'b' statement
base = vrf and ['vrf', 'name', vrf, 'protocols', 'bgp'] or base_path
bgp = conf.get_config_dict(base, key_mangling=('-', '_'),
get_first_key=True, no_tag_node_value_mangle=True)
bgp = conf.get_config_dict(
base,
key_mangling=('-', '_'),
get_first_key=True,
no_tag_node_value_mangle=True,
with_recursive_defaults=True,
)

bgp['dependent_vrfs'] = conf.get_config_dict(['vrf', 'name'],
key_mangling=('-', '_'),
Expand Down

0 comments on commit c2bbfc0

Please sign in to comment.