forked from ansible/ansible
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling of configurations blocks with end-* at the end of the block (a…
…nsible#39673) * handle end-policy issue * revert changes in iosxr cliconf * fix trailing parents not included in difference * Moving fix to platform specific fix * pep 8 issues
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
test/integration/targets/iosxr_config/templates/basic/change_prefix_set.j2
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
prefix-set ebpg_filter | ||
192.168.0.0/16 ge 15 le 30 | ||
end-set | ||
|
||
interface Loopback999 | ||
description this is a test interface for prefix-set | ||
|
3 changes: 3 additions & 0 deletions
3
test/integration/targets/iosxr_config/templates/basic/init_prefix_set.j2
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
prefix-set ebpg_filter | ||
192.168.0.0/16 ge 17 le 30 | ||
end-set |
27 changes: 27 additions & 0 deletions
27
test/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- debug: msg="START cli/misplaced_sublevel.yaml on connection={{ ansible_connection }}" | ||
|
||
- name: setup | ||
iosxr_config: | ||
src: basic/init_prefix_set.j2 | ||
ignore_errors: yes | ||
|
||
- name: Change prefix-set and new command after prefix-set | ||
iosxr_config: | ||
src: basic/change_prefix_set.j2 | ||
register: result | ||
|
||
- assert: | ||
that: | ||
- "result.changed == true" | ||
|
||
- name: Play same config again to verify no diff in prefix-set also works | ||
iosxr_config: | ||
src: basic/change_prefix_set.j2 | ||
register: result | ||
|
||
- assert: | ||
that: | ||
- "result.changed == true" | ||
|
||
- debug: msg="END cli/misplaced_sublevel.yaml on connection={{ ansible_connection }}" |