Open alagoutte opened 7 months ago
add example using Aruba OS OVA (10.10 and 10.11) :
alagoutte@ALG-Ansible:~/aoscx/tests/integration$ansible-test network-integration
Running aoscx_vrf integration test role
[WARNING]: running playbook inside collection arubanetworks.aoscx
[WARNING]: An error occurred while calling ansible.utils.display.initialize_locale (unsupported locale setting). This may result in incorrectly calculated text widths that can cause Display to print incorrect line lengths
PLAY [aoscx] *************************************************************************************************************************************************************************************************************************************************************************
TASK [aoscx_vrf : collect all api test cases] ****************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : set test_items] ****************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : run test cases (connection=arubanetworks.aoscx.aoscx, network_os=arubanetworks.aoscx.aoscx)] ***********************************************************************************************************************************************************************
included: /home/alagoutte/.ansible/collections/ansible_collections/arubanetworks/aoscx/tests/output/.tmp/integration/aoscx_vrf-iiu1nax2-ÅÑŚÌβŁÈ/tests/integration/targets/aoscx_vrf/tests/api/delete.yaml for 10.200.4.110, 10.200.4.111 => (item=/home/alagoutte/.ansible/collections/ansible_collections/arubanetworks/aoscx/tests/output/.tmp/integration/aoscx_vrf-iiu1nax2-ÅÑŚÌβŁÈ/tests/integration/targets/aoscx_vrf/tests/api/delete.yaml)
included: /home/alagoutte/.ansible/collections/ansible_collections/arubanetworks/aoscx/tests/output/.tmp/integration/aoscx_vrf-iiu1nax2-ÅÑŚÌβŁÈ/tests/integration/targets/aoscx_vrf/tests/api/create.yaml for 10.200.4.110, 10.200.4.111 => (item=/home/alagoutte/.ansible/collections/ansible_collections/arubanetworks/aoscx/tests/output/.tmp/integration/aoscx_vrf-iiu1nax2-ÅÑŚÌβŁÈ/tests/integration/targets/aoscx_vrf/tests/api/create.yaml)
TASK [aoscx_vrf : debug] *************************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"msg": "START aoscx_vrf delete integration tests on connection=arubanetworks.aoscx.aoscx"
}
ok: [10.200.4.111] => {
"msg": "START aoscx_vrf delete integration tests on connection=arubanetworks.aoscx.aoscx"
}
TASK [aoscx_vrf : Remove VRF] ********************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.111]
ok: [10.200.4.110]
TASK [aoscx_vrf : Create VRF] ********************************************************************************************************************************************************************************************************************************************************
changed: [10.200.4.110]
changed: [10.200.4.111]
TASK [aoscx_vrf : Delete vrf] ********************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Get vrf facts] *****************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Assert if vrf is always present] ***********************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"changed": false,
"msg": "All assertions passed"
}
ok: [10.200.4.111] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [aoscx_vrf : Delete vrf (idempotent)] *******************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Assert that the previous task was idempotent] **********************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"changed": false,
"msg": "All assertions passed"
}
ok: [10.200.4.111] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [aoscx_vrf : Remove VRF] ********************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : debug] *************************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"msg": "START aoscx_vrf create integration tests on connection=arubanetworks.aoscx.aoscx"
}
ok: [10.200.4.111] => {
"msg": "START aoscx_vrf create integration tests on connection=arubanetworks.aoscx.aoscx"
}
TASK [aoscx_vrf : Remove VRF] ********************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Create vrf] ********************************************************************************************************************************************************************************************************************************************************
changed: [10.200.4.110]
changed: [10.200.4.111]
TASK [aoscx_vrf : Get vrf facts] *****************************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Assert if vrf is not created] **************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"changed": false,
"msg": "All assertions passed"
}
ok: [10.200.4.111] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [aoscx_vrf : Create vrf (idempotent)] *******************************************************************************************************************************************************************************************************************************************
ok: [10.200.4.110]
ok: [10.200.4.111]
TASK [aoscx_vrf : Assert that the previous task was idempotent] **********************************************************************************************************************************************************************************************************************
ok: [10.200.4.110] => {
"changed": false,
"msg": "All assertions passed"
}
ok: [10.200.4.111] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [aoscx_vrf : Remove VRF] ********************************************************************************************************************************************************************************************************************************************************
changed: [10.200.4.110]
changed: [10.200.4.111]
PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************************************
10.200.4.110 : ok=21 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
10.200.4.111 : ok=21 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
@karthikeyan-dhandapani @kchavesr @tchiapuziowong can you look ?
use ansible-test network-integration for launch test
You need before to copy inventory.networking.template to inventory.networking (on integration folder) and modify for add your target
You can look https://docs.ansible.com/ansible/latest/network/dev_guide/developing_resource_modules_network.html#id18 for more info