98269888a9
* Add iosxr_banner implementation module Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Integration test for iosxr_banner Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Unit test for iosxr_banner Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * remove blank line pep8 Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
41 lines
785 B
YAML
41 lines
785 B
YAML
---
|
|
- name: Setup
|
|
iosxr_banner:
|
|
banner: login
|
|
text: |
|
|
Junk login banner
|
|
over multiple lines
|
|
state: present
|
|
provider: "{{ cli }}"
|
|
|
|
- name: remove login
|
|
iosxr_banner:
|
|
banner: login
|
|
state: absent
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
|
|
- debug:
|
|
msg: "{{ result }}"
|
|
|
|
- assert:
|
|
that:
|
|
- "result.changed == true"
|
|
- "'no banner login' in result.commands"
|
|
|
|
- name: remove login (idempotent)
|
|
iosxr_banner:
|
|
banner: login
|
|
state: absent
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result.changed == false"
|
|
- "result.commands | length == 0"
|
|
|
|
|
|
# FIXME add in tests for everything defined in docs
|
|
# FIXME Test state:absent + test:
|
|
# FIXME Without powers ensure "privileged mode required"
|