mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-03 20:38:05 +00:00 
			
		
		
		
	Wifi 9990 automation side gateway testcases sdk client attribution error (#658)
* WIFI-9990: Fixed the sdk client error Improved the reporting in allure Improved the logging Signed-off-by: shivam <shivam.thakur@candelatech.com> * WIFI-9990: Fixed the configure command logging Signed-off-by: shivam <shivam.thakur@candelatech.com>
This commit is contained in:
		@@ -1414,24 +1414,21 @@ class UProfileUtility:
 | 
			
		||||
 | 
			
		||||
    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)
 | 
			
		||||
        allure.attach(name="ucentral_config: ",
 | 
			
		||||
                      body=str(basic_cfg_str),
 | 
			
		||||
                      attachment_type=allure.attachment_type.JSON)
 | 
			
		||||
        print("JSON Post Configure: " + str(basic_cfg_str))
 | 
			
		||||
        allure.attach(name="Sending Configure Command:", body="TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
 | 
			
		||||
                                                              "URI: " + uri + "\n" +
 | 
			
		||||
                                                              "Data: " + basic_cfg_str + "\n" +
 | 
			
		||||
                                                              "Data: " + self.sdk_client.make_headers())
 | 
			
		||||
        print("Sending Configure Command: ", datetime.datetime.utcnow())
 | 
			
		||||
        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)
 | 
			
		||||
        print(resp.json())
 | 
			
		||||
        print(resp.status_code)
 | 
			
		||||
        allure.attach(name="/configure response: " + str(resp.status_code), body=str(resp.json()),
 | 
			
		||||
                      attachment_type=allure.attachment_type.JSON)
 | 
			
		||||
        self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), basic_cfg_str, uri)
 | 
			
		||||
        resp.close()
 | 
			
		||||
        return resp
 | 
			
		||||
 
 | 
			
		||||
@@ -105,6 +105,56 @@ setup_params = [
 | 
			
		||||
             "security": "wpa3"}],
 | 
			
		||||
        "radius": True
 | 
			
		||||
    },
 | 
			
		||||
    ##########
 | 
			
		||||
{
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk", "vlan": 100}],
 | 
			
		||||
        "radius": False
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2", "vlan": 100}],
 | 
			
		||||
        "radius": False
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae", "vlan": 100}],
 | 
			
		||||
        "radius": False
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none", "vlan": 100}],
 | 
			
		||||
        "radius": False
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something",
 | 
			
		||||
             "security": "wpa2", "vlan": 100}],
 | 
			
		||||
        "radius": True
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mode": "VLAN",
 | 
			
		||||
        "ssids": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3", "vlan": 100},
 | 
			
		||||
            {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something",
 | 
			
		||||
             "security": "wpa3", "vlan": 100}],
 | 
			
		||||
        "radius": True
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user