Skip to content

config context input for prefix list #855

Answered by gmazoyer
erikgadioli asked this question in Q&A
Discussion options

You must be logged in to vote

context_get_key returns whatever type the variable is of. Config contexts are Python dictionaries so by getting a value of a given key you will be able to use it as it is intended to. So, in your case, you can do something like:

{% for prefix in session | context_get_key('prefixes-inet') %}
{{ prefix }};
{% endfor %}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@erikgadioli
Comment options

Answer selected by erikgadioli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants