Prefix List Configuration
Template File for Prefix List
ocnos_prefix_list.j2
{%if prefix_list is defined %}
{% for prefixlist in prefix_list.params -%}
{% if prefixlist.eq is defined %}
ip prefix-list {{ prefixlist.name }}
{{prefixlist.seq_no}} {{prefixlist.permission}}
{{prefixlist.prefix}} eq {{ prefixlist.eq }}
{% else %}
ip prefix-list {{ prefixlist.name }}
{{prefixlist.seq_no}} {{prefixlist.permission}} {{prefixlist.prefix}}
{% endif %}
!
{% endfor %} end
{%endif%}
Sample Parameter File for Prefix List
sw2.yml
prefix_list: | prefix-list configurations |
params: | prefix-list parameters configuration |
- name: only_lo | Configures the name of the prefix-list |
seq_no: seq 5 | Configures the sequence no. to give the priority to the matched |
prefixes | |
permission: permit | Configure the permission type as permit for prefix-list |
prefix: 36.0.0.1/24 | Configure the prefix to matched |
eq: 32 | If defined it wiill confgigure the Exact prefix length to be matched as 32 |
Last modified date: 06/08/2023