Cleanup net integration test case for network modules (#34684)

*  Remove platform agnostic net_* test cases.
*  Add minimal platform agnostic test cases to individual
   platform-specific test cases
This commit is contained in:
Ganesh Nalawade 2018-01-10 21:28:49 +05:30 committed by GitHub
commit c53dcd1982
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
181 changed files with 1630 additions and 6246 deletions

View file

@ -0,0 +1,43 @@
---
- debug: msg="START junos netconf/net_vrf.yaml on connection={{ ansible_connection }}"
# Add minimal testcase to check args are passed correctly to
# implementation module and module run is successful.
- name: setup - remove vrf
net_vrf:
name: test-1
state: absent
provider: "{{ netconf }}"
- name: Configure vrf and its parameter using platform agnostic vrf module
net_vrf:
name: test-1
description: test-vrf-1
interfaces:
- ge-0/0/6
- ge-0/0/5
rd: 3.3.3.3:10
target: target:65513:111
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- result.diff.prepared is search("\+ *test-1")
- result.diff.prepared is search("\+ *description test-vrf-1")
- result.diff.prepared is search("\+ *instance-type vrf")
- result.diff.prepared is search("\+ *interface ge-0/0/5.0")
- result.diff.prepared is search("\+ *interface ge-0/0/6.0")
- result.diff.prepared is search("\+ *route-distinguisher 3.3.3.3:10")
- result.diff.prepared is search("\+ *vrf-target target:65513:111")
- name: teardown - remove vrf
net_vrf:
name: test-1
state: absent
provider: "{{ netconf }}"
- debug: msg="START junos netconf/net_vrf.yaml on connection={{ ansible_connection }}"