ansible/test/integration/targets/iosxr_config/tests/cli/route_policy.yaml
Deepak Agrawal 2db6a8c26a
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
2018-06-05 07:56:53 +05:30

53 lines
1.1 KiB
YAML

---
- 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 }}"