mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)
* diff in as-path-set or prefix-set * fix caveat diff can not have last line with comma in prefix-set/as-path/community-set * Simplify fix to include indentation before parse * remove debugger * route-policy diffs * fix iosxr_config crash issue * new changes in iosxr_config after git add * end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8 * Remaining config blocks of route-policy which needs exclusion from diff. added new tests * pylint/pep8 warnings * Review comments , sanity test fix * shbang warning * remove unused import
This commit is contained in:
parent
096d243526
commit
2db6a8c26a
5 changed files with 374 additions and 28 deletions
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
- debug: msg="START cli/route_policy.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: Cleanup
|
||||
iosxr_config:
|
||||
src: basic/route_policy_clean.j2
|
||||
|
||||
- name: config setup route-policy/prefix-set/as-path-set/community-set
|
||||
iosxr_config:
|
||||
src: basic/route_policy.j2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- name: Configure same route-policy/prefix-set ... verify change=0
|
||||
iosxr_config:
|
||||
src: basic/route_policy.j2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Do a change in multi-sublevel route-policy/prefix-set/community-set
|
||||
iosxr_config:
|
||||
src: basic/route_policy_change.j2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- name: Configure same route-policy/prefix-set ... verify change=0
|
||||
iosxr_config:
|
||||
src: basic/route_policy_change.j2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Cleanup
|
||||
iosxr_config:
|
||||
src: basic/route_policy_clean.j2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- debug: msg="END cli/route_policy.yaml on connection={{ ansible_connection }}"
|
Loading…
Add table
Add a link
Reference in a new issue