diff --git a/tests/conftest.py b/tests/conftest.py index 8f9ec4b0af2..6449f6426ac 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,7 @@ Pytest fixtures: High level Resource Management and base setup fixtures """ import datetime +import json import os import random import string @@ -891,6 +892,16 @@ def collect_logs(): # Adding memory Profile code after every test completion output = ap_ssh.get_memory_profile() allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + # Adding Ifconfig, ip route show and ip addr show commands info after every test completion + output = ap_ssh.run_generic_command(cmd="ifconfig") + output = '\n'.join(output) + allure.attach(name="ifconfig after every test completion", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip route show") + output = '\n'.join(output) + allure.attach(name="ip route show after every test completion", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip addr show") + output = '\n'.join(output) + allure.attach(name="ip addr show after every test completion", body=str(output)) request.addfinalizer(collect_logs) diff --git a/tests/fixtures_2x.py b/tests/fixtures_2x.py index 86df02a42e1..78620601c18 100644 --- a/tests/fixtures_2x.py +++ b/tests/fixtures_2x.py @@ -701,6 +701,17 @@ def setup_profiles(self, request, param, setup_controller, testbed, get_equipmen output = ap_ssh.get_memory_profile() allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + #Adding Ifconfig, ip route show and ip addr show commands info before applying config + output = ap_ssh.run_generic_command(cmd="ifconfig") + output = '\n'.join(output) + allure.attach(name="ifconfig before applying config", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip route show") + output = '\n'.join(output) + allure.attach(name="ip route show before applying config", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip addr show") + output = '\n'.join(output) + allure.attach(name="ip addr show before applying config", body=str(output)) + time_1 = time.time() # Apply config @@ -833,6 +844,16 @@ def setup_profiles(self, request, param, setup_controller, testbed, get_equipmen # Adding memory Profile code after applying config output = ap_ssh.get_memory_profile() allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + # Adding Ifconfig, ip route show and ip addr show commands info after applying config + output = ap_ssh.run_generic_command(cmd="ifconfig") + output = '\n'.join(output) + allure.attach(name="ifconfig after applying config", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip route show") + output = '\n'.join(output) + allure.attach(name="ip route show after applying config", body=str(output)) + output = ap_ssh.run_generic_command(cmd="ip addr show") + output = '\n'.join(output) + allure.attach(name="ip addr show after applying config", body=str(output)) def teardown_session(): wifi_status = ap_ssh.get_wifi_status()