mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-31 02:48:11 +00:00 
			
		
		
		
	WIFI-10050: Removed the influx params from ini file (#671)
* WIFI-10050: Removed the influx params from ini file Signed-off-by: shivam <shivam.thakur@candelatech.com> * WIFI-10050: Removed influx params from lab_info.json Signed-off-by: shivam <shivam.thakur@candelatech.com> * added influx params option in configuration.py * Added try and except to setup_influx Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Replaced USB0 with AP2 Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Fixed UnboundLocalError Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Added print statement Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Added try and except Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Removed try and except and Also Import influx_params Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> Co-authored-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
		| @@ -510,6 +510,7 @@ class RunTest: | ||||
|         wificapacity_obj.setup() | ||||
|         wificapacity_obj.run() | ||||
|         if move_to_influx: | ||||
|             try: | ||||
|                 report_name = "../reports/" + wificapacity_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] | ||||
|                 influx = CSVtoInflux(influx_host=self.influx_params["influx_host"], | ||||
|                                      influx_port=self.influx_params["influx_port"], | ||||
| @@ -519,6 +520,9 @@ class RunTest: | ||||
|                                      path=report_name) | ||||
|  | ||||
|                 influx.glob() | ||||
|             except Exception as e: | ||||
|                 print(e) | ||||
|                 pass | ||||
|         return wificapacity_obj | ||||
|  | ||||
|     def Client_Connect(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE", band="twog", | ||||
| @@ -720,6 +724,7 @@ class RunTest: | ||||
|         self.dataplane_obj.run() | ||||
|         if move_to_influx: | ||||
|             report_name = "../reports/" + self.dataplane_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] | ||||
|             try: | ||||
|                 influx = CSVtoInflux(influx_host=self.influx_params["influx_host"], | ||||
|                                      influx_port=self.influx_params["influx_port"], | ||||
|                                      influx_org=self.influx_params["influx_org"], | ||||
| @@ -728,6 +733,9 @@ class RunTest: | ||||
|                                      path=report_name) | ||||
|  | ||||
|                 influx.glob() | ||||
|             except Exception as e: | ||||
|                 print(e) | ||||
|                 pass | ||||
|  | ||||
|         return self.dataplane_obj | ||||
|  | ||||
| @@ -773,6 +781,7 @@ class RunTest: | ||||
|         self.dualbandptest_obj.run() | ||||
|         if move_to_influx: | ||||
|             report_name = "../reports/" + self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] | ||||
|             try: | ||||
|                 influx = CSVtoInflux(influx_host=self.influx_params["influx_host"], | ||||
|                                      influx_port=self.influx_params["influx_port"], | ||||
|                                      influx_org=self.influx_params["influx_org"], | ||||
| @@ -781,6 +790,9 @@ class RunTest: | ||||
|                                      path=report_name) | ||||
|  | ||||
|                 influx.glob() | ||||
|             except Exception as e: | ||||
|                 print(e) | ||||
|                 pass | ||||
|         return self.dualbandptest_obj | ||||
|  | ||||
|     def apstabilitytest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP", | ||||
|   | ||||
| @@ -64,3 +64,5 @@ PASSPOINT_VENUE_INFO = data["PASSPOINT_VENUE_INFO"] | ||||
| PASSPOINT_PROFILE_INFO = data["PASSPOINT_PROFILE_INFO"] | ||||
|  | ||||
| open_flow = data["open_flow"] | ||||
|  | ||||
| influx_params = data["influx_params"] | ||||
|   | ||||
| @@ -38,6 +38,7 @@ from controller.controller_1x.controller import FirmwareUtility | ||||
| import pytest | ||||
| from lanforge.lf_tests import RunTest | ||||
| from cv_test_manager import cv_test | ||||
| from configuration import influx_params | ||||
| from configuration import CONFIGURATION | ||||
| from configuration import PERFECTO_DETAILS | ||||
| from configuration import open_flow | ||||
| @@ -77,11 +78,6 @@ def pytest_addoption(parser): | ||||
|     parser.addini("tr_project_id", "Testrail Project ID") | ||||
|     parser.addini("milestone", "milestone Id") | ||||
|  | ||||
|     parser.addini("influx_host", "Influx Host", default="influx.cicd.lab.wlan.tip.build") | ||||
|     parser.addini("influx_port", "Influx Port", default=80) | ||||
|     parser.addini("influx_token", "Influx Token", default="TCkdATXAbHmNbn4QyNaj43WpGBYxFrzV") | ||||
|     parser.addini("influx_bucket", "influx bucket", default="tip-cicd") | ||||
|     parser.addini("influx_org", "influx organization", default="tip") | ||||
|     parser.addini(name="firmware", type='string', help="AP Firmware build URL", default="0") | ||||
|     parser.addini("cloud_ctlr", "AP Firmware build URL", default="0") | ||||
|  | ||||
| @@ -763,16 +759,9 @@ def lf_test(get_configuration, setup_influx, request, skip_lf, run_lf, skip_pcap | ||||
|  | ||||
|  | ||||
| @pytest.fixture(scope="session") | ||||
| def setup_influx(request, testbed, get_configuration): | ||||
| def setup_influx(testbed, get_configuration): | ||||
|     """ Setup Influx Parameters: Used in CV Automation""" | ||||
|     influx_params = { | ||||
|         "influx_host": request.config.getini("influx_host"), | ||||
|         "influx_port": request.config.getini("influx_port"), | ||||
|         "influx_token": request.config.getini("influx_token"), | ||||
|         "influx_bucket": request.config.getini("influx_bucket"), | ||||
|         "influx_org": request.config.getini("influx_org"), | ||||
|         "influx_tag": [testbed, get_configuration["access_point"][0]["model"]], | ||||
|     } | ||||
|     influx_params["influx_tag"] = [testbed, get_configuration["access_point"][0]["model"]] | ||||
|     yield influx_params | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -51,9 +51,9 @@ | ||||
|                 "mode": "wifi5", | ||||
|                 "serial": "0006aee53b84", | ||||
|                 "jumphost": true, | ||||
|                 "ip": "10.28.3.100", | ||||
|                 "ip": "192.168.52.89", | ||||
|                 "username": "lanforge", | ||||
|                 "password": "pumpkin77", | ||||
|                 "password": "lanforge", | ||||
|                 "port": 22, | ||||
|                 "jumphost_tty": "/dev/ttyAP2", | ||||
|                 "version": "next-latest" | ||||
| @@ -62,7 +62,7 @@ | ||||
|         "traffic_generator": { | ||||
|             "name": "lanforge", | ||||
|             "details": { | ||||
|                 "ip": "10.28.3.8", | ||||
|                 "ip": "192.168.52.89", | ||||
|                 "port": 8080, | ||||
|                 "ssh_port": 22, | ||||
|                 "2.4G-Radio": ["1.1.wiphy4"], | ||||
| @@ -1177,9 +1177,9 @@ | ||||
|         "Disable DGAF": false | ||||
|     } | ||||
| }, | ||||
| "open_flow":{} | ||||
|  | ||||
| "open_flow":{}, | ||||
|  | ||||
| "influx_params" : {} | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -14,14 +14,6 @@ sdk-customer-id=2 | ||||
| #fIRMWARE Option | ||||
| firmware=0 | ||||
|  | ||||
| # Influx Params | ||||
| influx_host=influx.cicd.lab.wlan.tip.build | ||||
| influx_port=80 | ||||
| influx_token=TCkdATXAbHmNbn4QyNaj43WpGBYxFrzV | ||||
| influx_bucket=tip-cicd | ||||
| ;influx_bucket= | ||||
| influx_org=tip | ||||
|  | ||||
| # Radius Settings | ||||
| radius_server_ip=192.168.200.75 | ||||
| radius_port=1812 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Thakur
					Shivam Thakur