diff --git a/libs/controller/controller_2x/controller.py b/libs/controller/controller_2x/controller.py index 3d1b7569b..6fa804f95 100644 --- a/libs/controller/controller_2x/controller.py +++ b/libs/controller/controller_2x/controller.py @@ -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 diff --git a/tests/e2e/basic/test_e2e_sdk_ap_tests.py b/tests/e2e/basic/test_e2e_sdk_ap_tests.py index f7e8efb56..a0363a319 100644 --- a/tests/e2e/basic/test_e2e_sdk_ap_tests.py +++ b/tests/e2e/basic/test_e2e_sdk_ap_tests.py @@ -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 + }, ]