mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-31 10:57:50 +00:00 
			
		
		
		
	 bd97a51bf7
			
		
	
	bd97a51bf7
	
	
	
		
			
			* Added rate-limiting in both android_test and ios_test
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added missing methods
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified as per new framework
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker for channel 11
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added rate-limiting test_cases
* added ow_sanity_lf marker to multipsk & multivlan tests
* Added allure_testcase-links for client_connect in validation_of_operating_modes(bridge,nat,vlan)
* Added ow_sanity_lf marker
* Removed unwanted  ow_sanity_lf marker
* allure suite and titles changed for mpsk & mvlan tests
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added rate_limiting test_cases with jira links in validation_of_operating_mode(bridge,nat,vlan)
* Added rate_radius_info and rate_radius_accounting_info
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified code for two test cases as per new infra
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Addded radius_auth_data radius_acc_data
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added radius_auth_data and radius_acc_data for rate limiting with radius test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added basic-07
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Converted num station in int
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unnecessary interop testbed details from lab_info
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise cleint connect and client connectivity tests in Android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise cleint connect and client connectivity tests in iOS
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new sanity marker for Interop testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise mode client connect test cases in Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added random string addition in Interop testcases for setup profiles ssids
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added random string addition in Interop testcases for setup profiles ssids
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* changed WAN upstream port for interop testbeds
* Added the logic for retest the ucentral connectivity if it is disconnected
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added NAT-WAN
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* gw - get commands api fix
* Removed sanity marker on vlan testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* FIxed issue in DFS
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed allure report name for Enterprise mode
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Pytest exit in case of error when testbed data is not available
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Fixed the string concat from previous commit
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added check_connectivity fixture on every client_connectivity and dfs test  case
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Made some bug fixes on testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed profile data in testcases to match setup params
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fix in manual pytest execution workflow as per master
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fix in sanity workflow as per master
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ssid names in setup params of general test cases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise mode library support for wifi connect
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed Interop sanity marker from test connectivity file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* commented newly added methods for test connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* commented traffic_generator_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed as new infra
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed interop_uc_sanity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed marker description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added needed step for S20,S10 for forget ssid
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Fixed the ap libs command for ucentral restart
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added test controller connectivity
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Changed markers as per pytest.ini
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored dvlan
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added eth table and max station table in allure for test_traffic_generator_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed scope of Interop testcase name fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added the fix for rate limiting test with vlans. Added Access Point connectivity Tests
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Changed scope of get test lib fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added run-lf condition in check_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added test case in the library function of setup_perfecto mobile data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed interop testcase name fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fail msg for Interop tests for better debugging
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added fix for testcase name in setup perfecto data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added check_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored DVLAN
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added lab_info.json back due to unexpected deletion
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added skip-all work with all test cases and removed the broken test cases
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Renoved the unwanted print for getting marker
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Provided vlan id in list
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added proper feature and parent suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11228] Add: manual workflow step with details on namespace (#727)
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* fixed incorrect security parameter in MVLAN test functions
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added Comments on the Library Functions for Proper Understanding
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added 6G RADIO Config data
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Removed the sync_repos.bash as it is not needed now
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added proper suite, subsuite, parent suite, feature, title
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed method name  wifi_capacity to rate_limiting_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refactored dvlan in wpa3_eap
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* old mvlan test files removed
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* marker name corrections in SDK API tests
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* descritpion and marker changes in mvlan tests
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added suite,sub_suite,parent,feature for IN,RU,SG
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Modified as per new freamework and enhanced allure and changed file name to dynamic qos
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed country from CA to US
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added 6g in get_applied_ssid_info method
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed manager ip to localhost
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added FMS Tests
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* added basic-08 & advance-01 info for tunneling
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added improvements around pass and fail for ap connectivity and added basic lab_info format
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added proper feature, parent suite, suite, sub_suite and title
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Toggle-Wifi Button Functionality for both android and ios tests file
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added toggle_wifi_mode test-cases for bridge,nat,vlan modes
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added fix for 2.4g based bssid band data
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* rempved rate_limiting_tests marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored channel vs country code
* Corrected setup_basic_configuration
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added reports dir creation logic
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* vlan id's passed to test functions in mvlan
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* removed security_key from open test case
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fixed scan ssid issue in vlan
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fixed scan ssid issue and wrong security issue
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed vlan id for test_disable_vlan_wpa2_2g test case
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed dataplane_throughput_test marker to dataplane_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed password for controller
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* updated controller credentials in lab-info & tunnel_bash
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Fixed TypeError: can only concatenate str (not dict) to str issue
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent_suite from OpenWifi Dynamic Vlan Test to Dynamic Vlan Test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fix: resolved Pixel 4 scroll down issue, by modifying scrollDown() in android_libs.py
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* reverted old password in controller info
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* IP validation  issue in DVLAN
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Removed traffic_generator_connectivity test case and Modification for allure enhancement
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent suite and suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Renamed dynamic_qos_tests to rate_limiting_with_radius_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent suite to Throughput Benchmark Test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added missing key_mgmt for wp3
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* key_mgmt issue in DVLAN-wpa3e
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added security markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Upd: Docker instructions update (#739)
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* DVLAN admin_up issue
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added pk_passwd and num_stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added num_stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added num_stations, execution_number and In tls added pk_passwd argument
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added max stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added client_scale_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added 6GHz test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added new test channels
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added execution_number in parametrize
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* added new marker for general security mode testcases in Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed one ssid with internet variable logic for Interop android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added proper feature, parent_suite, suite, sub_suite, title in allure report for client_scale_test and dataplane_throughput_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed the teardown logic in android tests
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added global devicemodel in teardown function of Android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added return statement for IP address
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added return statement for IP address
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ip addr of rate limiting radius server to 10.28.3.100
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed ingress-rate to 10 and egress-rate to 5
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added pre-cleanup for deleting existing stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Fix: Docker example command
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Changed RATE LIMITING RADIUS SERVER ip to 10.28.3.100
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added wpa personal and open bridge test cases for client scale test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Toggle Airplane Mode
* Added toggle airplane mode test-cases (NAT, VLAN)
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
* Added toggle airplane mode functionality in perfecto library
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
* Changed teardown func placement in android tests to accomodate perfecto report
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Refactored client-isolation test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* refactored multi-station performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added logic to setup_configuration_data() to support for multi-band combinations
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* allure attachments for client-isolation test_cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* [WIFI-11619] Fix: workflow dependencies
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Dbg: runtime user
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: set files permissions
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Dbg: add step for status
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Adjusted parameters in rate limiting for perfecto interop
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: GitHub Pages dir
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: GitHub Pages dir
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Added extra parameters in rate limiting test to accomodate lanforge testcases in Perfecto Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* [WIFI-11619] Add: README note
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Rectified ssid parameter in Perfecto Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ssid to ssid_name in Interop rate limiting testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed execution number logic (NAT-LAN logic) for NAT mode ttls test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refactored multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Revert "Added logic to setup_configuration_data() to support for multi-band combinations"
This reverts commit cef8a23315.
* Added try and except logic in push_config
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fixed Config sent from Gateway is Received by AP, But not Applied by AP issue and added AP logs during config fails
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed resp is None logic
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Interop sanity marker in connectivity tests
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Updated nat mode & create_vlan parameter for Multi Station Performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added title, suite for multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added table results for multi-station-performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Updated Readme file in wlan-testing
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added check_connectivity arg
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added title,suite for VLAN-multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Refactored rx_sens from rx_sensitivity test to TR-398 Issue 2
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Resolved conflicts in Lab_info.json
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open Passpoint required data in Configuration.py
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open roaming configuration Fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open Roaming support code in Controller libs and tip_2x
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added sample testcase of open roaming for checking
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Comments in Open roaming testcase
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Modified upload_rate for wifi_capacity
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Removed unnecessary Passpoint data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed unnecessary Passpoint data in configuration.py
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Adding new Jira links and Descriptions
Signed-off-by: Rajendra <rajendra.pappu@candelatech.com>
* added passpoint info to tunnel bash
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* created 5g tests for rxsens
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Modified multi station performance udp_download test-cases for test result table
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Deleted wifi_capacity_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added or removed performance marker for performance suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Enhanced allure report for sanity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added sanity test plans and markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unnecessary marker
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Interop Testplan markers in testplan.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed emoji's from testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added emoji's from testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added jira links, description and markers for new sanity testcases
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added markers and description for some more of sanity suite testcases
Signed-off-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
* Added test plans md file in readme.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added test plans md file in readme.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed marker expressions in Testplans.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed wrong duplicate parent_suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added test description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unwanted marker and Added test description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed duplicate function name
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified parent suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified parent suite and feature name
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* modified mode of udaya AP from wifi6 to wifi5
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Logging response info for configuration push
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
Signed-off-by: shivam <shivam.thakur@candelatech.com>
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
Signed-off-by: Rajendra <rajendra.pappu@candelatech.com>
Signed-off-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
Co-authored-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
Co-authored-by: anil-tegala <anil.tegala@candelatech.com>
Co-authored-by: haricharan-jaka <haricharan.jaka@candelatech.com>
Co-authored-by: shivam <shivam.thakur@candelatech.com>
Co-authored-by: karthikaeyetea <karthika.subramani@candelatech.com>
Co-authored-by: Dmitry Dunaev <83591011+dunaev-opsfleet@users.noreply.github.com>
Co-authored-by: Dmitry Dunaev <dmitry@opsfleet.com>
Co-authored-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
Co-authored-by: Rajendra <rajendra.pappu@candelatech.com>
Co-authored-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
		
	
		
			
				
	
	
		
			538 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			538 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| import importlib
 | |
| import json
 | |
| import logging
 | |
| import random
 | |
| import string
 | |
| import time
 | |
| 
 | |
| import allure
 | |
| import paramiko
 | |
| import pytest
 | |
| 
 | |
| setup_lib = importlib.import_module("SetupLibrary")
 | |
| SetupLibrary = setup_lib.SetupLibrary
 | |
| 
 | |
| 
 | |
| class APLIBS:
 | |
|     setup_library_objects = list()
 | |
|     device_under_tests_data = None
 | |
| 
 | |
|     def __init__(self, dut_data=None):
 | |
|         if dut_data is None:
 | |
|             logging.error("Device Under Test Data is Not Specified, Please provide valid DUT Data")
 | |
|             pytest.exit("Device Under Test Data is Not Specified, Please provide valid DUT Data")
 | |
|         if type(dut_data) is not list:
 | |
|             logging.error("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format")
 | |
|             pytest.exit("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format")
 | |
|         self.device_under_tests_data = dut_data
 | |
|         for dut in self.device_under_tests_data:
 | |
|             self.setup_library_objects.append(SetupLibrary(remote_ip=dut["host_ip"],
 | |
|                                                            remote_ssh_port=dut["host_ssh_port"],
 | |
|                                                            remote_ssh_username=dut["host_username"],
 | |
|                                                            remote_ssh_password=dut["host_password"],
 | |
|                                                            pwd=""))
 | |
| 
 | |
|     def ssh_cli_connect(self, ip="",
 | |
|                         port=22,
 | |
|                         username="",
 | |
|                         password="",
 | |
|                         timeout=10,
 | |
|                         allow_agent=False,
 | |
|                         banner_timeout=200):
 | |
|         client = paramiko.SSHClient()
 | |
|         client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
 | |
|         client.connect(ip, username=username, password=password,
 | |
|                        port=port, timeout=timeout, allow_agent=allow_agent, banner_timeout=banner_timeout)
 | |
|         return client
 | |
| 
 | |
|     def check_serial_connection(self, idx=0, print_log=True, attach_allure=True):
 | |
|         status = False
 | |
| 
 | |
|         if self.device_under_tests_data[idx]["method"] == "serial":
 | |
|             status = self.setup_library_objects[idx].check_serial_connection(
 | |
|                 tty=self.device_under_tests_data[idx]["serial_tty"])
 | |
|         if not status:
 | |
|             logging.error("Serial port not available. Exiting the Test")
 | |
|             pytest.exit("Serial port not available. Please check your serial port connection")
 | |
| 
 | |
|     def setup_serial_environment(self, idx=0):
 | |
|         status = []
 | |
|         for dut in self.device_under_tests_data:
 | |
|             if dut["method"] == "serial":
 | |
|                 status.append(self.setup_library_objects[idx].setup_serial_environment())
 | |
|         if False in status:
 | |
|             logging.error("Serial port not available. Exiting the Test")
 | |
|             pytest.exit("Serial port not available. Please check your serial port connection")
 | |
|         self.exit_from_uboot(idx=idx)
 | |
|         self.reset_to_default(idx=idx)
 | |
| 
 | |
|     def get_dut_logs(self, idx=0, print_log=True, attach_allure=True):
 | |
|         output = self.run_generic_command(cmd="logread", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.TEXT)
 | |
|         return output
 | |
| 
 | |
|     def check_connectivity(self, idx=0, print_log=True, attach_allure=True):
 | |
|         maverick_status = self.run_generic_command(cmd="/etc/init.d/maverick status", idx=idx,
 | |
|                                                    print_log=print_log,
 | |
|                                                    attach_allure=attach_allure,
 | |
|                                                    expected_attachment_type=allure.attachment_type.TEXT)
 | |
|         if maverick_status.__contains__("running"):
 | |
|             logging.error("Maverick is running!!!")
 | |
|             # Maverick check is happening
 | |
|             # TODO: add the steps to diagnose the maverick reason, check certificates, wan ip address,
 | |
|             #  check the partition for certificates and check the /certificates dir. Also check if any of the cert is
 | |
|             #  missing, if anything is missing, then report that. if everything looks good, please check md5sum of certs
 | |
|             #  also, try to do a reboot in case everything looks good and post reboot, check the maverick status.
 | |
|             #  Jitendra
 | |
|             # pytest.exit("Maverick is running, Please check the wan connection and certificates")
 | |
|         check_iface = self.run_generic_command(cmd="ifconfig up0v0", idx=idx,
 | |
|                                                print_log=print_log,
 | |
|                                                attach_allure=attach_allure,
 | |
|                                                expected_attachment_type=allure.attachment_type.TEXT)
 | |
|         if check_iface.__contains__("error fetching interface information: Device not found"):
 | |
|             logging.error(check_iface)
 | |
|             pytest.exit("up0v0 interface is not available!!!")
 | |
| 
 | |
|         output = self.run_generic_command(cmd="ip neigh show dev up0v0 REACHABLE", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.TEXT)
 | |
| 
 | |
|         if output.__contains__("INCOMPLETE") or output.__contains__("FAILED"):
 | |
|             logging.error(output)
 | |
|             pytest.fail("up0v0 interface is failed to have connectivity!!!")
 | |
| 
 | |
|     def get_uci_show(self, param="ucentral", idx=0, print_log=True, attach_allure=True):
 | |
|         output = self.run_generic_command(cmd="uci show " + param, idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.TEXT)
 | |
| 
 | |
|         return output
 | |
| 
 | |
|     def restart_ucentral_service(self, idx=0, print_log=True, attach_allure=True):
 | |
|         output = self.run_generic_command(cmd="/etc/init.d/ucentral restart", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.TEXT)
 | |
| 
 | |
|         return output
 | |
| 
 | |
|     def ubus_call_ucentral_status(self, idx=0, print_log=True, attach_allure=True, retry=5):
 | |
|         ret_val = dict.fromkeys(["connected", "latest", "active"])
 | |
|         for i in range(0, retry):
 | |
|             ret_val = dict.fromkeys(["connected", "latest", "active"])
 | |
|             output = self.run_generic_command(cmd="ubus call ucentral status", idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|             try:
 | |
|                 data = dict(json.loads(output.replace("\n\t", "").replace("\n", "")))
 | |
|             except Exception as e:
 | |
|                 logging.error("error in converting the ubus call ucentral status output to json" + output)
 | |
|                 data = {}
 | |
|             if (data.keys().__contains__("connected") or data.keys().__contains__("disconnected")) and \
 | |
|                 data.keys().__contains__("latest") and \
 | |
|                 data.keys().__contains__("active"):
 | |
|                 break
 | |
|             else:
 | |
|                 logging.error("Error in ubus call ucentral status: " + str(output))
 | |
| 
 | |
|         if data.keys().__contains__("connected"):
 | |
|             ret_val["connected"] = True
 | |
|         if data.keys().__contains__("disconnected"):
 | |
|             ret_val["connected"] = False
 | |
|         if data.keys().__contains__("latest"):
 | |
|             ret_val["latest"] = data.get("latest")
 | |
|         if data.keys().__contains__("active"):
 | |
|             ret_val["active"] = data.get("active")
 | |
|         return ret_val
 | |
| 
 | |
|     def get_latest_config_recieved(self, idx=0, print_log=True, attach_allure=True):
 | |
|         r_val = self.ubus_call_ucentral_status(idx=idx)
 | |
|         latest_json = {}
 | |
|         if r_val["latest"] is None:
 | |
|             r_val = self.ubus_call_ucentral_status(idx=idx)
 | |
|             if r_val["latest"] is None:
 | |
|                 logging.error("ubus call ucentral status has unexpected data")
 | |
|                 return False
 | |
|         latest_uuid = r_val["latest"]
 | |
|         output = self.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid), idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         try:
 | |
|             data = dict(json.loads(output.replace("\n\t", "").replace("\n", "")))
 | |
|             logging.info("Latest config is : " + str(data))
 | |
|             allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid),
 | |
|                           body=str(json.dumps(data, indent=2)),
 | |
|                           attachment_type=allure.attachment_type.JSON)
 | |
|         except Exception as e:
 | |
|             data = output
 | |
|             logging.error("error in converting the output to json" + output)
 | |
|             try_again = True
 | |
|             allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid),
 | |
|                           body=str(data),
 | |
|                           attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|         return latest_json
 | |
| 
 | |
|     def get_active_config(self, idx=0, print_log=True, attach_allure=False):
 | |
|         r_val = self.ubus_call_ucentral_status(idx=idx)
 | |
|         active_json = {}
 | |
|         if r_val["active"] is None:
 | |
|             r_val = self.ubus_call_ucentral_status(idx=idx)
 | |
|             if r_val["active"] is None:
 | |
|                 logging.error("ubus call ucentral status has unexpected data")
 | |
|                 return False
 | |
|         active_uuid = r_val["active"]
 | |
|         output = self.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(active_uuid), idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         try:
 | |
|             data = dict(json.loads(output.replace("\n\t", "").replace("\n", "")))
 | |
|             logging.info("Active config is : " + str(data))
 | |
|             allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(active_uuid),
 | |
|                           body=str(json.dumps(data, indent=2)),
 | |
|                           attachment_type=allure.attachment_type.JSON)
 | |
|         except Exception as e:
 | |
|             data = output
 | |
|             logging.error("error in converting the output to json" + output)
 | |
|             try_again = True
 | |
|             allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(active_uuid),
 | |
|                           body=str(data),
 | |
|                           attachment_type=allure.attachment_type.JSON)
 | |
|         print(data)
 | |
| 
 | |
|         return active_json
 | |
| 
 | |
|     def get_iwinfo(self, idx=0, print_log=True, attach_allure=True):
 | |
| 
 | |
|         # [['ssid_wpa2_2g', 'wpa', 'something', '2G'], ['ssid_wpa2_2g', 'wpa', 'something', '5G']] {'wlan0': [
 | |
|         # '"ssid_wpa3_p_5g"', '12:34:56:78:90:12', '5G'], 'wlan1': ['"ssid_wpa3_p_2g"','00:03:7F:12:34:56', '5G']}
 | |
|         iwinfo_output = self.run_generic_command(cmd="iwinfo", idx=idx,
 | |
|                                                  print_log=print_log,
 | |
|                                                  attach_allure=attach_allure,
 | |
|                                                  expected_attachment_type=allure.attachment_type.TEXT)
 | |
| 
 | |
|         return iwinfo_output
 | |
| 
 | |
|     def get_bssid_band_mapping(self, idx=0):
 | |
|         data = self.get_iwinfo(idx=idx)
 | |
|         data = str(data).replace(" ", "").split("\n")
 | |
|         band_info = []
 | |
|         for i in data:
 | |
|             tmp = []
 | |
|             if i.__contains__("AccessPoint"):
 | |
|                 bssid = i.replace("AccessPoint:", "")
 | |
|                 tmp.append(bssid.casefold())
 | |
|             elif i.__contains__("MasterChannel"):
 | |
|                 if i.split(":")[2].__contains__("2.4"):
 | |
|                     tmp.append("2G")
 | |
|                 else:
 | |
|                     tmp.append("5G")
 | |
|             else:
 | |
|                 tmp = []
 | |
|             if tmp != []:
 | |
|                 band_info.append(tmp)
 | |
|         bssi_band_mapping = {}
 | |
|         for i in range(len(band_info)):
 | |
|             if (i % 2) == 0:
 | |
|                 bssi_band_mapping[band_info[i][0]] = band_info[i + 1][0]
 | |
|         return bssi_band_mapping
 | |
| 
 | |
|     def get_ifconfig(self, idx=0):
 | |
|         pass
 | |
| 
 | |
|     def verify_certificates(self, idx=0, print_log=False, attach_allure=False):
 | |
|         cert_files_name = ["cas.pem", "dev-id", "key.pem", "cert.pem"]
 | |
|         for cert in cert_files_name:
 | |
|             output = self.run_generic_command(cmd='[ -f /etc/ucentral/' + cert + ' ] && echo "True" || echo "False"',
 | |
|                                               idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
|             if output == "False":
 | |
|                 logging.error("Certificate " + cert + "is missing from /etc/ucentral/ directory. "
 | |
|                                                       "Please add valid certificates on AP")
 | |
|                 pytest.exit("Certificate " + cert + "is missing from /etc/ucentral/ directory. "
 | |
|                                                     "Please add valid certificates on AP")
 | |
| 
 | |
|     def run_generic_command(self, cmd="", idx=0, print_log=True, attach_allure=False,
 | |
|                             expected_attachment_type=allure.attachment_type.TEXT):
 | |
|         input_command = cmd
 | |
|         logging.info("Executing Command on AP: " + cmd)
 | |
|         try:
 | |
|             self.setup_library_objects[idx].kill_all_minicom_process(
 | |
|                 tty=self.device_under_tests_data[idx]["serial_tty"])
 | |
|             client = self.ssh_cli_connect(ip=self.device_under_tests_data[idx]["host_ip"],
 | |
|                                           port=self.device_under_tests_data[idx]["host_ssh_port"],
 | |
|                                           username=self.device_under_tests_data[idx]["host_username"],
 | |
|                                           password=self.device_under_tests_data[idx]["host_password"],
 | |
|                                           timeout=10,
 | |
|                                           allow_agent=False,
 | |
|                                           banner_timeout=200)
 | |
|             if self.device_under_tests_data[idx]["method"] == "serial":
 | |
|                 owrt_args = "--prompt root@" + self.device_under_tests_data[idx][
 | |
|                     "identifier"] + " -s serial --log stdout --user root --passwd openwifi"
 | |
|                 cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {owrt_args} -t {self.device_under_tests_data[idx]['serial_tty']} --action " \
 | |
|                       f"cmd --value \"{cmd}\" "
 | |
|                 if print_log:
 | |
|                     logging.info(cmd)
 | |
|             stdin, stdout, stderr = client.exec_command(cmd)
 | |
|             output = stdout.read()
 | |
|             final_output = str(output)
 | |
|             if not output.__contains__(b"BOOTLOADER-CONSOLE-IPQ6018#"):
 | |
|                 status = output.decode('utf-8').splitlines()
 | |
|                 status.pop(0)
 | |
|                 final_output = '\n'.join(status)
 | |
|                 if print_log:
 | |
|                     logging.info(cmd)
 | |
|                     logging.info("Output for command: " + input_command + "\n" + final_output)
 | |
|                 if attach_allure:
 | |
|                     allure.attach(name=input_command, body=output, attachment_type=expected_attachment_type)
 | |
|             client.close()
 | |
|         except Exception as e:
 | |
|             logging.error(e)
 | |
|             final_output = "Error: " + str(e)
 | |
|         return final_output
 | |
| 
 | |
|     def get_status(self, idx=0):
 | |
|         pass
 | |
| 
 | |
|     def exit_from_uboot(self, idx=0):
 | |
|         if self.is_console_uboot():
 | |
|             self.run_generic_command(cmd="reset-from-console", idx=idx,
 | |
|                                      print_log=True,
 | |
|                                      attach_allure=True,
 | |
|                                      expected_attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|     def is_console_uboot(self, idx=0):
 | |
|         output = self.run_generic_command(cmd="ubus call ucentral status", idx=idx,
 | |
|                                           print_log=True,
 | |
|                                           attach_allure=True,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         if output.__contains__("BOOTLOADER-CONSOLE-IPQ6018#"):
 | |
|             return True
 | |
|         else:
 | |
|             return False
 | |
| 
 | |
|     def is_autoreboot_running(self):
 | |
|         # TODO : Jitendra/Shivam
 | |
|         pass
 | |
| 
 | |
|     def reboot(self, idx=0):
 | |
|         output = self.run_generic_command(cmd="reboot", idx=idx,
 | |
|                                           print_log=False,
 | |
|                                           attach_allure=False,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         return output
 | |
| 
 | |
|     def get_active_firmware(self, idx=0):
 | |
|         pass
 | |
| 
 | |
|     def reset_to_default(self, idx=0):
 | |
|         self.run_generic_command(cmd="cd", idx=idx,
 | |
|                                  print_log=False,
 | |
|                                  attach_allure=False,
 | |
|                                  expected_attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|     def get_wifi_status(self, idx=0, print_log=True, attach_allure=True):
 | |
|         output = self.run_generic_command(cmd="wifi status", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|         try_again = False
 | |
|         try:
 | |
|             data = dict(json.loads(output.replace("\n\t", "").replace("\n", "")))
 | |
|         except Exception as e:
 | |
|             data = output
 | |
|             logging.error("error in converting the ubus call ucentral status output to json" + output)
 | |
|             try_again = True
 | |
|         if try_again or len(data.keys()) != 3:
 | |
|             output = self.run_generic_command(cmd="wifi status", idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
|             try:
 | |
|                 data = dict(json.loads(output.replace("\n\t", "").replace("\n", "")))
 | |
|             except Exception as e:
 | |
|                 data = output
 | |
|                 logging.error("error in converting the ubus call ucentral status output to json" + output)
 | |
|         ret_val = data
 | |
|         return ret_val
 | |
| 
 | |
|     def get_ap_version(self, idx=0, print_log=True, attach_allure=False):
 | |
|         output = self.run_generic_command(cmd="cat /tmp/ucentral.version", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         return output
 | |
| 
 | |
|     def get_logread(self, start_ref="", stop_ref="", idx=0, print_log=False, attach_allure=False):
 | |
|         output = self.run_generic_command(cmd="logread", idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         log_data = []
 | |
|         data = output.split("\n")
 | |
|         flag = 0
 | |
|         for logs in data:
 | |
|             if logs.__contains__(start_ref):
 | |
|                 flag = 1
 | |
|             if flag == 1:
 | |
|                 log_data.append(logs)
 | |
|             if logs.__contains__(stop_ref):
 | |
|                 flag = 0
 | |
|         ap_logs = "\n".join(log_data)
 | |
|         return ap_logs
 | |
| 
 | |
|     def dfs(self, idx=0, print_log=True, attach_allure=False):
 | |
|         type_ = self.device_under_tests_data[idx]["mode"]
 | |
|         cmd = None
 | |
|         if type_.lower() == "wifi5":
 | |
|             cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"'
 | |
|             output = self.run_generic_command(cmd=cmd1, idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
| 
 | |
|             ret = output.split("\n")
 | |
|             status_count = int(ret.count("True"))
 | |
|             logging.info("Status count: " + str(status_count))
 | |
|             if status_count == 1:
 | |
|                 cmd = "cd && cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
 | |
|             else:
 | |
|                 cmd = "cd && cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar"
 | |
|         elif type_.lower() == "wifi6" or type_.lower() == "wifi6e":
 | |
|             cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar'
 | |
|         output = self.run_generic_command(cmd=cmd, idx=idx,
 | |
|                                           print_log=print_log,
 | |
|                                           attach_allure=attach_allure,
 | |
|                                           expected_attachment_type=allure.attachment_type.JSON)
 | |
|         return output
 | |
| 
 | |
|     def dfs_logread(self, idx=0, print_log=True, attach_allure=False):
 | |
|         """get simulate radar command logs"""
 | |
|         type_ = self.device_under_tests_data[idx]["mode"]
 | |
|         if type_.lower() == "wifi5":
 | |
|             cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"'
 | |
|             output = self.run_generic_command(cmd=cmd1, idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
|             logging.info("DFS logread output: " + str(output))
 | |
|             if output.__contains__("False"):
 | |
|                 cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && logread | grep DFS"
 | |
|             else:
 | |
|                 cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
 | |
|             # cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
 | |
|             # print("cmd: ", cmd)
 | |
|         elif type_.lower() == "wifi6" or type_.lower() == "wifi6e":
 | |
|             cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS'
 | |
|         try:
 | |
|             output = self.run_generic_command(cmd=cmd, idx=idx,
 | |
|                                               print_log=print_log,
 | |
|                                               attach_allure=attach_allure,
 | |
|                                               expected_attachment_type=allure.attachment_type.JSON)
 | |
|             ret = output.split("\n")
 | |
|             logread = ret[-6:]
 | |
|             logs = ""
 | |
|             for i in logread:
 | |
|                 logs = logs + i + "\n"
 | |
|         except Exception as e:
 | |
|             print(e)
 | |
|             logs = ""
 | |
|         logging.info("Simulate radar logs: " + str(logs))
 | |
|         return logs
 | |
| 
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     basic= {
 | |
|         "target": "tip_2x",
 | |
|         "controller": {
 | |
|             "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
 | |
|             "username": "tip@ucentral.com",
 | |
|             "password": "OpenWifi%123"
 | |
|         },
 | |
|         "device_under_tests": [{
 | |
|             "model": "edgecore_eap101",
 | |
|             "supported_bands": ["2G", "5G"],
 | |
|             "supported_modes": ["BRIDGE", "NAT", "VLAN"],
 | |
|             "wan_port": "1.1.eth3",
 | |
|             "lan_port": None,
 | |
|             "ssid": {
 | |
|                 "2g-ssid": "OpenWifi",
 | |
|                 "5g-ssid": "OpenWifi",
 | |
|                 "6g-ssid": "OpenWifi",
 | |
|                 "2g-password": "OpenWifi",
 | |
|                 "5g-password": "OpenWifi",
 | |
|                 "6g-password": "OpenWifi",
 | |
|                 "2g-encryption": "WPA2",
 | |
|                 "5g-encryption": "WPA2",
 | |
|                 "6g-encryption": "WPA3",
 | |
|                 "2g-bssid": "68:7d:b4:5f:5c:31",
 | |
|                 "5g-bssid": "68:7d:b4:5f:5c:3c",
 | |
|                 "6g-bssid": "68:7d:b4:5f:5c:38"
 | |
|             },
 | |
|             "mode": "wifi6",
 | |
|             "identifier": "903cb36c4301",
 | |
|             "method": "serial",
 | |
|             "host_ip": "192.168.52.89",
 | |
|             "host_username": "lanforge",
 | |
|             "host_password": "lanforge",
 | |
|             "host_ssh_port": 22,
 | |
|             "serial_tty": "/dev/ttyUSB0",
 | |
|             "firmware_version": "next-latest"
 | |
|         }],
 | |
|         "traffic_generator": {
 | |
|             "name": "lanforge",
 | |
|             "testbed": "basic",
 | |
|             "scenario": "dhcp-bridge",
 | |
|             "details": {
 | |
|                 "manager_ip": "192.168.52.89",
 | |
|                 "http_port": 8080,
 | |
|                 "ssh_port": 22,
 | |
|                 "setup": {"method": "build", "DB": "Test_Scenario_Automation"},
 | |
|                 "wan_ports": {
 | |
|                     "1.1.eth3": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
 | |
|                         "lease-first": 10,
 | |
|                         "lease-count": 10000,
 | |
|                         "lease-time": "6h"
 | |
|                     }
 | |
|                                  }
 | |
|                 },
 | |
|                 "lan_ports": {
 | |
| 
 | |
|                 },
 | |
|                 "uplink_nat_ports": {
 | |
|                     "1.1.eth2": {
 | |
|                         "addressing": "static",
 | |
|                         "ip": "192.168.52.150",
 | |
|                         "gateway_ip": "192.168.52.1/24",
 | |
|                         "ip_mask": "255.255.255.0",
 | |
|                         "dns_servers": "BLANK"
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|     }
 | |
|     logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.NOTSET)
 | |
|     obj = APLIBS(dut_data=basic["device_under_tests"])
 | |
|     obj.ubus_call_ucentral_status()
 | |
|     # obj.exit_from_uboot()
 | |
|     # obj.setup_serial_environment()
 | |
| 
 | |
|     # obj.verify_certificates()
 | |
|     # obj.get_dut_logs()
 | |
|     # l = obj.get_latest_config_recieved()
 | |
|     # a = obj.get_active_config()
 | |
|     # if a == l:
 | |
|     #     print("a = l")
 | |
|     # print(obj.get_ap_version())
 |