ansible/test/integration/targets/eos_static_routes/tests/cli/rendered.yaml
GomathiselviS 726d6455d8
eos static_routes module added (#65480)
* Adding files for RM static_routes

* Added Integration tests

* Added Unit testcases

* Addressed review comments

* corrected lint errors

* corrected documentation errors

* Lint errors

* corrected test/sanity

* corrected documentation for deprecation

* corrected case sensitivity

* Again Documentation eroor

* Lint errors again

* corrected deprecated module in ignoretxt

* added new gethered,rendered,parsed state checks to unit test

* New code broke the old flow-fixed

* Lint errs

* Added check for running_config

* Add rtt testcase

* Fixed unit tcs

* lint errors

* lint errors

* Modified replaced operation behavior

* updated documentation and tests for delete opration

* fixed shippable errors

* review comments and flake8 error fix

* syntax errors fixed
2020-02-25 07:50:27 -05:00

53 lines
1.4 KiB
YAML

---
- debug:
msg: "START eos_static_routes rendered integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
- include_tasks: _populate.yaml
- block:
- name: Structure provided configuration into device specific commands
eos_static_routes: &rendered
config:
- vrf: "testvrf"
address_families:
- afi: 'ipv6'
routes:
- dest: '1120:10::/64'
next_hops:
- interface: Ethernet1
admin_distance: 55
- address_families:
- afi: 'ipv4'
routes:
- dest: '155.55.1.0/24'
next_hops:
- nexthop_grp: testgrp
tag: 100
state: rendered
become: yes
register: result
- name: Assert that correct set of commands were generated
vars:
lines:
- ipv6 route vrf testvrf 1120:10::/64 Ethernet1 55
- ip route 155.55.1.0/24 Nexthop-Group testgrp tag 100
assert:
that:
- "{{ lines | symmetric_difference(result['rendered']) |length == 0 }}"
- name: Structure provided configuration into device specific commands (IDEMPOTENT)
eos_static_routes: *rendered
register: result
- name: Assert that the previous task was idempotent
assert:
that:
- "result['changed'] == false"
always:
- include_tasks: _remove_config.yaml