mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 11:28:09 +00:00
* 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>
1770 lines
95 KiB
Python
1770 lines
95 KiB
Python
"""
|
|
|
|
Base Library for Ucentral
|
|
|
|
"""
|
|
import datetime
|
|
import json
|
|
import sys
|
|
import time
|
|
from operator import itemgetter
|
|
from urllib.parse import urlparse
|
|
|
|
import allure
|
|
import pytest
|
|
import requests
|
|
|
|
|
|
# logging.basicConfig(level=logging.DEBUG)
|
|
# from http.client import HTTPConnection
|
|
#
|
|
# HTTPConnection.debuglevel = 1
|
|
# requests.logging.getLogger()
|
|
|
|
|
|
class ConfigureController:
|
|
|
|
def __init__(self, controller_data):
|
|
self.username = controller_data["username"]
|
|
self.password = controller_data["password"]
|
|
self.host = urlparse(controller_data["url"])
|
|
print(self.host)
|
|
self.access_token = ""
|
|
# self.session = requests.Session()
|
|
self.login_resp = self.login()
|
|
self.gw_host, self.fms_host, self.prov_host = self.get_gw_endpoint()
|
|
if self.gw_host == "" or self.fms_host == "" or self.prov_host == "":
|
|
time.sleep(60)
|
|
self.gw_host, self.fms_host, self.prov_host = self.get_gw_endpoint()
|
|
if self.gw_host == "" or self.fms_host == "" or self.prov_host == "":
|
|
self.logout()
|
|
print(self.gw_host, self.fms_host, self.prov_host)
|
|
pytest.exit("All Endpoints not available in Controller Service")
|
|
sys.exit()
|
|
|
|
def build_uri_sec(self, path):
|
|
new_uri = 'https://%s:%d/api/v1/%s' % (self.host.hostname, self.host.port, path)
|
|
print(new_uri)
|
|
return new_uri
|
|
|
|
def build_url_fms(self, path):
|
|
new_uri = 'https://%s:%d/api/v1/%s' % (self.fms_host.hostname, self.fms_host.port, path)
|
|
print(new_uri)
|
|
return new_uri
|
|
|
|
def build_uri(self, path):
|
|
|
|
new_uri = 'https://%s:%d/api/v1/%s' % (self.gw_host.hostname, self.gw_host.port, path)
|
|
print(new_uri)
|
|
return new_uri
|
|
|
|
def build_url_prov(self, path):
|
|
new_uri = 'https://%s:%d/api/v1/%s' % (self.prov_host.hostname, self.prov_host.port, path)
|
|
print(new_uri)
|
|
return new_uri
|
|
|
|
def request(self, service, command, method, params, payload):
|
|
if service == "sec":
|
|
uri = self.build_uri_sec(command)
|
|
elif service == "gw":
|
|
uri = self.build_uri(command)
|
|
elif service == "fms":
|
|
uri = self.build_url_fms(command)
|
|
elif service == "prov":
|
|
uri = self.build_url_prov(command)
|
|
else:
|
|
raise NameError("Invalid service code for request.")
|
|
|
|
print(uri)
|
|
params = params
|
|
if method == "GET":
|
|
resp = requests.get(uri, headers=self.make_headers(), params=params, verify=False, timeout=100)
|
|
elif method == "POST":
|
|
print(uri, payload, params)
|
|
resp = requests.post(uri, params=params, data=payload, headers=self.make_headers(), verify=False,
|
|
timeout=100)
|
|
elif method == "PUT":
|
|
resp = requests.put(uri, params=params, data=payload, verify=False, timeout=100)
|
|
elif method == "DELETE":
|
|
resp = requests.delete(uri, headers=self.make_headers(), params=params, verify=False, timeout=100)
|
|
|
|
self.check_response(method, resp, self.make_headers(), payload, uri)
|
|
|
|
return resp
|
|
|
|
def login(self):
|
|
uri = self.build_uri_sec("oauth2")
|
|
# self.session.mount(uri, HTTPAdapter(max_retries=15))
|
|
payload = json.dumps({"userId": self.username, "password": self.password})
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, "", payload, uri)
|
|
token = resp
|
|
self.access_token = token.json()['access_token']
|
|
resp.close()
|
|
if resp.status_code != 200:
|
|
pytest.exit(str(resp.json()))
|
|
# self.session.headers.update({'Authorization': self.access_token})
|
|
return token
|
|
|
|
def get_gw_endpoint(self):
|
|
uri = self.build_uri_sec("systemEndpoints")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
services = resp.json()
|
|
gw_host = ""
|
|
fms_host = ""
|
|
for service in services['endpoints']:
|
|
if service['type'] == "owgw":
|
|
gw_host = urlparse(service["uri"])
|
|
if service['type'] == "owfms":
|
|
fms_host = urlparse(service["uri"])
|
|
if service['type'] == "owprov":
|
|
prov_host = urlparse(service["uri"])
|
|
return gw_host, fms_host, prov_host
|
|
|
|
def logout(self):
|
|
uri = self.build_uri_sec('oauth2/%s' % self.access_token)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.delete(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("DELETE", resp, self.make_headers(), "", uri)
|
|
r = resp
|
|
resp.close()
|
|
return r
|
|
|
|
def make_headers(self):
|
|
headers = {'Authorization': 'Bearer %s' % self.access_token,
|
|
"Connection": "keep-alive",
|
|
"Content-Type": "application/json",
|
|
"Keep-Alive": "timeout=10, max=1000"
|
|
}
|
|
return headers
|
|
|
|
def check_response(self, cmd, response, headers, data_str, url):
|
|
try:
|
|
print("Command Response: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"Response Code: " + str(response.status_code) + "\n" +
|
|
"Response Body: " + str(response.json()))
|
|
allure.attach(name="Command Response: ", body="Command Response: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"Response Code: " + str(response.status_code) + "\n" +
|
|
"Response Body: " + str(response.json()))
|
|
except:
|
|
pass
|
|
return True
|
|
|
|
|
|
class Controller(ConfigureController):
|
|
|
|
def __init__(self, controller_data=None):
|
|
super().__init__(controller_data)
|
|
|
|
def get_devices(self):
|
|
uri = self.build_uri("devices")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_by_serial_number(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_sdk_version(self):
|
|
uri = self.build_uri("system?command=info")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
version = resp.json()
|
|
return version['version']
|
|
|
|
def get_system_gw(self):
|
|
uri = self.build_uri("system?command=info")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_system_fms(self):
|
|
uri = self.build_url_fms("system?command=info")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_system_prov(self):
|
|
uri = self.build_url_prov("system?command=info")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_uuid(self, serial_number):
|
|
device_info = self.get_device_by_serial_number(serial_number=serial_number)
|
|
device_info = device_info.json()
|
|
return device_info["UUID"]
|
|
|
|
def add_device_to_gw(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_device_from_gw(self, device_name):
|
|
uri = self.build_uri("device/" + device_name)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.delete(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("DELETE", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_commands(self):
|
|
uri = self.build_uri("commands")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_logs(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/logs")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_health_checks(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/healthchecks")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_capabilities(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/capabilities")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_statistics(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/statistics")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_device_status(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/status")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def ap_reboot(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/reboot")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def ap_factory_reset(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/factory")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def ping_device(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/ping")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def led_blink_device(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/leds")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def trace_device(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/trace")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def wifi_scan_device(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/wifiscan")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def request_specific_msg_from_device(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/request")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def event_queue(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/eventqueue")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def telemetry(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number + "/telemetry")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("POST", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_rtty_params(self, serial_number):
|
|
uri = self.build_uri("device/" + serial_number + "/rtty")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
|
|
self.check_response("GET", resp, self.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_device_on_gw(self, serial_number, payload):
|
|
uri = self.build_uri("device/" + serial_number)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100)
|
|
|
|
self.check_response("PUT", resp, self.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
|
|
class FMSUtils:
|
|
|
|
def __init__(self, sdk_client=None, controller_data=None):
|
|
if sdk_client is None:
|
|
self.sdk_client = Controller(controller_data=controller_data)
|
|
self.sdk_client = sdk_client
|
|
|
|
def upgrade_firmware(self, serial="", url=""):
|
|
payload = "{ \"serialNumber\" : " + "\"" + \
|
|
serial + "\"" + " , \"uri\" : " \
|
|
+ "\"" + url \
|
|
+ "\"" + ", \"when\" : 0" \
|
|
+ " }"
|
|
command = "device/" + serial + "/upgrade"
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(command) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(command) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
response = self.sdk_client.request(service="gw", command="device/" + serial + "/upgrade",
|
|
method="POST", params="serialNumber=" + serial,
|
|
payload="{ \"serialNumber\" : " + "\"" + serial + "\"" +
|
|
" , \"uri\" : " + "\"" + url + "\"" +
|
|
", \"when\" : 0" + " }")
|
|
|
|
def ap_model_lookup(self, model=""):
|
|
devices = self.get_device_set()
|
|
model_name = ""
|
|
for device in devices['deviceTypes']:
|
|
if str(device).__eq__(model):
|
|
model_name = device
|
|
return model_name
|
|
|
|
def get_revisions(self):
|
|
response = self.sdk_client.request(service="fms", command="firmwares", method="GET", params="revisionSet=true",
|
|
payload="")
|
|
if response.status_code == 200:
|
|
return response.json()
|
|
else:
|
|
return {}
|
|
|
|
def get_latest_fw(self, model=""):
|
|
|
|
device_type = self.ap_model_lookup(model=model)
|
|
|
|
response = self.sdk_client.request(service="fms", command="firmwares", method="GET",
|
|
params="latestOnly=true&deviceType=" + device_type,
|
|
payload="")
|
|
if response.status_code == 200:
|
|
return response.json()
|
|
else:
|
|
return {}
|
|
|
|
def get_device_set(self):
|
|
response = self.sdk_client.request(service="fms", command="firmwares", method="GET", params="deviceSet=true",
|
|
payload="")
|
|
if response.status_code == 200:
|
|
return response.json()
|
|
else:
|
|
return {}
|
|
|
|
def get_firmwares(self, limit="10000", model="", latestonly="", branch="", commit_id="", offset="3000"):
|
|
|
|
deviceType = self.ap_model_lookup(model=model)
|
|
params = "limit=" + limit + \
|
|
"&deviceType=" + deviceType + \
|
|
"&latestonly=" + latestonly + \
|
|
"offset=" + offset
|
|
command = "firmwares"
|
|
response = self.sdk_client.request(service="fms", command=command, method="GET", params=params, payload="")
|
|
allure.attach(name=command + params,
|
|
body=str(response.status_code) + "\n" + str(response.json()),
|
|
attachment_type=allure.attachment_type.JSON)
|
|
if response.status_code == 200:
|
|
data = response.json()
|
|
newlist = sorted(data['firmwares'], key=itemgetter('created'))
|
|
# for i in newlist:
|
|
# print(i['uri'])
|
|
# print(i['revision'])
|
|
# print(newlist)
|
|
|
|
return newlist
|
|
# print(data)
|
|
|
|
return "error"
|
|
|
|
|
|
class ProvUtils:
|
|
|
|
def __init__(self, sdk_client=None, controller_data=None):
|
|
if sdk_client is None:
|
|
self.sdk_client = Controller(controller_data=controller_data)
|
|
self.sdk_client = sdk_client
|
|
|
|
def get_inventory(self):
|
|
uri = self.sdk_client.build_url_prov("inventory")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_inventory_by_device(self, device_name):
|
|
uri = self.sdk_client.build_url_prov("inventory/" + device_name)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_system_prov(self):
|
|
uri = self.sdk_client.build_url_prov("system?command=info")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_device_to_inventory(self, device_name, payload):
|
|
uri = self.sdk_client.build_url_prov("inventory/" + device_name)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_device_from_inventory(self, device_name):
|
|
uri = self.sdk_client.build_url_prov("inventory/" + device_name)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_entity(self):
|
|
uri = self.sdk_client.build_url_prov("entity")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_entity_by_id(self, entity_id):
|
|
uri = self.sdk_client.build_url_prov("entity/" + entity_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_entity(self, payload):
|
|
uri = self.sdk_client.build_url_prov("entity/1")
|
|
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_entity(self, entity_id):
|
|
uri = self.sdk_client.build_url_prov("entity/" + entity_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_device_from_inventory(self, device_name, payload):
|
|
uri = self.sdk_client.build_url_prov("inventory/" + device_name)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def edit_entity(self, payload, entity_id):
|
|
uri = self.sdk_client.build_url_prov("entity/" + entity_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_contact(self):
|
|
uri = self.sdk_client.build_url_prov("contact")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_contact_by_id(self, contact_id):
|
|
uri = self.sdk_client.build_url_prov("contact/" + contact_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_contact(self, payload):
|
|
uri = self.sdk_client.build_url_prov("contact/1")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_contact(self, contact_id):
|
|
uri = self.sdk_client.build_url_prov("contact/" + contact_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_contact(self, payload, contact_id):
|
|
uri = self.sdk_client.build_url_prov("contact/" + contact_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_location(self):
|
|
uri = self.sdk_client.build_url_prov("location")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_location_by_id(self, location_id):
|
|
uri = self.sdk_client.build_url_prov("location/" + location_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_location(self, payload):
|
|
uri = self.sdk_client.build_url_prov("location/1")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_location(self, location_id):
|
|
uri = self.sdk_client.build_url_prov("location/" + location_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_location(self, payload, location_id):
|
|
uri = self.sdk_client.build_url_prov("location/" + location_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_venue(self):
|
|
uri = self.sdk_client.build_url_prov("venue")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_venue_by_id(self, venue_id):
|
|
uri = self.sdk_client.build_url_prov("venue/" + venue_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_venue(self, payload):
|
|
uri = self.sdk_client.build_url_prov("venue/0")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_venue(self, venue_id):
|
|
uri = self.sdk_client.build_url_prov("venue/" + venue_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_venue(self, payload, venue_id):
|
|
uri = self.sdk_client.build_url_prov("venue/" + venue_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_map(self):
|
|
uri = self.sdk_client.build_url_prov("map")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_map_by_id(self, map_id):
|
|
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_map(self, payload):
|
|
uri = self.sdk_client.build_url_prov("map/0")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_map(self, map_id):
|
|
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_map(self, payload, map_id):
|
|
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_operator(self):
|
|
uri = self.sdk_client.build_url_prov("operator")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_operator_by_id(self, operator_id):
|
|
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_operator(self, payload):
|
|
uri = self.sdk_client.build_url_prov("operator/1")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_operator(self, operator_id):
|
|
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_operator(self, payload, operator_id):
|
|
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_service_class_by_operator_id(self, operator_id):
|
|
uri = self.sdk_client.build_url_prov("serviceClass?operatorId=" + operator_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_service_class_by_id(self, service_class_id):
|
|
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_service_class(self, payload):
|
|
uri = self.sdk_client.build_url_prov("serviceClass/1")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_service_class(self, service_class_id):
|
|
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_service_class(self, payload, service_class_id):
|
|
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def get_configuration(self):
|
|
uri = self.sdk_client.build_url_prov("configuration")
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def get_configuration_by_id(self, configuration_id):
|
|
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def add_configuration(self, payload):
|
|
uri = self.sdk_client.build_url_prov("configuration/1")
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
def delete_configuration(self, configuration_id):
|
|
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
|
return resp
|
|
|
|
def edit_configuration(self, payload, configuration_id):
|
|
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
|
payload = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
|
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
|
return resp
|
|
|
|
|
|
class UProfileUtility:
|
|
|
|
def __init__(self, sdk_client=None, controller_data=None):
|
|
if sdk_client is None:
|
|
self.sdk_client = Controller(controller_data=controller_data)
|
|
self.sdk_client = sdk_client
|
|
self.base_profile_config = {
|
|
"uuid": 1,
|
|
"radios": [],
|
|
"interfaces": [{
|
|
"name": "WAN",
|
|
"role": "upstream",
|
|
"services": ["ssh", "lldp", "dhcp-snooping"],
|
|
"ethernet": [
|
|
{
|
|
"select-ports": [
|
|
"WAN*"
|
|
]
|
|
}
|
|
],
|
|
"ipv4": {
|
|
"addressing": "dynamic"
|
|
}
|
|
},
|
|
{
|
|
"name": "LAN",
|
|
"role": "downstream",
|
|
"services": ["ssh", "lldp", "dhcp-snooping"],
|
|
"ethernet": [
|
|
{
|
|
"select-ports": [
|
|
"LAN*"
|
|
]
|
|
}
|
|
],
|
|
"ipv4": {
|
|
"addressing": "static",
|
|
"subnet": "192.168.1.1/16",
|
|
"dhcp": {
|
|
"lease-first": 10,
|
|
"lease-count": 10000,
|
|
"lease-time": "6h"
|
|
}
|
|
},
|
|
}],
|
|
"metrics": {
|
|
"statistics": {
|
|
"interval": 60,
|
|
"types": ["ssids", "lldp", "clients"]
|
|
},
|
|
"health": {
|
|
"interval": 120
|
|
},
|
|
"wifi-frames": {
|
|
"filters": ["probe",
|
|
"auth",
|
|
"assoc",
|
|
"disassoc",
|
|
"deauth",
|
|
"local-deauth",
|
|
"inactive-deauth",
|
|
"key-mismatch",
|
|
"beacon-report",
|
|
"radar-detected"]
|
|
},
|
|
"dhcp-snooping": {
|
|
"filters": ["ack", "discover", "offer", "request", "solicit", "reply", "renew"]
|
|
}
|
|
},
|
|
"services": {
|
|
"lldp": {
|
|
"describe": "TIP OpenWiFi",
|
|
"location": "QA"
|
|
},
|
|
"ssh": {
|
|
"port": 22
|
|
}
|
|
}
|
|
}
|
|
self.vlan_section = {
|
|
"name": "WAN100",
|
|
"role": "upstream",
|
|
"vlan": {
|
|
"id": 100
|
|
},
|
|
"ethernet": [
|
|
{
|
|
"select-ports": [
|
|
"WAN*"
|
|
]
|
|
}
|
|
],
|
|
"ipv4": {
|
|
"addressing": "dynamic"
|
|
}
|
|
}
|
|
self.mode = None
|
|
|
|
def set_mesh_services(self):
|
|
self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.97.1/24"
|
|
self.base_profile_config["interfaces"][1]["ipv4"]["dhcp"]["lease-count"] = 100
|
|
del self.base_profile_config['metrics']['wifi-frames']
|
|
del self.base_profile_config['metrics']['dhcp-snooping']
|
|
var = {
|
|
"filters": ["probe",
|
|
"auth"]
|
|
}
|
|
self.base_profile_config["metrics"]['wifi-frames'] = var
|
|
del self.base_profile_config['services']
|
|
var2 = {
|
|
"lldp": {
|
|
"describe": "uCentral",
|
|
"location": "universe"
|
|
},
|
|
"ssh": {
|
|
"port": 22
|
|
}
|
|
}
|
|
self.base_profile_config['services'] = var2
|
|
|
|
def set_express_wifi(self, open_flow=None):
|
|
if self.mode == "NAT":
|
|
self.base_profile_config["interfaces"][1]["services"] = ["ssh", "lldp", "open-flow"]
|
|
self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.97.1/24"
|
|
self.base_profile_config["interfaces"][1]["ipv4"]["dhcp"]["lease-count"] = 100
|
|
self.base_profile_config['services']["open-flow"] = open_flow
|
|
self.base_profile_config['services']['lldp']['describe'] = "OpenWiFi - expressWiFi"
|
|
self.base_profile_config['services']['lldp']['location'] = "Hotspot"
|
|
|
|
def set_captive_portal(self):
|
|
|
|
if self.mode == "NAT":
|
|
max_client = {
|
|
"max-clients": 32
|
|
}
|
|
# sourceFile = open('captive_config.py', 'w')
|
|
|
|
self.base_profile_config["interfaces"][1]["name"] = "captive"
|
|
self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.2.1/24"
|
|
self.base_profile_config["interfaces"][1]["captive"] = max_client
|
|
del self.base_profile_config["interfaces"][1]["ethernet"]
|
|
del self.base_profile_config["interfaces"][1]["services"]
|
|
del self.base_profile_config["metrics"]["wifi-frames"]
|
|
del self.base_profile_config["metrics"]["dhcp-snooping"]
|
|
# print(self.base_profile_config)
|
|
# print(self.base_profile_config, file=sourceFile)
|
|
# sourceFile.close()
|
|
|
|
def encryption_lookup(self, encryption="psk"):
|
|
encryption_mapping = {
|
|
"none": "open",
|
|
"psk": "wpa",
|
|
"psk2": "wpa2",
|
|
"sae": "wpa3",
|
|
"psk-mixed": "wpa|wpa2",
|
|
"sae-mixed": "wpa3",
|
|
"wpa": 'wap',
|
|
"wpa2": "eap",
|
|
"wpa3": "eap",
|
|
"wpa-mixed": "eap",
|
|
"wpa3-mixed": "sae"
|
|
}
|
|
if encryption in encryption_mapping.keys():
|
|
return encryption_mapping[encryption]
|
|
else:
|
|
return False
|
|
|
|
def get_ssid_info(self):
|
|
ssid_info = []
|
|
for interfaces in self.base_profile_config["interfaces"]:
|
|
if "ssids" in interfaces.keys():
|
|
for ssid_data in interfaces["ssids"]:
|
|
for band in ssid_data["wifi-bands"]:
|
|
temp = [ssid_data["name"]]
|
|
if ssid_data["encryption"]["proto"] == "none" or "radius" in ssid_data.keys():
|
|
temp.append(self.encryption_lookup(encryption=ssid_data["encryption"]["proto"]))
|
|
temp.append('[BLANK]')
|
|
else:
|
|
temp.append(self.encryption_lookup(encryption=ssid_data["encryption"]["proto"]))
|
|
temp.append(ssid_data["encryption"]["key"])
|
|
temp.append(band)
|
|
ssid_info.append(temp)
|
|
return ssid_info
|
|
|
|
def set_radio_config(self, radio_config={}):
|
|
base_radio_config_2g = {
|
|
"band": "2G",
|
|
"country": "CA",
|
|
"channel-mode": "HE",
|
|
"channel": "auto"
|
|
}
|
|
base_radio_config_5g = {
|
|
"band": "5G",
|
|
"country": "CA",
|
|
"allow-dfs": True,
|
|
"channel-mode": "HE",
|
|
"channel": "auto"
|
|
}
|
|
for band in radio_config:
|
|
if band == "2G":
|
|
for keys in radio_config[band]:
|
|
base_radio_config_2g[keys] = radio_config[band][keys]
|
|
if band == "5G":
|
|
for keys in radio_config[band]:
|
|
base_radio_config_5g[keys] = radio_config[band][keys]
|
|
# if band == "6G":
|
|
# for keys in radio_config[band]:
|
|
# base_radio_config_6g[keys] = radio_config[band][keys]
|
|
|
|
self.base_profile_config["radios"].append(base_radio_config_2g)
|
|
self.base_profile_config["radios"].append(base_radio_config_5g)
|
|
print(self.base_profile_config)
|
|
self.vlan_section["ssids"] = []
|
|
self.vlan_ids = []
|
|
|
|
def set_mode(self, mode, mesh=False):
|
|
self.mode = mode
|
|
if mode == "NAT":
|
|
if mesh:
|
|
self.base_profile_config['interfaces'][0]['tunnel'] = {
|
|
"proto": "mesh"
|
|
}
|
|
self.base_profile_config['interfaces'][1]['ssids'] = []
|
|
elif mode == "BRIDGE":
|
|
if mesh:
|
|
self.base_profile_config['interfaces'][0]['tunnel'] = {
|
|
"proto": "mesh"
|
|
}
|
|
self.base_profile_config['interfaces'][0]['ssids'] = []
|
|
elif mode == "VLAN":
|
|
if mesh:
|
|
self.base_profile_config['interfaces'][0]['tunnel'] = {
|
|
"proto": "mesh"
|
|
}
|
|
del self.base_profile_config['interfaces'][1]
|
|
self.base_profile_config['interfaces'][0]['ssids'] = []
|
|
self.base_profile_config['interfaces'] = []
|
|
wan_section_vlan = {
|
|
"name": "WAN",
|
|
"role": "upstream",
|
|
"services": ["lldp", "ssh", "dhcp-snooping"],
|
|
"ethernet": [
|
|
{
|
|
"select-ports": [
|
|
"WAN*"
|
|
]
|
|
}
|
|
],
|
|
"ipv4": {
|
|
"addressing": "dynamic"
|
|
}
|
|
}
|
|
self.base_profile_config['interfaces'].append(wan_section_vlan)
|
|
else:
|
|
print("Invalid Mode")
|
|
return 0
|
|
|
|
def add_ssid(self, ssid_data, radius=False, radius_auth_data={}, radius_accounting_data={}):
|
|
print("ssid data : ", ssid_data)
|
|
ssid_info = {'name': ssid_data["ssid_name"], "bss-mode": "ap", "wifi-bands": [], "services": ["wifi-frames"]}
|
|
for options in ssid_data:
|
|
if options == "multi-psk":
|
|
ssid_info[options] = ssid_data[options]
|
|
print("hi", ssid_info)
|
|
if options == "rate-limit":
|
|
ssid_info[options] = ssid_data[options]
|
|
if options == "radius_auth_data":
|
|
ssid_info[options] = ssid_data[options]
|
|
if options == "radius_acc_data":
|
|
ssid_info[options] = ssid_data[options]
|
|
for i in ssid_data["appliedRadios"]:
|
|
ssid_info["wifi-bands"].append(i)
|
|
ssid_info['encryption'] = {}
|
|
ssid_info['encryption']['proto'] = ssid_data["security"]
|
|
try:
|
|
ssid_info['encryption']['key'] = ssid_data["security_key"]
|
|
except Exception as e:
|
|
pass
|
|
ssid_info['encryption']['ieee80211w'] = "optional"
|
|
if radius:
|
|
ssid_info["radius"] = {}
|
|
ssid_info["radius"]["authentication"] = {
|
|
"host": radius_auth_data["ip"],
|
|
"port": radius_auth_data["port"],
|
|
"secret": radius_auth_data["secret"]
|
|
}
|
|
ssid_info["radius"]["accounting"] = {
|
|
"host": radius_accounting_data["ip"],
|
|
"port": radius_accounting_data["port"],
|
|
"secret": radius_accounting_data["secret"]
|
|
}
|
|
if self.mode == "NAT":
|
|
self.base_profile_config['interfaces'][1]['ssids'].append(ssid_info)
|
|
elif self.mode == "BRIDGE":
|
|
self.base_profile_config['interfaces'][0]['ssids'].append(ssid_info)
|
|
elif self.mode == "VLAN":
|
|
vid = ssid_data["vlan"]
|
|
self.vlan_section = {
|
|
"name": "WAN100",
|
|
"role": "upstream",
|
|
"services": ["lldp", "dhcp-snooping"],
|
|
"vlan": {
|
|
"id": 100
|
|
},
|
|
"ethernet": [
|
|
{
|
|
"select-ports": [
|
|
"WAN*"
|
|
]
|
|
}
|
|
],
|
|
"ipv4": {
|
|
"addressing": "dynamic"
|
|
}
|
|
}
|
|
vlan_section = self.vlan_section
|
|
if vid in self.vlan_ids:
|
|
print("sss", self.vlan_ids)
|
|
for i in self.base_profile_config['interfaces']:
|
|
if i["name"] == "WANv%s" % (vid):
|
|
i["ssids"].append(ssid_info)
|
|
else:
|
|
print(self.vlan_ids)
|
|
self.vlan_ids.append(vid)
|
|
vlan_section['name'] = "WANv%s" % (vid)
|
|
vlan_section['vlan']['id'] = int(vid)
|
|
vlan_section["ssids"] = []
|
|
vlan_section["ssids"].append(ssid_info)
|
|
self.base_profile_config['interfaces'].append(vlan_section)
|
|
print(vlan_section)
|
|
vsection = 0
|
|
else:
|
|
print("invalid mode")
|
|
pytest.exit("invalid Operating Mode")
|
|
|
|
def push_config(self, serial_number):
|
|
payload = {"configuration": self.base_profile_config, "serialNumber": serial_number, "UUID": 1}
|
|
uri = self.sdk_client.build_uri("device/" + serial_number + "/configure")
|
|
basic_cfg_str = json.dumps(payload)
|
|
print("Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
|
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
|
"URI: " + str(uri) + "\n" +
|
|
"Data: " + str(payload) + "\n" +
|
|
"Headers: " + str(self.sdk_client.make_headers()))
|
|
|
|
resp = requests.post(uri, data=basic_cfg_str, headers=self.sdk_client.make_headers(),
|
|
verify=False, timeout=100)
|
|
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), basic_cfg_str, uri)
|
|
resp.close()
|
|
return resp
|
|
|
|
|
|
if __name__ == '__main__':
|
|
controller = {
|
|
'url': 'https://sec-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
|
|
'username': "tip@ucentral.com",
|
|
'password': 'OpenWifi%123',
|
|
}
|
|
obj = Controller(controller_data=controller)
|
|
# po = ProvUtils(sdk_client=obj)
|
|
# print(po.get_inventory())
|
|
# up = UProfileUtility(sdk_client=obj, controller_data=controller)
|
|
# up.set_mode(mode="BRIDGE")
|
|
# up.set_radio_config()
|
|
# up.add_ssid(ssid_data={"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"})
|
|
# up.push_config(serial_number="3c2c99f44e77")
|
|
# print(obj.get_device_by_serial_number(serial_number="3c2c99f44e77"))
|
|
# print(datetime.datetime.utcnow())
|
|
# fms = FMSUtils(sdk_client=obj)
|
|
# new = fms.get_firmwares(model='ecw5410')
|
|
# for i in new:
|
|
# print(i)
|
|
# print(len(new))
|
|
|
|
# print(profile.get_ssid_info())
|
|
# # print(obj.get_devices())
|
|
obj.logout()
|