-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d153418
commit 6ecfd7e
Showing
15 changed files
with
534 additions
and
205 deletions.
There are no files selected for viewing
291 changes: 217 additions & 74 deletions
291
plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 37 additions & 34 deletions
71
tests/integration/targets/iosxr_route_maps/tests/common/_populate_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,41 @@ | ||
--- | ||
- name: "Setup route-policy base configuration" | ||
cisco.iosxr.iosxr_config: | ||
lines: | ||
- "route-policy SIMPLE_GLOBAL_ROUTE_POLICY" | ||
- "apply A_NEW_ROUTE_POLICY" | ||
- "set community (11011:1001) additive" | ||
- "set weight 20000" | ||
- "end-policy" | ||
- "route-policy SIMPLE_CONDITION_ROUTE_POLICY" | ||
- "if destination in SIMPLE_CONDITION_ROUTE_POLICY then" | ||
- "pass" | ||
- "else" | ||
- "drop" | ||
- "endif" | ||
- "end-policy" | ||
- "route-policy COMPLEX_ROUTE_POLICY" | ||
- "if as-path in (ios-regex '_3117_', ios-regex '_600_') then" | ||
- "drop" | ||
- "else" | ||
- "if destination in A_RANDOM_POLICY then" | ||
- "pass" | ||
- "set community (101010:1) additive" | ||
- "else" | ||
- "drop" | ||
- "endif" | ||
- "endif" | ||
- "end-policy" | ||
- "route-policy COMPLEX_CONDITION_ROUTE_POLICY" | ||
- "if community matches-any (9119:1001) or community matches-any (11100:1001) then" | ||
- "drop" | ||
- "else" | ||
- "pass" | ||
- "endif" | ||
- "end-policy" | ||
- name: Populate with simple overridden | ||
cisco.iosxr.iosxr_route_maps: | ||
state: overridden | ||
config: | ||
- else: | ||
else: | ||
drop: true | ||
if: | ||
condition: destination in A_RANDOM_POLICY | ||
pass: true | ||
if: | ||
condition: destination in A_RANDOM_POLICY_DUMMY | ||
drop: true | ||
name: COMPLEX_ROUTE_POLICY | ||
- global: | ||
apply: | ||
- route_policy: A_NEW_ROUTE_POLICY | ||
set: | ||
community: | ||
additive: true | ||
community_name: (11011:1001) | ||
weight: 20000 | ||
name: SIMPLE_GLOBAL_ROUTE_POLICY | ||
- else: | ||
global: | ||
drop: true | ||
if: | ||
condition: destination in SIMPLE_CONDITION_ROUTE_POLICY | ||
pass: true | ||
name: SIMPLE_CONDITION_ROUTE_POLICY | ||
- else: | ||
global: | ||
pass: true | ||
if: | ||
condition: community matches-any (9119:1001) or community matches-any (11100:1001) | ||
drop: true | ||
name: COMPLEX_CONDITION_ROUTE_POLICY | ||
|
||
vars: | ||
ansible_connection: ansible.netcommon.network_cli |
11 changes: 4 additions & 7 deletions
11
tests/integration/targets/iosxr_route_maps/tests/common/_remove_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
--- | ||
- name: "Remove iosxr_route_maps configuration" | ||
cisco.iosxr.iosxr_config: | ||
lines: | ||
- "no route-policy SIMPLE_GLOBAL_ROUTE_POLICY" | ||
- "no route-policy COMPLEX_ROUTE_POLICY" | ||
- "no route-policy SIMPLE_CONDITION_ROUTE_POLICY" | ||
- "no route-policy COMPLEX_CONDITION_ROUTE_POLICY" | ||
- name: Purge all ( risky ) | ||
cisco.iosxr.iosxr_route_maps: | ||
config: [] | ||
state: purged | ||
vars: | ||
ansible_connection: ansible.netcommon.network_cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.