diff options
author | Ganesh Nalawade <ganesh634@gmail.com> | 2017-07-18 08:44:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 08:44:10 +0200 |
commit | b8cd646afd256b56ddc57e1fc38b0f142232710c (patch) | |
tree | 1fd2b54dd6e9b4c772cbecc3837df3bf48fe0528 /test/integration/targets/junos_lldp | |
parent | [Fixes #26690] Supports Python 3 handling of base64 encoding (#26876) (diff) | |
download | ansible-b8cd646afd256b56ddc57e1fc38b0f142232710c.tar.xz ansible-b8cd646afd256b56ddc57e1fc38b0f142232710c.zip |
net_lldp_interface module implementation for junos (#26915)
* junos_lldp_interface module implementation
* junos_lldp_interface integration test
* net_lldp_interface module intgration test for junos
* Add lldp configuration parameter in junos_lldp
* Modify junos_lldp testcase as per above change
* Add net_lldp_interface module documentation
Diffstat (limited to 'test/integration/targets/junos_lldp')
-rw-r--r-- | test/integration/targets/junos_lldp/tests/netconf/basic.yaml | 82 |
1 files changed, 75 insertions, 7 deletions
diff --git a/test/integration/targets/junos_lldp/tests/netconf/basic.yaml b/test/integration/targets/junos_lldp/tests/netconf/basic.yaml index 5d6dc2ae48..1213921b2e 100644 --- a/test/integration/targets/junos_lldp/tests/netconf/basic.yaml +++ b/test/integration/targets/junos_lldp/tests/netconf/basic.yaml @@ -1,12 +1,12 @@ --- - debug: msg="START junos_lldp netconf/basic.yaml" -- name: setup - remove lldp +- name: setup - Disable lldp and remove it's configuration junos_lldp: state: absent provider: "{{ netconf }}" -- name: configure lldp +- name: Enable lldp junos_lldp: state: present provider: "{{ netconf }}" @@ -15,9 +15,8 @@ - assert: that: - "result.changed == true" - - "'[edit]\n- protocols {\n- lldp {\n- disable;\n- }\n- }' in result.diff.prepared" -- name: configure lldp (idempotent) +- name: Enable lldp (idempotent) junos_lldp: state: present provider: "{{ netconf }}" @@ -27,8 +26,74 @@ that: - "result.changed == false" -- name: Disable lldp +- name: configure lldp parameters and enable lldp junos_lldp: + interval: 10 + hold_multiplier: 5 + transmit_delay: 30 + state: present + provider: "{{ netconf }}" + register: result + +- assert: + that: + - "result.changed == true" + - "'+ advertisement-interval 10;' in result.diff.prepared" + - "'+ transmit-delay 30;' in result.diff.prepared" + - "'+ hold-multiplier 5;' in result.diff.prepared" + +- name: configure lldp parameters and enable lldp(idempotent) + junos_lldp: + interval: 10 + hold_multiplier: 5 + transmit_delay: 30 + state: present + provider: "{{ netconf }}" + register: result + +- assert: + that: + - "result.changed == false" + +- name: configure lldp parameters and disable lldp + junos_lldp: + interval: 10 + hold_multiplier: 5 + transmit_delay: 30 + state: disabled + provider: "{{ netconf }}" + register: result + +- assert: + that: + - "result.changed == true" + - "'+ disable;' in result.diff.prepared" + - "'advertisement-interval 10;' not in result.diff.prepared" + - "'transmit-delay 30;' not in result.diff.prepared" + - "'hold-multiplier 5;' not in result.diff.prepared" + +- name: configure lldp parameters and enable lldp + junos_lldp: + interval: 10 + hold_multiplier: 5 + transmit_delay: 30 + state: enabled + provider: "{{ netconf }}" + register: result + +- assert: + that: + - "result.changed == true" + - "'- disable;' in result.diff.prepared" + - "'advertisement-interval 10;' not in result.diff.prepared" + - "'transmit-delay 30;' not in result.diff.prepared" + - "'hold-multiplier 5;' not in result.diff.prepared" + +- name: Remove lldp configuration and diable lldp + junos_lldp: + interval: 10 + hold_multiplier: 5 + transmit_delay: 30 state: absent provider: "{{ netconf }}" register: result @@ -36,9 +101,12 @@ - assert: that: - "result.changed == true" - - "'[edit]\n+ protocols {\n+ lldp {\n+ disable;\n+ }\n+ }' in result.diff.prepared" + - "'+ disable;' in result.diff.prepared" + - "'- advertisement-interval 10;' in result.diff.prepared" + - "'- transmit-delay 30;' in result.diff.prepared" + - "'- hold-multiplier 5;' in result.diff.prepared" -- name: Disable lldp (idempotent) +- name: Remove lldp (idempotent) junos_lldp: state: absent provider: "{{ netconf }}" |