Skip to content
Snippets Groups Projects
Commit 7f7d3254 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

updates and fixes to policy_options

parent 1aa08419
No related branches found
No related tags found
1 merge request!162promote-p-to-pe role
......@@ -4,23 +4,27 @@
{% include 'policy_options/prefix_lists.j2' %}
{% endwith %}
{% endif %}
{# Communities #}
{% if nokia_po_communities is defined %}
{% with communities_obj=nokia_po_communities %}
{% include 'policy_options/communites.j2' %}
{% include 'policy_options/communities.j2' %}
{% endwith %}
{% endif %}
{# AS paths #}
{% if nokia_po_as_paths is defined %}
{% with as_paths_obj=nokia_po_as_paths %}
{% include 'policy_options/as_paths.j2' %}
{% endwith %}
{% endif %}
{# Policy statements #}
{% if nokia_po_policy_statements is defined %}
{% with policy_obj=nokia_po_policy_statements %}
{% include 'policy_options/policy_statement.j2' %}
{% include 'policy_options/policy_statements.j2' %}
{% endwith %}
{% endif %}
</policy-options>
......@@ -3,6 +3,9 @@
<name>{{ pol.name }}</name>
<entry-type>{{ pol.entry_type }}</entry-type>
{% for entry in pol.entries %}
{% if pol.entry_type == 'named' %}
<named-entry>
{% endif %}
<entry-name>{{ entry.name }}</entry-name>
{% if entry.from is defined %}
<from>
......@@ -20,7 +23,7 @@
{% endif %}
{% if entry.from.prefix_list is defined %}
{% for pl in entry.from.prefix_list %}
<prefix_list>{{ pl }}</prefix_list>
<prefix-list>{{ pl }}</prefix-list>
{% endfor %}
{% endif %}
{% if entry.from.community is defined %}
......@@ -50,13 +53,14 @@
<add>{{ act_v }}</add>
</community>
{% else %}
<{{ act_k }}>{{ act_v }}</{{act_k }}>
<{{ act_k | replace("_", "-") }}>{{ act_v }}</{{act_k | replace("_", "-") }}>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
</action>
</named-entry>
{% endfor %}
</policy-statement>
{% endfor %}
{% endif %}
......@@ -9,6 +9,7 @@
<start-length>{{ prefix.range_start_length }}</start-length>
<end-length>{{ prefix.range_end_length }}</end-length>
{% endif %}
</prefix>
{% endfor %}
</prefix-list>
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment