Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/module/routing-policy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can use these routing policy **set** parameters on devices supported by the
| Arista EOS | ✅ | ✅ | ✅ | ✅ | ✅ |
| Aruba AOS-CX | ✅ | ✅ | ✅ | ✅ | ✅ |
| Cisco IOS XE[^18v] | ✅ | ✅ | ✅ | ✅ | ✅ |
| Cisco IOS XR[^XR] | ✅ | ✅ | ✅ | ✅ | |
| Cisco IOS XR[^XR] | ✅ | ✅ | ✅ | ✅ | |
| Cumulus Linux | ✅ | ✅ | ✅ | ✅ | ✅ |
| Dell OS10 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Junos | ✅ | ✅ | ✅ | ❌ | ✅ |
Expand All @@ -100,6 +100,7 @@ The **set.community** attribute can be used to set these BGP communities on supp
| Arista EOS | ✅ | ✅ | ✅ |
| Aruba AOS-CX | ✅ | ❌ | ❌ |
| Cisco IOS XE[^18v] | ✅ | ❌ | ❌ |
| Cisco IOS XR[^XR] | ✅ | ✅ | ❌ |
| Cumulus Linux | ✅ | ✅ | ✅ |
| Dell OS10 | ✅ | ❌ | ✅ |
| Junos | ✅ | ✅ | ✅ |
Expand All @@ -112,7 +113,8 @@ In addition to setting BGP communities on BGP routes, these devices can perform
|---------------------|:--:|:--:|:--:|:--:|
| Arista EOS | ✅ | ✅ | ✅ | ✅ |
| Aruba AOS-CX | ✅ | ✅ | ❌ | ❌ |
| Cisco IOS/XE[^18v] | ✅ | ✅❗️| ✅ | ❌ |
| Cisco IOS XE[^18v] | ✅ | ✅❗️| ✅ | ❌ |
| Cisco IOS XR[^XR] | ✅ | ✅ | ❌ | ❌ |
| Cumulus Linux | ✅ | ❌ | ❌ | ❌ |
| Dell OS10 | ✅ | ❌ | ❌ | ❌ |
| Junos | ✅ | ✅ | ✅ | ✅ |
Expand Down
23 changes: 22 additions & 1 deletion netsim/ansible/templates/routing/iosxr/policy.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,34 @@ route-policy {{ pname }}
{% endif %}
{% endif %}
{% endif %}
{#
Set communities -- implemented with a loop to deal with various community types
#}
{% for c_kw,c_value in p_entry.set.community|default({})|dictsort %}
{% set add_kw = ' additive' if p_entry.set.community.append|default(False) else '' %}
{% if c_kw == 'standard' %}
set community ({{ c_value|join(",") }}){{ add_kw }}
{% elif c_kw == 'large' %}
set large-community ({{ c_value|join(",") }}){{ add_kw }}
{% endif %}
Comment thread
ipspace marked this conversation as resolved.
{% endfor %}
{#
Delete communities -- implemented with a loop to deal with various community types
#}
{% for c_kw,c_value in p_entry.delete.community|default({})|dictsort %}
{% if c_kw == 'standard' %}
delete community in ({{ c_value|join(",") }})
{% elif c_kw == 'large' %}
delete large-community in ({{ c_value|join(",") }})
{% endif %}
{% endfor %}
{#
Process action
#}
{% if p_entry.action|default('permit') == 'deny' %}
drop
{% else %}
{% if 'set' not in p_entry %}
{% if 'set' not in p_entry and 'delete' not in p_entry %}
pass
{% endif %}
{# Emulate route maps -- every matching entry concludes the processing #}
Expand Down
10 changes: 9 additions & 1 deletion netsim/devices/xr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ features:
routing:
policy:
set:
community:
standard: True
large: True
append: True
locpref: True
med: True
weight: True
prepend: True
weight: True
delete:
community:
standard: True
large: True
match:
prefix: True
prefix: True
Expand Down