ansible/test/integration/targets/junos_linkagg/tests/netconf/net_linkagg.yaml
Ganesh Nalawade c53dcd1982
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
2018-01-10 21:28:49 +05:30

55 lines
1.3 KiB
YAML

---
- debug: msg="START junos netconf/net_linkagg.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 linkagg
net_linkagg:
name: ae0
members:
- ge-0/0/6
- ge-0/0/7
mode: active
device_count: 4
state: absent
provider: "{{ netconf }}"
- name: configure linkagg using platform agnostic module
net_linkagg:
name: ae0
members:
- ge-0/0/6
- ge-0/0/7
mode: active
device_count: 4
state: present
provider: "{{ netconf }}"
register: result
- name: Get running configuration
junos_rpc:
rpc: get-configuration
provider: "{{ netconf }}"
register: config
- assert:
that:
- "result.changed == true"
- "'<name>ae0</name>' in config.xml"
- "'<device-count>4</device-count>' in config.xml"
- "'<bundle>ae0</bundle>' in config.xml"
- "'<active/>' in config.xml"
- name: teardown - remove linkagg
net_linkagg:
name: ae0
members:
- ge-0/0/6
- ge-0/0/7
mode: active
device_count: 4
state: absent
provider: "{{ netconf }}"
- debug: msg="END junos netconf/net_linkagg.yaml on connection={{ ansible_connection }}"