Add support for multiple custom_structured_configuration prefixes #646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Allow multi layered custom_structured_configuration and more flexible naming.
Types of changes
Related Issue(s)
Component(s) name
eos_l3ls_evpn
Proposed changes
custom_structured_configuration_prefix
allows the user to customize the prefix for Custom Structured Configuration variables.Default value is
custom_structured_configuration_
. Default value iscustom_structured_configuration_
. Remember to include any delimiter like the last_
in this case.It is possible to specify a list of prefixes, which will all be merged one by one. The order of merge will start from beginning of the list, which means that keys defined in the later prefixes will be able to override keys defined in previous ones.
Example using multiple prefixes:
In this example
Ethernet4000
will be added to theethernet_interfaces
dictionary in the Structured Configuration and the ip_address will be10.3.2.1/21
since ip_adddress was overridden on the latercustom_scructured_configuration_prefix
How to test
Tested with my test repo: https://github.com/ClausHolbechArista/claus-l3ls-dev/commits/superspine-alternative
Following commits show each test scenario.
Checklist:
pre-commit
,make linting
andmake sanity-lint
).