mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
junos implementation of net_lldp (#26872)
* junos_lldp module * junos_lldp integration test * net_lldp integration test for junos * Other minor changes
This commit is contained in:
49
test/integration/targets/junos_lldp/tests/netconf/basic.yaml
Normal file
49
test/integration/targets/junos_lldp/tests/netconf/basic.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
- debug: msg="START junos_lldp netconf/basic.yaml"
|
||||
|
||||
- name: setup - remove lldp
|
||||
junos_lldp:
|
||||
state: absent
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
- name: configure lldp
|
||||
junos_lldp:
|
||||
state: present
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'[edit]\n- protocols {\n- lldp {\n- disable;\n- }\n- }' in result.diff.prepared"
|
||||
|
||||
- name: configure lldp (idempotent)
|
||||
junos_lldp:
|
||||
state: present
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Disable lldp
|
||||
junos_lldp:
|
||||
state: absent
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'[edit]\n+ protocols {\n+ lldp {\n+ disable;\n+ }\n+ }' in result.diff.prepared"
|
||||
|
||||
- name: Disable lldp (idempotent)
|
||||
junos_lldp:
|
||||
state: absent
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
Reference in New Issue
Block a user