ansible/test/integration/targets/nxos_vsan/tests/common/sanity.yaml
Suhas Bharadwaj 0a04a5efc2 adding the modules to /nxos/storage/ folder (#64269)
* adding the modules to /nxos/storage/ folder

* fix pep8 stuff

* fixed provider specific information from doc

* Fix integration tests

* Added tested against note

* Review comments

* added assertions for the commands sent in the integration tests
2019-12-16 14:44:33 +05:30

50 lines
1.5 KiB
YAML

---
- debug: msg="START nxos_vsan sanity test with connection={{ ansible_connection }} "
- debug: msg="Using vsans {{ vsan1 }}, {{ vsan2 }} for running this sanity test, please make sure these are not used in the setup, these will be deleted after the tests"
- block:
- name: Setup - Remove vsan if configured
nxos_vsan: &remove
vsan:
- { id: "{{ vsan1 | int }}", remove: True}
- { id: "{{ vsan2 | int }}", remove: True}
ignore_errors: yes
- name: Configure vsan
nxos_vsan: &config
vsan:
- id: "{{ vsan1 | int }}"
name: vsan-SAN-A
suspend: True
interface:
- "{{intA1}}"
remove: False
- id: "{{ vsan2 | int }}"
name: vsan-SAN-B
interface:
- "{{intB1}}"
remove: False
register: result
- assert: &true
that:
- result.changed == true
- assert:
that:
- result.commands == ["terminal dont-ask", "vsan database", "vsan 922", "vsan 922 name vsan-SAN-A", "vsan 922 suspend", "vsan 922 interface fc1/1", "vsan 923", "vsan 923 name vsan-SAN-B", "no vsan 923 suspend", "vsan 923 interface fc1/2", "no terminal dont-ask"]
- name: Idempotence Check
nxos_vsan: *config
register: result
- assert: &false
that:
- result.changed == false
- assert:
that:
- result.commands == []
always:
- name: Remove vsan config
nxos_vsan: *remove