mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
initial merge with 2006
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
1
lanforge/lanforge-scripts
Submodule
1
lanforge/lanforge-scripts
Submodule
Submodule lanforge/lanforge-scripts added at de86a454b2
@@ -87,6 +87,8 @@ class APNOS:
|
||||
f"cmd --value \"{cmd}\" "
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
output = stdout.read()
|
||||
allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "VIF State: " + str(vif_state)),
|
||||
name="SSID Profiles in VIF Config and VIF State: ")
|
||||
client.close()
|
||||
allure.attach(name="iwinfo Output Msg: ", body=str(output))
|
||||
allure.attach(name="iwinfo config Err Msg: ", body=str(stderr))
|
||||
|
||||
@@ -5,6 +5,7 @@ make sure pexpect is installed:
|
||||
$ sudo yum install python3-pexpect
|
||||
|
||||
You might need to install pexpect-serial using pip:
|
||||
$ pip3 install serial
|
||||
$ pip3 install pexpect-serial
|
||||
|
||||
./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0
|
||||
|
||||
@@ -13,10 +13,13 @@ import urllib
|
||||
import requests
|
||||
import swagger_client
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from swagger_client import EquipmentGatewayApi
|
||||
from swagger_client import FirmwareManagementApi
|
||||
import allure
|
||||
|
||||
import threading
|
||||
|
||||
|
||||
class ConfigureController:
|
||||
|
||||
@@ -74,31 +77,34 @@ class Controller(ConfigureController):
|
||||
if customer_id is None:
|
||||
self.customer_id = 2
|
||||
print("Setting to default Customer ID 2")
|
||||
|
||||
#
|
||||
# Setting the Controller Client Configuration
|
||||
self.select_controller_data(controller_data=controller_data)
|
||||
self.set_credentials(controller_data=controller_data)
|
||||
# self.configuration.refresh_api_key_hook = self.get_bearer_token
|
||||
self.configuration.refresh_api_key_hook = self.get_bearer_token
|
||||
|
||||
# Connecting to Controller
|
||||
self.api_client = swagger_client.ApiClient(self.configuration)
|
||||
self.login_client = swagger_client.LoginApi(api_client=self.api_client)
|
||||
self.bearer = self.get_bearer_token()
|
||||
self.bearer = False
|
||||
self.disconnect = False
|
||||
self.semaphore = False
|
||||
try:
|
||||
self.bearer = self.get_bearer_token()
|
||||
# t1 = threading.Thread(target=self.refresh_instance)
|
||||
# t1.start()
|
||||
self.api_client.default_headers['Authorization'] = "Bearer " + self.bearer._access_token
|
||||
self.status_client = swagger_client.StatusApi(api_client=self.api_client)
|
||||
self.equipment_client = swagger_client.EquipmentApi(self.api_client)
|
||||
self.profile_client = swagger_client.ProfileApi(self.api_client)
|
||||
self.api_client.configuration.api_key_prefix = {
|
||||
"Authorization": "Bearer " + self.bearer._access_token
|
||||
}
|
||||
self.api_client.configuration.refresh_api_key_hook = self.refresh_instance
|
||||
except Exception as e:
|
||||
self.bearer = False
|
||||
print(e)
|
||||
|
||||
self.api_client.default_headers['Authorization'] = "Bearer " + self.bearer._access_token
|
||||
self.status_client = swagger_client.StatusApi(api_client=self.api_client)
|
||||
self.equipment_client = swagger_client.EquipmentApi(self.api_client)
|
||||
self.profile_client = swagger_client.ProfileApi(self.api_client)
|
||||
self.api_client.configuration.api_key_prefix = {
|
||||
"Authorization": "Bearer " + self.bearer._access_token
|
||||
}
|
||||
self.api_client.configuration.refresh_api_key_hook = self.get_bearer_token()
|
||||
self.ping_response = self.portal_ping()
|
||||
self.default_profiles = {}
|
||||
# print(self.bearer)
|
||||
if self.ping_response._application_name != 'PortalServer':
|
||||
print("Server not Reachable")
|
||||
exit()
|
||||
print("Connected to Controller Server")
|
||||
|
||||
def get_bearer_token(self):
|
||||
@@ -110,6 +116,15 @@ class Controller(ConfigureController):
|
||||
|
||||
def refresh_instance(self):
|
||||
# Connecting to Controller
|
||||
# while True:
|
||||
# print("Controller Refresh Thread Started")
|
||||
# for i in range(0, 800):
|
||||
# if self.disconnect:
|
||||
# break
|
||||
# time.sleep(1)
|
||||
# if self.disconnect:
|
||||
# break
|
||||
# self.semaphore = True
|
||||
self.api_client = swagger_client.ApiClient(self.configuration)
|
||||
self.login_client = swagger_client.LoginApi(api_client=self.api_client)
|
||||
self.bearer = self.get_bearer_token()
|
||||
@@ -121,7 +136,7 @@ class Controller(ConfigureController):
|
||||
self.api_client.configuration.api_key_prefix = {
|
||||
"Authorization": "Bearer " + self.bearer._access_token
|
||||
}
|
||||
self.api_client.configuration.refresh_api_key_hook = self.get_bearer_token()
|
||||
self.api_client.configuration.refresh_api_key_hook = self.refresh_instance
|
||||
self.ping_response = self.portal_ping()
|
||||
self.default_profiles = {}
|
||||
# print(self.bearer)
|
||||
@@ -129,11 +144,13 @@ class Controller(ConfigureController):
|
||||
print("Server not Reachable")
|
||||
exit()
|
||||
print("Connected to Controller Server")
|
||||
# self.semaphore = False
|
||||
|
||||
def portal_ping(self):
|
||||
return self.login_client.portal_ping()
|
||||
|
||||
def disconnect_Controller(self):
|
||||
self.disconnect = True
|
||||
self.api_client.__del__()
|
||||
|
||||
# Returns a List of All the Equipments that are available in the cloud instances
|
||||
@@ -162,7 +179,7 @@ class Controller(ConfigureController):
|
||||
# Get the equipment id, of a equipment with a serial number
|
||||
def get_equipment_id(self, serial_number=None):
|
||||
equipment_data = self.get_equipment_by_customer_id(max_items=100)
|
||||
# print(equipment_data)
|
||||
|
||||
for equipment in equipment_data:
|
||||
print(equipment._id)
|
||||
if equipment._serial == serial_number:
|
||||
@@ -195,7 +212,7 @@ class Controller(ConfigureController):
|
||||
# print(status_data)
|
||||
try:
|
||||
current_ap_fw = status_data[2]['details']['reportedSwVersion']
|
||||
print(current_ap_fw)
|
||||
# print(current_ap_fw)
|
||||
return current_ap_fw
|
||||
except Exception as e:
|
||||
current_ap_fw = "error"
|
||||
@@ -326,6 +343,7 @@ class ProfileUtility:
|
||||
self.default_profiles['radius'] = i
|
||||
if i._name == "TipWlan-rf":
|
||||
self.default_profiles['rf'] = i
|
||||
# print(i)
|
||||
|
||||
# This will delete the Profiles associated with an equipment of givwn equipment_id, and associate it to default
|
||||
# equipment_ap profile
|
||||
@@ -368,7 +386,7 @@ class ProfileUtility:
|
||||
for i in self.default_profiles:
|
||||
skip_delete_id.append(self.default_profiles[i]._id)
|
||||
delete_ids = list(set(delete_ids) - set(delete_ids).intersection(set(skip_delete_id)))
|
||||
print(delete_ids)
|
||||
# print(delete_ids)
|
||||
for i in delete_ids:
|
||||
self.set_equipment_to_profile(profile_id=i)
|
||||
self.delete_profile(profile_id=delete_ids)
|
||||
@@ -402,8 +420,9 @@ class ProfileUtility:
|
||||
"model_type": "PaginationContext",
|
||||
"maxItemsPerPage": 5000
|
||||
}"""
|
||||
equipment_data = self.sdk_client.equipment_client.get_equipment_by_customer_id(customer_id=2,
|
||||
pagination_context=pagination_context)
|
||||
equipment_data = self.sdk_client.equipment_client. \
|
||||
get_equipment_by_customer_id(customer_id=2,
|
||||
pagination_context=pagination_context)
|
||||
self.get_default_profiles()
|
||||
for i in equipment_data._items:
|
||||
if i._profile_id == profile_id:
|
||||
@@ -426,6 +445,9 @@ class ProfileUtility:
|
||||
default_profile._details["rfConfigMap"]["is5GHz"]["rf"] = profile_data["name"]
|
||||
default_profile._details["rfConfigMap"]["is5GHzL"]["rf"] = profile_data["name"]
|
||||
default_profile._details["rfConfigMap"]["is5GHzU"]["rf"] = profile_data["name"]
|
||||
# for i in profile_data['rfConfigMap']:
|
||||
# for j in profile_data['rfConfigMap'][i]:
|
||||
# default_profile._details["rfConfigMap"][i][j] = profile_data['rfConfigMap'][i][j]
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
self.profile_creation_ids['rf'].append(profile._id)
|
||||
return profile
|
||||
@@ -451,21 +473,17 @@ class ProfileUtility:
|
||||
method call: used to create a ssid profile with the given parameters
|
||||
"""
|
||||
|
||||
def create_open_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
# Open
|
||||
def create_open_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'open'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
@@ -473,22 +491,18 @@ class ProfileUtility:
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = "error"
|
||||
|
||||
return profile
|
||||
|
||||
def create_wpa_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
# wpa personal
|
||||
def create_wpa_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
@@ -500,21 +514,18 @@ class ProfileUtility:
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
def create_wpa2_personal_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
# wpa2 personal
|
||||
def create_wpa2_personal_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
@@ -526,43 +537,111 @@ class ProfileUtility:
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
def create_wpa3_personal_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['keyStr'] = profile_data['security_key']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'wpa3OnlyPSK'
|
||||
profile_id = self.profile_client.create_profile(body=default_profile)._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
return True
|
||||
|
||||
def create_wpa2_enterprise_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
# wpa3 personal
|
||||
def create_wpa3_personal_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['keyStr'] = profile_data['security_key']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'wpa3OnlySAE'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa3 personal mixed mode
|
||||
def create_wpa3_personal_mixed_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['keyStr'] = profile_data['security_key']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'wpa3MixedSAE'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa wpa2 personal mixed mode
|
||||
def create_wpa_wpa2_personal_mixed_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['keyStr'] = profile_data['security_key']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'wpa2PSK'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa enterprise
|
||||
def create_wpa_enterprise_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
|
||||
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
|
||||
default_profile._details['secureMode'] = 'wpaRadius'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa wpa2 enterprise mixed mode
|
||||
def create_wpa_wpa2_enterprise_mixed_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
@@ -579,29 +658,75 @@ class ProfileUtility:
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
def create_wpa3_enterprise_ssid_profile(self, two4g=True, fiveg=True, profile_data=None):
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = []
|
||||
if two4g is True:
|
||||
default_profile._details['appliedRadios'].append("is2dot4GHz")
|
||||
if fiveg is True:
|
||||
default_profile._details['appliedRadios'].append("is5GHzU")
|
||||
default_profile._details['appliedRadios'].append("is5GHz")
|
||||
default_profile._details['appliedRadios'].append("is5GHzL")
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['keyStr'] = profile_data['security_key']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details['secureMode'] = 'wpa3OnlyRadius'
|
||||
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
|
||||
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
|
||||
profile_id = self.profile_client.create_profile(body=default_profile)._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
return True
|
||||
# wpa2 enterprise mode ssid profile
|
||||
def create_wpa2_enterprise_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
|
||||
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
|
||||
default_profile._details['secureMode'] = 'wpa2OnlyRadius'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa3 enterprise mode
|
||||
def create_wpa3_enterprise_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
|
||||
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
|
||||
default_profile._details['secureMode'] = 'wpa3OnlyEAP'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
# wpa3 enterprise mixed mode
|
||||
def create_wpa3_enterprise_mixed_ssid_profile(self, profile_data=None):
|
||||
try:
|
||||
if profile_data is None:
|
||||
return False
|
||||
default_profile = self.default_profiles['ssid']
|
||||
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
|
||||
default_profile._name = profile_data['profile_name']
|
||||
default_profile._details['vlanId'] = profile_data['vlan']
|
||||
default_profile._details['ssid'] = profile_data['ssid_name']
|
||||
default_profile._details['forwardMode'] = profile_data['mode']
|
||||
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
|
||||
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
|
||||
default_profile._details['secureMode'] = 'wpa3MixedEAP'
|
||||
profile = self.profile_client.create_profile(body=default_profile)
|
||||
profile_id = profile._id
|
||||
self.profile_creation_ids['ssid'].append(profile_id)
|
||||
self.profile_ids.append(profile_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
profile = False
|
||||
return profile
|
||||
|
||||
"""
|
||||
method call: used to create a ap profile that contains the given ssid profiles
|
||||
@@ -780,6 +905,7 @@ class FirmwareUtility(JFrogUtility):
|
||||
def get_fw_version(self):
|
||||
# Get The equipment model
|
||||
self.latest_fw = self.get_build(model=self.model, version=self.fw_version)
|
||||
# print("shivam", self.latest_fw)
|
||||
return self.latest_fw
|
||||
|
||||
def upload_fw_on_cloud(self, fw_version=None, force_upload=False):
|
||||
@@ -872,3 +998,9 @@ if __name__ == '__main__':
|
||||
sdk_client = Controller(controller_data=controller)
|
||||
# Use Library/ Method Here
|
||||
sdk_client.disconnect_Controller()
|
||||
api = Controller(controller_data=controller)
|
||||
profile = ProfileUtility(sdk_client=api)
|
||||
# print(profile.get_profile_by_name(profile_name="basic-ext-03-03-SSID-open-0-VLAN"))
|
||||
profile.get_default_profiles()
|
||||
api.disconnect_Controller()
|
||||
|
||||
|
||||
@@ -2,36 +2,71 @@
|
||||
# Used by Nightly_Sanity
|
||||
# This has different types of old_pytest like Single client connectivity, Single_Client_EAP, testrail_retest
|
||||
#########################################################################################################
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.append(
|
||||
os.path.dirname(
|
||||
os.path.realpath(__file__)
|
||||
)
|
||||
)
|
||||
if "libs" not in sys.path:
|
||||
sys.path.append(f'../libs')
|
||||
for folder in 'py-json', 'py-scripts':
|
||||
if folder not in sys.path:
|
||||
sys.path.append(f'../../lanforge/lanforge-scripts/{folder}')
|
||||
|
||||
sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity")
|
||||
|
||||
sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
from sta_connect2 import StaConnect2
|
||||
import time
|
||||
# from eap_connect import EAPConnect
|
||||
from test_ipv4_ttls import TTLSTest
|
||||
|
||||
|
||||
class RunTest:
|
||||
|
||||
def __init__(self, lanforge_ip, lanforge_port, lanforge_prefix):
|
||||
self.lanforge_ip = lanforge_ip
|
||||
self.lanforge_port = lanforge_port
|
||||
self.lanforge_prefix = lanforge_prefix
|
||||
def __init__(self, lanforge_data=None, debug=False):
|
||||
self.lanforge_ip = lanforge_data["ip"]
|
||||
self.lanforge_port = lanforge_data["port"]
|
||||
self.twog_radios = lanforge_data["2.4G-Radio"]
|
||||
self.fiveg_radios = lanforge_data["5G-Radio"]
|
||||
self.ax_radios = lanforge_data["AX-Radio"]
|
||||
self.upstream_port = lanforge_data["upstream"]
|
||||
self.twog_prefix = lanforge_data["2.4G-Station-Name"]
|
||||
self.fiveg_prefix = lanforge_data["5G-Station-Name"]
|
||||
self.ax_prefix = lanforge_data["AX-Station-Name"]
|
||||
self.debug = debug
|
||||
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=debug)
|
||||
|
||||
def Single_Client_Connectivity(self, upstream_port="eth1", radio="wiphy0", ssid="TestAP", passkey="ssid_psk",
|
||||
security="open",
|
||||
station_name="sta0000", test_case=None, rid=None, client=None, logger=None):
|
||||
def Client_Connectivity(self, ssid="[BLANK]", passkey="[BLANK]", security="open", station_name=[],
|
||||
mode="BRIDGE", vlan_id=1, band="twog"):
|
||||
'''SINGLE CLIENT CONNECTIVITY using test_connect2.py'''
|
||||
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=False)
|
||||
self.staConnect.sta_mode = 0
|
||||
self.staConnect.upstream_resource = 1
|
||||
self.staConnect.upstream_port = upstream_port
|
||||
self.staConnect.radio = radio
|
||||
if mode == "BRIDGE":
|
||||
self.staConnect.upstream_port = self.upstream_port
|
||||
elif mode == "NAT":
|
||||
self.staConnect.upstream_port = self.upstream_port
|
||||
else:
|
||||
self.staConnect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||
if band == "twog":
|
||||
self.staConnect.radio = self.twog_radios[0]
|
||||
self.staConnect.sta_prefix = self.twog_prefix
|
||||
if band == "fiveg":
|
||||
self.staConnect.radio = self.fiveg_radios[0]
|
||||
self.staConnect.sta_prefix = self.fiveg_prefix
|
||||
self.staConnect.resource = 1
|
||||
self.staConnect.dut_ssid = ssid
|
||||
self.staConnect.dut_passwd = passkey
|
||||
self.staConnect.dut_security = security
|
||||
self.staConnect.station_names = station_name
|
||||
self.staConnect.sta_prefix = self.lanforge_prefix
|
||||
self.staConnect.runtime_secs = 10
|
||||
self.staConnect.runtime_secs = 40
|
||||
self.staConnect.bringup_time_sec = 60
|
||||
self.staConnect.cleanup_on_exit = True
|
||||
# staConnect.cleanup()
|
||||
# self.staConnect.cleanup()
|
||||
self.staConnect.setup()
|
||||
self.staConnect.start()
|
||||
print("napping %f sec" % self.staConnect.runtime_secs)
|
||||
@@ -41,58 +76,75 @@ class RunTest:
|
||||
run_results = self.staConnect.get_result_list()
|
||||
for result in run_results:
|
||||
print("test result: " + result)
|
||||
# result = 'pass'
|
||||
print("Single Client Connectivity :", self.staConnect.passes)
|
||||
if self.staConnect.passes() == True:
|
||||
print("Single client connection to", self.staConnect.dut_ssid, "successful. Test Passed")
|
||||
client.update_testrail(case_id=test_case, run_id=rid, status_id=1, msg='Client connectivity passed')
|
||||
logger.info("Client connectivity to " + self.staConnect.dut_ssid + " Passed")
|
||||
return ("passed")
|
||||
result = True
|
||||
print("Client Connectivity :", self.staConnect.passes)
|
||||
if self.staConnect.passes():
|
||||
print("client connection to", self.staConnect.dut_ssid, "successful. Test Passed")
|
||||
else:
|
||||
client.update_testrail(case_id=test_case, run_id=rid, status_id=5, msg='Client connectivity failed')
|
||||
print("Single client connection to", self.staConnect.dut_ssid, "unsuccessful. Test Failed")
|
||||
logger.warning("Client connectivity to " + self.staConnect.dut_ssid + " FAILED")
|
||||
return ("failed")
|
||||
print("client connection to", self.staConnect.dut_ssid, "unsuccessful. Test Failed")
|
||||
result = False
|
||||
time.sleep(3)
|
||||
return self.staConnect.passes(), result
|
||||
|
||||
def Single_Client_EAP(self, port, sta_list, ssid_name, radio, security, eap_type,
|
||||
identity, ttls_password, test_case, rid, client, logger):
|
||||
eap_connect = EAPConnect(self.lanforge_ip, self.lanforge_port, _debug_on=False)
|
||||
eap_connect.upstream_resource = 1
|
||||
eap_connect.upstream_port = port
|
||||
eap_connect.security = security
|
||||
eap_connect.sta_list = sta_list
|
||||
eap_connect.station_names = sta_list
|
||||
eap_connect.sta_prefix = self.lanforge_prefix
|
||||
eap_connect.ssid = ssid_name
|
||||
eap_connect.radio = radio
|
||||
eap_connect.eap = eap_type
|
||||
eap_connect.identity = identity
|
||||
eap_connect.ttls_passwd = ttls_password
|
||||
eap_connect.runtime_secs = 10
|
||||
eap_connect.setup()
|
||||
eap_connect.start()
|
||||
print("napping %f sec" % eap_connect.runtime_secs)
|
||||
time.sleep(eap_connect.runtime_secs)
|
||||
eap_connect.stop()
|
||||
eap_connect.cleanup()
|
||||
run_results = eap_connect.get_result_list()
|
||||
for result in run_results:
|
||||
print("test result: " + result)
|
||||
# result = 'pass'
|
||||
print("Single Client Connectivity :", eap_connect.passes)
|
||||
if eap_connect.passes() == True:
|
||||
print("Single client connection to", ssid_name, "successful. Test Passed")
|
||||
client.update_testrail(case_id=test_case, run_id=rid, status_id=1, msg='Client connectivity passed')
|
||||
logger.info("Client connectivity to " + ssid_name + " Passed")
|
||||
return ("passed")
|
||||
def EAP_Connect(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE", band="twog", vlan_id=100,
|
||||
station_name=[], key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="nolastart",
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="nolaradius"):
|
||||
self.eap_connect = TTLSTest(host=self.lanforge_ip, port=self.lanforge_port,
|
||||
sta_list=station_name, vap=False, _debug_on=self.debug)
|
||||
|
||||
self.eap_connect.station_profile.sta_mode = 0
|
||||
self.eap_connect.upstream_resource = 1
|
||||
if mode == "BRIDGE":
|
||||
self.eap_connect.upstream_port = self.upstream_port
|
||||
elif mode == "NAT":
|
||||
self.eap_connect.upstream_port = self.upstream_port
|
||||
else:
|
||||
client.update_testrail(case_id=test_case, run_id=rid, status_id=5, msg='Client connectivity failed')
|
||||
print("Single client connection to", ssid_name, "unsuccessful. Test Failed")
|
||||
logger.warning("Client connectivity to " + ssid_name + " FAILED")
|
||||
return ("failed")
|
||||
self.eap_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||
if band == "twog":
|
||||
self.eap_connect.radio = self.twog_radios[0]
|
||||
# self.eap_connect.sta_prefix = self.twog_prefix
|
||||
if band == "fiveg":
|
||||
self.eap_connect.radio = self.fiveg_radios[0]
|
||||
# self.eap_connect.sta_prefix = self.fiveg_prefix
|
||||
# self.eap_connect.resource = 1
|
||||
if eap == "TTLS":
|
||||
self.eap_connect.ieee80211w = 0
|
||||
self.eap_connect.station_profile.set_command_flag("add_sta", "80211u_enable", 0)
|
||||
self.eap_connect.identity = identity
|
||||
self.eap_connect.ttls_passwd = ttls_passwd
|
||||
if eap == "TLS":
|
||||
self.eap_connect.key_mgmt = "WPA-EAP-SUITE-B"
|
||||
self.eap_connect.station_profile.set_command_flag("add_sta", "80211u_enable", 0)
|
||||
self.eap_connect.pairwise = "TKIP"
|
||||
self.eap_connect.group = "TKIP"
|
||||
self.eap_connect.eap = "EAP-TLS"
|
||||
|
||||
def testrail_retest(self, test_case, rid, ssid_name, client, logger):
|
||||
client.update_testrail(case_id=test_case, run_id=rid, status_id=4,
|
||||
msg='Error in Client Connectivity Test. Needs to be Re-run')
|
||||
print("Error in test for single client connection to", ssid_name)
|
||||
logger.warning("ERROR testing Client connectivity to " + ssid_name)
|
||||
# self.eap_connect.hs20_enable = False
|
||||
self.eap_connect.ssid = ssid
|
||||
self.eap_connect.password = passkey
|
||||
self.eap_connect.security = security
|
||||
self.eap_connect.sta_list = station_name
|
||||
self.eap_connect.build()
|
||||
self.eap_connect.start(station_name, True, True)
|
||||
self.eap_connect.stop()
|
||||
self.eap_connect.cleanup(station_name)
|
||||
return self.eap_connect.passes()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
lanforge_data = {
|
||||
"ip": "192.168.200.81",
|
||||
"port": 8080,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
"5G-Radio": ["wiphy1"],
|
||||
"AX-Radio": ["wiphy2"],
|
||||
"upstream": "eth1",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan0",
|
||||
"AX-Station-Name": "ax",
|
||||
}
|
||||
obj = RunTest(lanforge_data=lanforge_data, debug=False)
|
||||
# print(obj.eap_connect.json_get("port/1/1/sta0000?fields=ap,ip"))
|
||||
obj.EAP_Connect(station_name=["sta0000", "sta0001"], eap="TTLS", ssid="testing_radius")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
class Reporting:
|
||||
|
||||
def __init__(self):
|
||||
self.rid = None
|
||||
pass
|
||||
|
||||
def update_testrail(self, case_id=None, run_id=None, status_id=1, msg=None):
|
||||
pass
|
||||
pass
|
||||
|
||||
@@ -27,6 +27,7 @@ class APIClient:
|
||||
self.user = tr_user
|
||||
self.password = tr_pw
|
||||
self.project = project
|
||||
self.rid = None
|
||||
if not base_url.endswith('/'):
|
||||
base_url += '/'
|
||||
self.__url = base_url + 'index.php?/api/v2/'
|
||||
@@ -148,9 +149,10 @@ class APIClient:
|
||||
break
|
||||
return run_id
|
||||
|
||||
def update_testrail(self, case_id, run_id, status_id, msg):
|
||||
def update_testrail(self, case_id, status_id, msg):
|
||||
"Update TestRail for a given run_id and case_id"
|
||||
update_flag = False
|
||||
run_id = self.rid
|
||||
# Get the TestRail client account details
|
||||
# Update the result in TestRail using send_post function.
|
||||
# Parameters for add_result_for_case is the combination of runid and case id.
|
||||
|
||||
@@ -1,87 +1,115 @@
|
||||
"""
|
||||
ec420 basic-03
|
||||
ecw5410 basic-01
|
||||
ecw5211 not available in basic
|
||||
wf188n basic-05
|
||||
eap102 basic-06
|
||||
eap101 basic-02
|
||||
wf194c baisc-08-02
|
||||
|
||||
ssh -C -L 8800:lf1:4002 -L 8801:lf1:5901 -L 8802:lf1:8080 -L 8803:lab-ctlr:22 \ # basic-01
|
||||
-L 8720:lf2:4002 -L 8721:lf2:5901 -L 8722:lf2:8080 -L 8723:lab-ctlr:22 \ # basic-02
|
||||
-L 8830:lf3:4002 -L 8831:lf3:5901 -L 8832:lf3:8080 -L 8833:lab-ctlr:22 \ # basic-03
|
||||
-L 8810:lf4:4002 -L 8811:lf4:5901 -L 8812:lf4:8080 -L 8813:lab-ctlr:22 \ # basic-04
|
||||
-L 8850:lf12:4002 -L 8851:lf12:5901 -L 8852:lf12:8080 -L 8853:lab-ctlr4:22 \ # basic-05
|
||||
-L 8860:lf13:4002 -L 8861:lf13:5901 -L 8862:lf13:8080 -L 8863:lab-ctlr4:22 \ # basic-06
|
||||
-L 8870:lf14:4002 -L 8871:lf14:5901 -L 8872:lf14:8080 -L 8873:lab-ctlr4:22 \ # basic-07
|
||||
-L 8880:lf15:4002 -L 8881:lf15:5901 -L 8882:lf15:8080 -L 8883:lab-ctlr4:22 \ # basic-08
|
||||
ubuntu@3.130.51.163
|
||||
|
||||
|
||||
|
||||
ssh -C -L 8800:lf1:4002 -L 8801:lf1:5901 -L 8802:lf1:8080 -L 8803:lab-ctlr:22 \
|
||||
-L 8720:lf2:4002 -L 8721:lf2:5901 -L 8722:lf2:8080 -L 8723:lab-ctlr:22 \
|
||||
-L 8830:lf3:4002 -L 8831:lf3:5901 -L 8832:lf3:8080 -L 8833:lab-ctlr:22 \
|
||||
-L 8810:lf4:4002 -L 8811:lf4:5901 -L 8812:lf4:8080 -L 8813:lab-ctlr:22 \
|
||||
-L 8850:lf12:4002 -L 8851:lf12:5901 -L 8852:lf12:8080 -L 8853:lab-ctlr4:22 \
|
||||
-L 8860:lf13:4002 -L 8861:lf13:5901 -L 8862:lf13:8080 -L 8863:lab-ctlr4:22 \
|
||||
-L 8870:lf14:4002 -L 8871:lf14:5901 -L 8872:lf14:8080 -L 8873:lab-ctlr4:22 \
|
||||
-L 8880:lf15:4002 -L 8881:lf15:5901 -L 8882:lf15:8080 -L 8883:lab-ctlr4:22 \
|
||||
ubuntu@3.130.51.163
|
||||
|
||||
"""
|
||||
|
||||
CONFIGURATION = {
|
||||
|
||||
"ext-05": {
|
||||
"basic-ext-04-01": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-ext-04.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': '1.0.0-SNAPSHOT',
|
||||
'commit_date': '2021-03-01'
|
||||
'version': "1.1.0-SNAPSHOT",
|
||||
'commit_date': "2021-04-27"
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode': 'wifi5',
|
||||
'serial': '903cb3944817',
|
||||
'mode': "wifi5",
|
||||
'serial': '903cb394486f',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.82",
|
||||
'ip': "192.168.200.81",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
'version': "ecw5410-2021-04-23-30496b1"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "192.168.200.82",
|
||||
"ip": "192.168.200.81",
|
||||
"port": 8080,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
"5G-Radio": ["wiphy1"],
|
||||
"AX-Radio": ["wiphy2"],
|
||||
"upstream": "eth1",
|
||||
"upstream": "1.1.eth1",
|
||||
"upstream_subnet": "192.168.200.0/24",
|
||||
"uplink" : "1.1.eth2",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan1",
|
||||
|
||||
"5G-Station-Name": "wlan0",
|
||||
"AX-Station-Name": "ax",
|
||||
}
|
||||
}
|
||||
},
|
||||
"interop": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-01.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': '1.0.0-SNAPSHOT',
|
||||
'commit_date': '2021-03-01'
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode': 'wifi5',
|
||||
'serial': '68215fd2f78c',
|
||||
'jumphost': True,
|
||||
'ip': "localhost",
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 8803,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "Perfecto",
|
||||
"details": {
|
||||
"securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw",
|
||||
"perfectoURL": "tip"
|
||||
"interop": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-01.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': '1.0.0-SNAPSHOT',
|
||||
'commit_date': '2021-03-01'
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode': 'wifi5',
|
||||
'serial': '68215fd2f78c',
|
||||
'jumphost': True,
|
||||
'ip': "localhost",
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 8803,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "Perfecto",
|
||||
"details": {
|
||||
"securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw",
|
||||
"perfectoURL": "tip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
FIRMWARE = {
|
||||
# jFrog parameters
|
||||
"JFROG":
|
||||
{
|
||||
"jfrog-base-url": "https://tip.jFrog.io/artifactory/tip-wlan-ap-firmware",
|
||||
"username": "tip-read",
|
||||
"password": "tip-read",
|
||||
"build": "pending",
|
||||
"branch": "dev"
|
||||
"branch": "trunk"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -152,4 +180,3 @@ TEST_CASES = {
|
||||
"nat_ssid_update": 8743,
|
||||
"vlan_ssid_update": 8744
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import datetime
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
import allure
|
||||
|
||||
sys.path.append(
|
||||
os.path.dirname(
|
||||
@@ -11,7 +12,19 @@ sys.path.append(
|
||||
)
|
||||
if "libs" not in sys.path:
|
||||
sys.path.append(f'../libs')
|
||||
for folder in 'py-json', 'py-scripts':
|
||||
if folder not in sys.path:
|
||||
sys.path.append(f'../lanforge/lanforge-scripts/{folder}')
|
||||
|
||||
sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity")
|
||||
|
||||
sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
|
||||
from LANforge.LFUtils import *
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-scripts')
|
||||
from apnos.apnos import APNOS
|
||||
from controller.controller import Controller
|
||||
from controller.controller import ProfileUtility
|
||||
@@ -24,6 +37,9 @@ from configuration import CONFIGURATION
|
||||
from configuration import FIRMWARE
|
||||
from testrails.testrail_api import APIClient
|
||||
from testrails.reporting import Reporting
|
||||
import sta_connect2
|
||||
from sta_connect2 import StaConnect2
|
||||
from cv_test_manager import cv_test
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
@@ -58,16 +74,10 @@ def pytest_addoption(parser):
|
||||
)
|
||||
# this has to be the last argument
|
||||
# example: --access-points ECW5410 EA8300-EU
|
||||
parser.addoption(
|
||||
"--model",
|
||||
# nargs="+",
|
||||
default="ecw5410",
|
||||
help="AP Model which is needed to test"
|
||||
)
|
||||
parser.addoption(
|
||||
"--testbed",
|
||||
# nargs="+",
|
||||
default="lab-info",
|
||||
default="basic-01",
|
||||
help="AP Model which is needed to test"
|
||||
)
|
||||
parser.addoption(
|
||||
@@ -76,48 +86,29 @@ def pytest_addoption(parser):
|
||||
default=False,
|
||||
help="Stop using Testrails"
|
||||
)
|
||||
parser.addoption(
|
||||
"--exit-on-fail",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="use to stop execution if failure"
|
||||
)
|
||||
|
||||
|
||||
#Perfecto Parameters
|
||||
parser.addini("perfectoURL", "Cloud URL")
|
||||
parser.addini("securityToken", "Security Token")
|
||||
parser.addini("platformName-iOS", "iOS Platform")
|
||||
parser.addini("platformName-android", "Android Platform")
|
||||
parser.addini("model-iOS", "iOS Devices")
|
||||
parser.addini("model-android", "Android Devices")
|
||||
parser.addini("bundleId-iOS", "iOS Devices")
|
||||
parser.addini("bundleId-iOS-Settings", "iOS Settings App")
|
||||
parser.addini("appPackage-android", "Android Devices")
|
||||
parser.addini("bundleId-iOS-Safari", "Safari BundleID")
|
||||
parser.addini("wifi-SSID-2g-Pwd", "Wifi 2g Password")
|
||||
parser.addini("bundleId-iOS-Ping", "Ping Bundle ID")
|
||||
parser.addini("browserType-iOS", "Mobile Browser Name")
|
||||
parser.addini("projectName", "Project Name")
|
||||
parser.addini("projectVersion", "Project Version")
|
||||
parser.addini("jobName", "CI Job Name")
|
||||
parser.addini("jobNumber", "CI Job Number")
|
||||
parser.addini("reportTags", "Report Tags")
|
||||
parser.addoption(
|
||||
"--access-points-perfecto",
|
||||
# nargs="+",
|
||||
default=["Perfecto"],
|
||||
help="list of access points to test"
|
||||
)
|
||||
|
||||
"""
|
||||
Test session base fixture
|
||||
"""
|
||||
|
||||
|
||||
# To be depreciated as testrails will go
|
||||
@pytest.fixture(scope="session")
|
||||
def test_cases():
|
||||
yield TEST_CASES
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_jFrog():
|
||||
yield FIRMWARE["JFROG"]
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def testbed(request):
|
||||
var = request.config.getoption("--testbed")
|
||||
allure.attach(body=str(var),
|
||||
name="Testbed Selected : ")
|
||||
yield var
|
||||
|
||||
|
||||
@@ -131,156 +122,191 @@ def should_upgrade_firmware(request):
|
||||
yield request.config.getoption("--force-upgrade")
|
||||
|
||||
|
||||
"""
|
||||
Instantiate Objects for Test session
|
||||
"""
|
||||
@pytest.fixture(scope="session")
|
||||
def radius_info():
|
||||
allure.attach(body=str(RADIUS_SERVER_DATA), name="Radius server Info: ")
|
||||
yield RADIUS_SERVER_DATA
|
||||
|
||||
|
||||
# Get Configuration data f
|
||||
@pytest.fixture(scope="session")
|
||||
def get_configuration(testbed):
|
||||
allure.attach(body=str(testbed), name="Testbed Selected: ")
|
||||
yield CONFIGURATION[testbed]
|
||||
|
||||
|
||||
# APNOS Library
|
||||
@pytest.fixture(scope="session")
|
||||
def get_apnos():
|
||||
yield APNOS
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_controller(request, testbed):
|
||||
try:
|
||||
sdk_client = Controller(controller_data=CONFIGURATION[testbed]["controller"])
|
||||
def get_equipment_id(setup_controller, testbed, get_configuration):
|
||||
equipment_id_list = []
|
||||
for i in get_configuration['access_point']:
|
||||
equipment_id_list.append(setup_controller.get_equipment_id(
|
||||
serial_number=i['serial']))
|
||||
yield equipment_id_list
|
||||
|
||||
def teardown_session():
|
||||
|
||||
# APNOS SETUP
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_access_point(testbed, get_apnos, get_configuration):
|
||||
# Used to add openwrtctl.py in case of serial console mode
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
if access_point_info["jumphost"]:
|
||||
allure.attach(name="added openwrtctl.py to :",
|
||||
body=access_point_info['ip'] + ":" + str(access_point_info["port"]))
|
||||
get_apnos(access_point_info, pwd="../libs/apnos/")
|
||||
else:
|
||||
allure.attach(name="Direct AP SSH : ",
|
||||
body=access_point_info['ip'] + ":" + str(access_point_info["port"]))
|
||||
# Write a code to verify Access Point Connectivity
|
||||
yield True
|
||||
|
||||
|
||||
# Controller Fixture
|
||||
@pytest.fixture(scope="session")
|
||||
def setup_controller(request, get_configuration, instantiate_access_point, traffic_generator_connectivity):
|
||||
try:
|
||||
sdk_client = Controller(controller_data=get_configuration["controller"])
|
||||
allure.attach(body=str(get_configuration["controller"]), name="Controller Instantiated: ")
|
||||
|
||||
def teardown_controller():
|
||||
print("\nTest session Completed")
|
||||
allure.attach(body=str(get_configuration["controller"]), name="Controller Teardown: ")
|
||||
sdk_client.disconnect_Controller()
|
||||
|
||||
request.addfinalizer(teardown_session)
|
||||
request.addfinalizer(teardown_controller)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
allure.attach(body=str(e), name="Controller Instantiation Failed: ")
|
||||
sdk_client = False
|
||||
yield sdk_client
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def instantiate_firmware(setup_controller, instantiate_jFrog, get_configuration):
|
||||
firmware_client_obj = []
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
firmware_client = FirmwareUtility(jfrog_credentials=instantiate_jFrog, sdk_client=setup_controller,
|
||||
model=access_point_info["model"],
|
||||
version=access_point_info["version"])
|
||||
firmware_client_obj.append(firmware_client)
|
||||
yield firmware_client_obj
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def get_latest_firmware(instantiate_firmware):
|
||||
fw_version_list = []
|
||||
try:
|
||||
|
||||
for fw_obj in instantiate_firmware:
|
||||
latest_firmware = fw_obj.get_fw_version()
|
||||
fw_version_list.append(latest_firmware)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
fw_version_list = []
|
||||
|
||||
yield fw_version_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def upload_firmware(should_upload_firmware, instantiate_firmware, get_latest_firmware):
|
||||
firmware_id_list = []
|
||||
for i in range(0, len(instantiate_firmware)):
|
||||
firmware_id = instantiate_firmware[i].upload_fw_on_cloud(fw_version=get_latest_firmware[i],
|
||||
force_upload=should_upload_firmware)
|
||||
firmware_id_list.append(firmware_id)
|
||||
yield firmware_id_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_firmware_cloud, get_latest_firmware,
|
||||
should_upgrade_firmware):
|
||||
status_list = []
|
||||
if get_latest_firmware != check_ap_firmware_cloud:
|
||||
if request.config.getoption("--skip-upgrade"):
|
||||
status = "skip-upgrade"
|
||||
status_list.append(status)
|
||||
else:
|
||||
|
||||
for i in range(0, len(instantiate_firmware)):
|
||||
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
|
||||
force_upgrade=should_upgrade_firmware)
|
||||
status_list.append(status)
|
||||
else:
|
||||
if should_upgrade_firmware:
|
||||
for i in range(0, len(instantiate_firmware)):
|
||||
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
|
||||
force_upgrade=should_upgrade_firmware)
|
||||
status_list.append(status)
|
||||
else:
|
||||
status = "skip-upgrade Version Already Available"
|
||||
status_list.append(status)
|
||||
yield status_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def check_ap_firmware_cloud(setup_controller, get_equipment_id):
|
||||
ap_fw_list = []
|
||||
for i in get_equipment_id:
|
||||
ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i))
|
||||
yield ap_fw_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def check_ap_firmware_ssh(get_configuration):
|
||||
active_fw_list = []
|
||||
try:
|
||||
for access_point in get_configuration['access_point']:
|
||||
ap_ssh = APNOS(access_point)
|
||||
active_fw = ap_ssh.get_active_firmware()
|
||||
active_fw_list.append(active_fw)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
active_fw_list = []
|
||||
yield active_fw_list
|
||||
|
||||
|
||||
"""
|
||||
Instantiate Reporting
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_testrail(request):
|
||||
def update_report(request, testbed, get_configuration):
|
||||
if request.config.getoption("--skip-testrail"):
|
||||
tr_client = Reporting()
|
||||
else:
|
||||
tr_client = APIClient(request.config.getini("tr_url"), request.config.getini("tr_user"),
|
||||
request.config.getini("tr_pass"), request.config.getini("tr_project_id"))
|
||||
if request.config.getoption("--skip-testrail"):
|
||||
tr_client.rid = "skip testrails"
|
||||
else:
|
||||
projId = tr_client.get_project_id(project_name=request.config.getini("tr_project_id"))
|
||||
test_run_name = request.config.getini("tr_prefix") + testbed + "_" + str(
|
||||
datetime.date.today()) + "_" + get_configuration['access_point'][0]['version']
|
||||
tr_client.create_testrun(name=test_run_name, case_ids=list(TEST_CASES.values()), project_id=projId,
|
||||
milestone_id=request.config.getini("milestone"),
|
||||
description="Automated Nightly Sanity test run for new firmware build")
|
||||
rid = tr_client.get_run_id(test_run_name=test_run_name)
|
||||
tr_client.rid = rid
|
||||
yield tr_client
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_firmware(instantiate_controller, instantiate_jFrog, testbed):
|
||||
firmware_client = FirmwareUtility(jfrog_credentials=instantiate_jFrog, sdk_client=instantiate_controller,
|
||||
model=CONFIGURATION[testbed]["access_point"][0]["model"],
|
||||
version=CONFIGURATION[testbed]["access_point"][0]["version"])
|
||||
yield firmware_client
|
||||
"""
|
||||
FRAMEWORK MARKER LOGIC
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_jFrog():
|
||||
yield FIRMWARE["JFROG"]
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_project(request, instantiate_testrail, testbed, get_latest_firmware):
|
||||
if request.config.getoption("--skip-testrail"):
|
||||
rid = "skip testrails"
|
||||
else:
|
||||
projId = instantiate_testrail.get_project_id(project_name=request.config.getini("tr_project_id"))
|
||||
test_run_name = request.config.getini("tr_prefix") + testbed + "_" + str(
|
||||
datetime.date.today()) + "_" + get_latest_firmware
|
||||
instantiate_testrail.create_testrun(name=test_run_name, case_ids=list(TEST_CASES.values()), project_id=projId,
|
||||
milestone_id=request.config.getini("milestone"),
|
||||
description="Automated Nightly Sanity test run for new firmware build")
|
||||
rid = instantiate_testrail.get_run_id(test_run_name=test_run_name)
|
||||
yield rid
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def setup_lanforge():
|
||||
yield True
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def exit_on_fail(request):
|
||||
yield request.config.getoption("--exit-on-fail")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def setup_perfecto_devices(request):
|
||||
yield True
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def test_cases():
|
||||
yield TEST_CASES
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def apnos_obj(get_configuration, testbed):
|
||||
yield APNOS(get_configuration[testbed]['access_point'][0])
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_access_point(testbed):
|
||||
APNOS(CONFIGURATION[testbed]['access_point'][0], pwd="../libs/apnos/")
|
||||
yield True
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def access_point_connectivity(apnos_obj, get_configuration, testbed):
|
||||
ap_conn = {}
|
||||
config_serial = get_configuration[testbed]['access_point'][0]['serial']
|
||||
ap_serial = apnos_obj.get_serial_number()
|
||||
ap_conn["serial"] = True
|
||||
if ap_serial != config_serial:
|
||||
ap_conn["serial"] = False
|
||||
|
||||
ap_conn["redir"] = False
|
||||
ap_redir = apnos_obj.get_redirector()
|
||||
|
||||
# Compare with something ...
|
||||
|
||||
ap_conn["mgr"] = False
|
||||
status = apnos_obj.get_manager_state()
|
||||
if "ACTIVE" not in status:
|
||||
apnos_obj.run_generic_command(cmd="service opensync restart")
|
||||
time.sleep(30)
|
||||
status = apnos_obj.get_manager_state()
|
||||
if "ACTIVE" in status:
|
||||
ap_conn["mgr"] = True
|
||||
else:
|
||||
ap_conn["mgr"] = True
|
||||
yield ap_conn
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def setup_profile_data(testbed):
|
||||
model = CONFIGURATION[testbed]["access_point"][0]["model"]
|
||||
profile_data = {}
|
||||
for mode in "BRIDGE", "NAT", "VLAN":
|
||||
profile_data[mode] = {}
|
||||
for security in "OPEN", "WPA", "WPA2_P", "WPA2_E", "WEP":
|
||||
profile_data[mode][security] = {}
|
||||
for radio in "2G", "5G":
|
||||
profile_data[mode][security][radio] = {}
|
||||
name_string = f"{'Sanity'}-{testbed}-{model}-{radio}_{security}_{mode}"
|
||||
ssid_name = f"{'Sanity'}-{model}-{radio}_{security}_{mode}"
|
||||
passkey_string = f"{radio}-{security}_{mode}"
|
||||
profile_data[mode][security][radio]["profile_name"] = name_string
|
||||
profile_data[mode][security][radio]["ssid_name"] = ssid_name
|
||||
if mode == "VLAN":
|
||||
profile_data[mode][security][radio]["vlan"] = 100
|
||||
else:
|
||||
profile_data[mode][security][radio]["vlan"] = 1
|
||||
if mode != "NAT":
|
||||
profile_data[mode][security][radio]["mode"] = "BRIDGE"
|
||||
else:
|
||||
profile_data[mode][security][radio]["mode"] = "NAT"
|
||||
if security != "OPEN":
|
||||
profile_data[mode][security][radio]["security_key"] = passkey_string
|
||||
else:
|
||||
profile_data[mode][security][radio]["security_key"] = "[BLANK]"
|
||||
yield profile_data
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_security_flags():
|
||||
security = ["open", "wpa", "wpa2_personal", "wpa2_enterprise", "twog", "fiveg", "radius"]
|
||||
# Add more classifications as we go
|
||||
security = ["open", "wpa", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed",
|
||||
"wpa_wpa2_personal_mixed", "wpa2_enterprise", "wpa3_enterprise", "twog", "fiveg", "radius"]
|
||||
yield security
|
||||
|
||||
|
||||
@@ -300,36 +326,76 @@ def get_markers(request, get_security_flags):
|
||||
else:
|
||||
security_dict[i] = False
|
||||
# print(security_dict)
|
||||
allure.attach(body=str(security_dict), name="Test Cases Requires: ")
|
||||
yield security_dict
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_latest_firmware(instantiate_firmware):
|
||||
try:
|
||||
latest_firmware = instantiate_firmware.get_fw_version()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
latest_firmware = False
|
||||
yield latest_firmware
|
||||
|
||||
|
||||
# Will be availabe as a test case
|
||||
@pytest.fixture(scope="function")
|
||||
def check_ap_firmware_ssh(testbed):
|
||||
try:
|
||||
ap_ssh = APNOS(CONFIGURATION[testbed]['access_point'][0])
|
||||
active_fw = ap_ssh.get_active_firmware()
|
||||
print(active_fw)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
active_fw = False
|
||||
yield active_fw
|
||||
def test_access_point(testbed, get_apnos, get_configuration):
|
||||
mgr_status = []
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point_info)
|
||||
# ap_ssh.reboot()
|
||||
# time.sleep(100)
|
||||
status = ap_ssh.get_manager_state()
|
||||
if "ACTIVE" not in status:
|
||||
time.sleep(30)
|
||||
ap_ssh = APNOS(access_point_info)
|
||||
status = ap_ssh.get_manager_state()
|
||||
mgr_status.append(status)
|
||||
yield mgr_status
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def radius_info():
|
||||
yield RADIUS_SERVER_DATA
|
||||
def client_connectivity():
|
||||
yield StaConnect2
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_configuration():
|
||||
yield CONFIGURATION
|
||||
def get_lanforge_data(get_configuration):
|
||||
lanforge_data = {}
|
||||
if get_configuration['traffic_generator']['name'] == 'lanforge':
|
||||
lanforge_data = {
|
||||
"lanforge_ip": get_configuration['traffic_generator']['details']['ip'],
|
||||
"lanforge-port-number": get_configuration['traffic_generator']['details']['port'],
|
||||
"lanforge_2dot4g": get_configuration['traffic_generator']['details']['2.4G-Radio'][0],
|
||||
"lanforge_5g": get_configuration['traffic_generator']['details']['5G-Radio'][0],
|
||||
"lanforge_2dot4g_prefix": get_configuration['traffic_generator']['details']['2.4G-Station-Name'],
|
||||
"lanforge_5g_prefix": get_configuration['traffic_generator']['details']['5G-Station-Name'],
|
||||
"lanforge_2dot4g_station": get_configuration['traffic_generator']['details']['2.4G-Station-Name'],
|
||||
"lanforge_5g_station": get_configuration['traffic_generator']['details']['5G-Station-Name'],
|
||||
"lanforge_bridge_port": get_configuration['traffic_generator']['details']['upstream'],
|
||||
"lanforge_vlan_port": get_configuration['traffic_generator']['details']['upstream'] + ".100",
|
||||
"vlan": 100
|
||||
}
|
||||
yield lanforge_data
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def traffic_generator_connectivity(testbed, get_configuration):
|
||||
if get_configuration['traffic_generator']['name'] == "lanforge":
|
||||
lanforge_ip = get_configuration['traffic_generator']['details']['ip']
|
||||
lanforge_port = get_configuration['traffic_generator']['details']['port']
|
||||
# Condition :
|
||||
# if gui connection is not available
|
||||
# yield False
|
||||
# Condition :
|
||||
# If Gui Connection is available
|
||||
# yield the gui version
|
||||
try:
|
||||
cv = cv_test(lanforge_ip, lanforge_port)
|
||||
url_data = cv.get_ports("/")
|
||||
lanforge_GUI_version = url_data["VersionInfo"]["BuildVersion"]
|
||||
lanforge_gui_git_version = url_data["VersionInfo"]["GitVersion"]
|
||||
lanforge_gui_build_date = url_data["VersionInfo"]["BuildDate"]
|
||||
print(lanforge_GUI_version, lanforge_gui_build_date, lanforge_gui_git_version)
|
||||
if not (lanforge_GUI_version or lanforge_gui_build_date or lanforge_gui_git_version):
|
||||
yield False
|
||||
else:
|
||||
yield True
|
||||
except:
|
||||
yield False
|
||||
else:
|
||||
# Writing the connectivity check of InterOP
|
||||
yield True
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
"""
|
||||
Test Case Module: setup test cases for basic test cases
|
||||
Details: Firmware Upgrade
|
||||
|
||||
"""
|
||||
import pytest
|
||||
import time
|
||||
|
||||
@pytest.mark.configure_lanforge
|
||||
def test_configure_lanforge(configure_lanforge):
|
||||
@@ -11,6 +13,34 @@ def test_configure_lanforge(configure_lanforge):
|
||||
assert True
|
||||
|
||||
|
||||
@pytest.mark.lanforge_scenario_setup_dut
|
||||
def test_lanforge_scenario_setup_dut(create_lanforge_chamberview_dut):
|
||||
print(create_lanforge_chamberview_dut)
|
||||
ssid = [
|
||||
['ssid_idx=0 ssid=Default-SSID-2g password=12345678 bssid=90:3c:b3:94:48:58'],
|
||||
['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59']
|
||||
]
|
||||
|
||||
create_lanforge_chamberview_dut.ssid = ssid
|
||||
create_lanforge_chamberview_dut.setup()
|
||||
create_lanforge_chamberview_dut.add_ssids()
|
||||
create_lanforge_chamberview_dut.cv_test.show_text_blob(None, None, True) # Show changes on GUI
|
||||
create_lanforge_chamberview_dut.cv_test.sync_cv()
|
||||
time.sleep(2)
|
||||
create_lanforge_chamberview_dut.cv_test.show_text_blob(None, None, True) # Show changes on GUI
|
||||
create_lanforge_chamberview_dut.cv_test.sync_cv()
|
||||
|
||||
assert True
|
||||
|
||||
@pytest.mark.lanforge_scenario_setup
|
||||
def test_lanforge_scenario_setup(create_lanforge_chamberview):
|
||||
# raw_line = [
|
||||
# ["profile_link 1.1 vlan-100 1 NA NA eth2,AUTO -1 100"]
|
||||
# ]
|
||||
# print(create_lanforge_chamberview.setup_scenario(create_scenario="TIP-test",raw_line=raw_line))
|
||||
# create_lanforge_chamberview.build_scenario("TIP-test")
|
||||
assert True
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.bridge
|
||||
@pytest.mark.nat
|
||||
@@ -79,3 +109,87 @@ def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, instantiate_tes
|
||||
msg='Cannot reach AP after upgrade to check CLI - re-test required')
|
||||
|
||||
assert check_ap_firmware_ssh == get_latest_firmware
|
||||
|
||||
|
||||
# """
|
||||
# Test Case Module: setup test cases for basic test cases
|
||||
# Details: Firmware Upgrade
|
||||
#
|
||||
# """
|
||||
# import pytest
|
||||
#
|
||||
# @pytest.mark.configure_lanforge
|
||||
# def test_configure_lanforge(configure_lanforge):
|
||||
#
|
||||
# assert True
|
||||
#
|
||||
#
|
||||
# @pytest.mark.sanity
|
||||
# @pytest.mark.bridge
|
||||
# @pytest.mark.nat
|
||||
# @pytest.mark.vlan
|
||||
# @pytest.mark.firmware
|
||||
# class TestFirmware(object):
|
||||
#
|
||||
# @pytest.mark.firmware_create
|
||||
# def test_firmware_create(self, upload_firmware, instantiate_testrail, instantiate_project, test_cases):
|
||||
# if upload_firmware != 0:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["create_fw"], run_id=instantiate_project,
|
||||
# status_id=1,
|
||||
# msg='Create new FW version by API successful')
|
||||
# PASS = True
|
||||
# else:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["create_fw"], run_id=instantiate_project,
|
||||
# status_id=5,
|
||||
# msg='Error creating new FW version by API')
|
||||
# PASS = False
|
||||
# assert PASS
|
||||
#
|
||||
# @pytest.mark.firmware_upgrade
|
||||
# def test_firmware_upgrade_request(self, upgrade_firmware, instantiate_testrail, instantiate_project, test_cases):
|
||||
# print()
|
||||
# if not upgrade_firmware:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["upgrade_api"], run_id=instantiate_project,
|
||||
# status_id=0,
|
||||
# msg='Error requesting upgrade via API')
|
||||
# PASS = False
|
||||
# else:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["upgrade_api"], run_id=instantiate_project,
|
||||
# status_id=1,
|
||||
# msg='Upgrade request using API successful')
|
||||
# PASS = True
|
||||
# assert PASS
|
||||
#
|
||||
# @pytest.mark.check_active_firmware_cloud
|
||||
# def test_active_version_cloud(self, get_latest_firmware, check_ap_firmware_cloud, instantiate_testrail,
|
||||
# instantiate_project, test_cases):
|
||||
# if get_latest_firmware != check_ap_firmware_cloud:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["cloud_fw"], run_id=instantiate_project,
|
||||
# status_id=5,
|
||||
# msg='CLOUDSDK reporting incorrect firmware version.')
|
||||
# else:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["cloud_fw"], run_id=instantiate_project,
|
||||
# status_id=1,
|
||||
# msg='CLOUDSDK reporting correct firmware version.')
|
||||
#
|
||||
# assert get_latest_firmware == check_ap_firmware_cloud
|
||||
#
|
||||
#
|
||||
# @pytest.mark.sanity
|
||||
# @pytest.mark.bridge
|
||||
# @pytest.mark.nat
|
||||
# @pytest.mark.vlan
|
||||
# @pytest.mark.check_active_firmware_ap
|
||||
# def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, instantiate_testrail, instantiate_project,
|
||||
# test_cases):
|
||||
# if check_ap_firmware_ssh == get_latest_firmware:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["ap_upgrade"], run_id=instantiate_project,
|
||||
# status_id=1,
|
||||
# msg='Upgrade to ' + get_latest_firmware + ' successful')
|
||||
# else:
|
||||
# instantiate_testrail.update_testrail(case_id=test_cases["ap_upgrade"], run_id=instantiate_project,
|
||||
# status_id=4,
|
||||
# msg='Cannot reach AP after upgrade to check CLI - re-test required')
|
||||
#
|
||||
# assert check_ap_firmware_ssh == get_latest_firmware
|
||||
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
"""
|
||||
Test Case Module: setup test cases for bridge mode sanity
|
||||
Details: bridge mode setup
|
||||
|
||||
"""
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.setup_bridge
|
||||
@pytest.mark.bridge
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles, create_profiles',
|
||||
[(["BRIDGE"], ["BRIDGE"])],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("create_profiles")
|
||||
class TestSetupBridge:
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
if create_profiles['ssid_2g_wpa_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_wpa2_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa2_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa2_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa2_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.radius
|
||||
def test_setup_radius_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['radius_profile']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['radius_profile']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_eap_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_eap_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_eap_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_eap_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ap_bridge']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_bridge"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ap_bridge']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_bridge"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['bridge_vifc']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["bridge_vifc"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['bridge_vifc']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["bridge_vifc"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
if setup_profiles['bridge_vifs']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["bridge_vifs"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['bridge_vifs']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["bridge_vifs"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -1,174 +0,0 @@
|
||||
"""
|
||||
Test Case Module: setup test cases for nat mode sanity
|
||||
Details: nat mode setup
|
||||
|
||||
"""
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.setup_nat
|
||||
@pytest.mark.nat
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles, create_profiles',
|
||||
[(["NAT"], ["NAT"])],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("create_profiles")
|
||||
class TestSetupnat:
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
if create_profiles['ssid_2g_wpa_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_wpa2_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa2_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa2_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa2_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.radius
|
||||
def test_setup_radius_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['radius_profile']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['radius_profile']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_eap_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_eap_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_eap_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_eap_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ap_nat']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_nat"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ap_nat']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_nat"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['nat_vifc']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["nat_vifc"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['nat_vifc']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["nat_vifc"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
if setup_profiles['nat_vifs']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["nat_vifs"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['nat_vifs']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["nat_vifs"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -1,177 +0,0 @@
|
||||
"""
|
||||
Test Case Module: setup test cases for vlan mode sanity
|
||||
Details: vlan mode setup
|
||||
|
||||
"""
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.setup_vlan
|
||||
@pytest.mark.vlan
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles, create_profiles',
|
||||
[(["VLAN"], ["VLAN"])],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("create_profiles")
|
||||
class TestSetupvlan:
|
||||
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
if create_profiles['ssid_2g_wpa_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_wpa2_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_wpa2_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_wpa2_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_wpa2_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_wpa2_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_wpa2_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.radius
|
||||
def test_setup_radius_profile(self, create_profiles, instantiate_testrail, instantiate_project, test_cases):
|
||||
|
||||
if create_profiles['radius_profile']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['radius_profile']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["radius_profile"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_2g_eap_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_2g_eap_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_2g_eap_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.radius
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ssid_5g_eap_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ssid_5g_eap_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ssid_5g_eap_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, create_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if create_profiles['ap_vlan']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_vlan"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert create_profiles['ap_vlan']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["ap_vlan"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vlan_vifc']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["vlan_vifc"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vlan_vifc']
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["vlan_vifc"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, instantiate_testrail, instantiate_project,
|
||||
test_cases):
|
||||
if setup_profiles['vlan_vifs']:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["vlan_vifs"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
|
||||
assert setup_profiles['vlan_vifs']
|
||||
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["vlan_vifs"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -0,0 +1,494 @@
|
||||
import allure
|
||||
import pytest
|
||||
import time
|
||||
|
||||
pytestmark = [pytest.mark.setup, pytest.mark.bridge, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.basic
|
||||
@allure.feature("BRIDGE MODE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupBridge(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupBridgeEnterprise(object):
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa2_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa2_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -0,0 +1,494 @@
|
||||
import allure
|
||||
import pytest
|
||||
import time
|
||||
|
||||
pytestmark = [pytest.mark.setup, pytest.mark.NAT, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.basic
|
||||
@allure.feature("NAT MODE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupNAT(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNATModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@allure.feature("NAT MODE ENTERPRISE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupNATEnterprise(object):
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa2_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa2_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -0,0 +1,494 @@
|
||||
import allure
|
||||
import pytest
|
||||
import time
|
||||
|
||||
pytestmark = [pytest.mark.setup, pytest.mark.VLAN, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.basic
|
||||
@allure.feature("VLAN MODE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupVLAN(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestVLANModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['open_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['open_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['open_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["open_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa2_personal_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_personal_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@allure.feature("VLAN MODE ENTERPRISE SETUP")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestSetupVLANEnterprise(object):
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
if setup_profiles['wpa2_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
|
||||
if setup_profiles['wpa2_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_2g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_2g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['wpa3_enterprise_5g']:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['wpa3_enterprise_5g']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['equipment_ap']:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=1,
|
||||
msg='profile created successfully')
|
||||
assert setup_profiles['equipment_ap']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["equipment_ap"],
|
||||
status_id=5,
|
||||
msg='Failed to create profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_config(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
|
||||
if setup_profiles['vifc']:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
assert setup_profiles['vifc']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifc"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
assert False
|
||||
|
||||
def test_verify_vif_state(self, setup_profiles, update_report,
|
||||
test_cases):
|
||||
if setup_profiles['vifs']:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=1,
|
||||
msg='profile pushed successfully')
|
||||
time.sleep(100)
|
||||
assert setup_profiles['vifs']
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["vifs"],
|
||||
status_id=5,
|
||||
msg='Failed to push profile')
|
||||
time.sleep(100)
|
||||
assert False
|
||||
@@ -1,31 +1,19 @@
|
||||
"""
|
||||
conftest.py : Contains fixtures that are specific to basic testbed environment
|
||||
|
||||
Basic Test Scenario : 1 AP, 1 LANforge, 1 Controller Instance
|
||||
|
||||
Includes:
|
||||
|
||||
Setup:
|
||||
setup_profiles
|
||||
create_profiles
|
||||
|
||||
Utilities:
|
||||
update_ssid
|
||||
|
||||
Information:
|
||||
Setup Fixtures: Every Test case Needs to use setup fixtures
|
||||
Setup Fixtures can be customised for all different levels of execution:
|
||||
session level
|
||||
package level
|
||||
module level
|
||||
class level
|
||||
function level
|
||||
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
|
||||
for folder in 'py-json', 'py-scripts':
|
||||
if folder not in sys.path:
|
||||
sys.path.append(f'../lanforge/lanforge-scripts/{folder}')
|
||||
|
||||
sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity")
|
||||
|
||||
sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
|
||||
from LANforge.LFUtils import *
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-scripts')
|
||||
|
||||
sys.path.append(
|
||||
os.path.dirname(
|
||||
@@ -35,11 +23,11 @@ sys.path.append(
|
||||
if "libs" not in sys.path:
|
||||
sys.path.append(f'../libs')
|
||||
|
||||
from apnos.apnos import APNOS
|
||||
from controller.controller import Controller
|
||||
from controller.controller import ProfileUtility
|
||||
from controller.controller import FirmwareUtility
|
||||
import time
|
||||
from lanforge.lf_tests import RunTest
|
||||
import pytest
|
||||
|
||||
import logging
|
||||
from configuration import RADIUS_SERVER_DATA
|
||||
from configuration import TEST_CASES
|
||||
@@ -47,13 +35,17 @@ from configuration import CONFIGURATION
|
||||
from configuration import FIRMWARE
|
||||
from testrails.testrail_api import APIClient
|
||||
from testrails.reporting import Reporting
|
||||
import allure
|
||||
from cv_test_manager import cv_test
|
||||
from create_chamberview import CreateChamberview
|
||||
from create_chamberview_dut import DUT
|
||||
|
||||
"""
|
||||
Basic Setup Collector
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
@pytest.fixture(scope="session")
|
||||
def get_lanforge_data(testbed):
|
||||
lanforge_data = {}
|
||||
if CONFIGURATION[testbed]['traffic_generator']['name'] == 'lanforge':
|
||||
@@ -83,223 +75,362 @@ def instantiate_profile(instantiate_controller):
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_equipment_id(instantiate_controller, testbed):
|
||||
equipment_id = 0
|
||||
if len(CONFIGURATION[testbed]['access_point']) == 1:
|
||||
equipment_id = instantiate_controller.get_equipment_id(
|
||||
serial_number=CONFIGURATION[testbed]['access_point'][0]['serial'])
|
||||
print(equipment_id)
|
||||
yield equipment_id
|
||||
def instantiate_profile():
|
||||
yield ProfileUtility
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def upload_firmware(should_upload_firmware, instantiate_firmware, get_latest_firmware):
|
||||
firmware_id = instantiate_firmware.upload_fw_on_cloud(fw_version=get_latest_firmware,
|
||||
force_upload=should_upload_firmware)
|
||||
yield firmware_id
|
||||
def setup_vlan():
|
||||
vlan_id = [100]
|
||||
allure.attach(body=str(vlan_id), name="VLAN Created: ")
|
||||
yield vlan_id[0]
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_firmware_cloud, get_latest_firmware,
|
||||
should_upgrade_firmware):
|
||||
if get_latest_firmware != check_ap_firmware_cloud:
|
||||
if request.config.getoption("--skip-upgrade"):
|
||||
status = "skip-upgrade"
|
||||
else:
|
||||
status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
|
||||
force_upgrade=should_upgrade_firmware)
|
||||
else:
|
||||
if should_upgrade_firmware:
|
||||
status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
|
||||
force_upgrade=should_upgrade_firmware)
|
||||
else:
|
||||
status = "skip-upgrade"
|
||||
yield status
|
||||
@allure.feature("CLIENT CONNECTIVITY SETUP")
|
||||
@pytest.fixture(scope="class")
|
||||
def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_id,
|
||||
instantiate_profile, get_markers,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos):
|
||||
instantiate_profile = instantiate_profile(sdk_client=setup_controller)
|
||||
vlan_id, mode = 0, 0
|
||||
instantiate_profile.cleanup_objects()
|
||||
parameter = dict(request.param)
|
||||
print(parameter)
|
||||
test_cases = {}
|
||||
profile_data = {}
|
||||
if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]:
|
||||
print("Invalid Mode: ", parameter['mode'])
|
||||
allure.attach(body=parameter['mode'], name="Invalid Mode: ")
|
||||
yield test_cases
|
||||
|
||||
if parameter['mode'] == "NAT":
|
||||
mode = "NAT"
|
||||
vlan_id = 1
|
||||
if parameter['mode'] == "BRIDGE":
|
||||
mode = "BRIDGE"
|
||||
vlan_id = 1
|
||||
if parameter['mode'] == "VLAN":
|
||||
mode = "BRIDGE"
|
||||
vlan_id = setup_vlan
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def check_ap_firmware_cloud(instantiate_controller, get_equipment_id):
|
||||
yield instantiate_controller.get_ap_firmware_old_method(equipment_id=get_equipment_id)
|
||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Equipment-AP-" + parameter['mode'])
|
||||
|
||||
profile_data["equipment_ap"] = {"profile_name": testbed + "-Equipment-AP-" + parameter['mode']}
|
||||
profile_data["ssid"] = {}
|
||||
for i in parameter["ssid_modes"]:
|
||||
profile_data["ssid"][i] = []
|
||||
for j in range(len(parameter["ssid_modes"][i])):
|
||||
profile_name = testbed + "-SSID-" + i + "-" + str(j) + "-" + parameter['mode']
|
||||
data = parameter["ssid_modes"][i][j]
|
||||
data["profile_name"] = profile_name
|
||||
if "mode" not in dict(data).keys():
|
||||
data["mode"] = mode
|
||||
if "vlan" not in dict(data).keys():
|
||||
data["vlan"] = vlan_id
|
||||
instantiate_profile.delete_profile_by_name(profile_name=profile_name)
|
||||
profile_data["ssid"][i].append(data)
|
||||
# print(profile_name)
|
||||
# print(profile_data)
|
||||
|
||||
"""
|
||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
||||
time.sleep(10)
|
||||
"""
|
||||
Setting up rf profile
|
||||
"""
|
||||
rf_profile_data = {
|
||||
"name": "RF-Profile-" + testbed + "-" + parameter['mode'] + "-" +
|
||||
get_configuration['access_point'][0]['mode']
|
||||
}
|
||||
|
||||
Profiles Related Fixtures
|
||||
for i in parameter["rf"]:
|
||||
rf_profile_data[i] = parameter['rf'][i]
|
||||
# print(rf_profile_data)
|
||||
|
||||
"""
|
||||
try:
|
||||
instantiate_profile.delete_profile_by_name(profile_name=rf_profile_data['name'])
|
||||
instantiate_profile.set_rf_profile(profile_data=rf_profile_data,
|
||||
mode=get_configuration['access_point'][0]['mode'])
|
||||
allure.attach(body=str(rf_profile_data),
|
||||
name="RF Profile Created : " + get_configuration['access_point'][0]['mode'])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
allure.attach(body=str(e), name="Exception ")
|
||||
|
||||
# Radius Profile Creation
|
||||
if parameter["radius"]:
|
||||
radius_info = radius_info
|
||||
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + testbed
|
||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + testbed)
|
||||
try:
|
||||
# pass
|
||||
instantiate_profile.create_radius_profile(radius_info=radius_info)
|
||||
allure.attach(body=str(radius_info),
|
||||
name="Radius Profile Created")
|
||||
test_cases['radius_profile'] = True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases['radius_profile'] = False
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def get_current_profile_cloud(instantiate_profile):
|
||||
# SSID Profile Creation
|
||||
print(get_markers)
|
||||
for mode in profile_data['ssid']:
|
||||
if mode == "open":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||
test_cases["open_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["open_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||
test_cases["open_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["open_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
if mode == "wpa":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa2_personal":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_personal_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_personal_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_personal_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
if mode == "wpa_wpa2_personal_mixed":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_wpa2_personal_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_wpa2_personal_mixed_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa3_personal":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_personal_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa3_personal_mixed":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_personal_mixed_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_personal_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
if mode == "wpa2_enterprise":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_enterprise_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_enterprise_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
if mode == "wpa3_enterprise":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
# print(j)
|
||||
if mode in get_markers.keys() and get_markers[mode]:
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_enterprise_2g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_enterprise_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
# Equipment AP Profile Creation
|
||||
try:
|
||||
instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap'])
|
||||
test_cases["equipment_ap"] = True
|
||||
allure.attach(body=str(profile_data['equipment_ap']),
|
||||
name="Equipment AP Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["equipment_ap"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="Equipment AP Profile Creation Failed")
|
||||
|
||||
# Push the Equipment AP Profile to AP
|
||||
try:
|
||||
for i in get_equipment_id:
|
||||
instantiate_profile.push_profile_old_method(equipment_id=i)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("failed to create AP Profile")
|
||||
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||
ssid_names = []
|
||||
for i in instantiate_profile.profile_creation_ids["ssid"]:
|
||||
ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
||||
yield ssid_names
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def setup_profiles(request, create_profiles, instantiate_profile, get_equipment_id, get_current_profile_cloud, testbed):
|
||||
test_cases = {}
|
||||
mode = str(request.param[0]).lower()
|
||||
try:
|
||||
instantiate_profile.push_profile_old_method(equipment_id=get_equipment_id)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("failed to Push Profile")
|
||||
ap_ssh = APNOS(CONFIGURATION[testbed]['access_point'][0], pwd="../libs/apnos/")
|
||||
get_current_profile_cloud.sort()
|
||||
# This loop will check the VIF Config with cloud profile
|
||||
for i in range(0, 18):
|
||||
vif_config = list(ap_ssh.get_vif_config_ssids())
|
||||
vif_config.sort()
|
||||
print(vif_config)
|
||||
print(get_current_profile_cloud)
|
||||
if get_current_profile_cloud == vif_config:
|
||||
test_cases[mode + '_vifc'] = True
|
||||
break
|
||||
time.sleep(10)
|
||||
ap_ssh = APNOS(CONFIGURATION[testbed]['access_point'][0], pwd="../libs/apnos/")
|
||||
# This loop will check the VIF Config with VIF State
|
||||
for i in range(0, 18):
|
||||
vif_state = list(ap_ssh.get_vif_state_ssids())
|
||||
vif_state.sort()
|
||||
vif_config = list(ap_ssh.get_vif_config_ssids())
|
||||
vif_config.sort()
|
||||
print(vif_config)
|
||||
print(vif_state)
|
||||
if vif_state == vif_config:
|
||||
test_cases[mode + '_vifs'] = True
|
||||
break
|
||||
time.sleep(10)
|
||||
#
|
||||
yield test_cases
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def create_profiles(request, testbed, get_security_flags, get_markers, instantiate_profile, setup_profile_data):
|
||||
profile_id = {"ssid": [], "rf": None, "radius": None, "equipment_ap": None}
|
||||
mode = str(request.param[0])
|
||||
test_cases = {}
|
||||
if mode not in ["BRIDGE", "NAT", "VLAN"]:
|
||||
print("Invalid Mode: ", mode)
|
||||
yield False
|
||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Equipment-AP-" + mode)
|
||||
for i in setup_profile_data[mode]:
|
||||
for j in setup_profile_data[mode][i]:
|
||||
instantiate_profile.delete_profile_by_name(
|
||||
profile_name=setup_profile_data[mode][i][j]['profile_name'])
|
||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
||||
instantiate_profile.get_default_profiles()
|
||||
profile_data = {
|
||||
"name": "RF-Profile-" + CONFIGURATION[testbed]['access_point'][0]['mode'] +
|
||||
CONFIGURATION[testbed]['access_point'][0]['model'] + "_" + mode + "_" + testbed
|
||||
}
|
||||
instantiate_profile.delete_profile_by_name(profile_name=profile_data['name'])
|
||||
instantiate_profile.set_rf_profile(profile_data=profile_data,
|
||||
mode=CONFIGURATION[testbed]['access_point'][0]['mode'])
|
||||
# Create RF Profile Here
|
||||
if get_markers["radius"]:
|
||||
radius_info = RADIUS_SERVER_DATA
|
||||
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + mode
|
||||
try:
|
||||
instantiate_profile.create_radius_profile(radius_info=radius_info)
|
||||
test_cases['radius_profile'] = True
|
||||
except Exception as e:
|
||||
test_cases['radius_profile'] = False
|
||||
for i in get_security_flags:
|
||||
if get_markers[i] and i == "open":
|
||||
if get_markers["twog"]:
|
||||
profile_data = setup_profile_data[mode]["OPEN"]["2G"]
|
||||
try:
|
||||
id = instantiate_profile.create_open_ssid_profile(two4g=True, fiveg=False,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_2g_open_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_2g_open_' + mode.lower()] = False
|
||||
if get_markers["fiveg"]:
|
||||
profile_data = setup_profile_data[mode]["OPEN"]["5G"]
|
||||
try:
|
||||
id = instantiate_profile.create_open_ssid_profile(two4g=False, fiveg=True,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_5g_open_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_5g_open_' + mode.lower()] = False
|
||||
if get_markers[i] and i == "wpa":
|
||||
if get_markers["twog"]:
|
||||
profile_data = setup_profile_data[mode]["WPA"]["2G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa_ssid_profile(two4g=True, fiveg=False, profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_2g_wpa_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_5g_wpa_' + mode.lower()] = False
|
||||
if get_markers["fiveg"]:
|
||||
profile_data = setup_profile_data[mode]["WPA"]["5G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa_ssid_profile(two4g=False, fiveg=True, profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_5g_wpa_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_5g_wpa_' + mode.lower()] = False
|
||||
if get_markers[i] and i == "wpa2_personal":
|
||||
if get_markers["twog"]:
|
||||
profile_data = setup_profile_data[mode]["WPA2_P"]["2G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa2_personal_ssid_profile(two4g=True, fiveg=False,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_2g_wpa2_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_2g_wpa2_' + mode.lower()] = False
|
||||
if get_markers["fiveg"]:
|
||||
profile_data = setup_profile_data[mode]["WPA2_P"]["5G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa2_personal_ssid_profile(two4g=False, fiveg=True,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_5g_wpa2_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_5g_wpa2_' + mode.lower()] = False
|
||||
if get_markers[i] and i == "wpa2_enterprise":
|
||||
if get_markers["twog"]:
|
||||
profile_data = setup_profile_data[mode]["WPA2_E"]["2G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa2_enterprise_ssid_profile(two4g=True, fiveg=False,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_2g_eap_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_2g_eap_' + mode.lower()] = False
|
||||
if get_markers["fiveg"]:
|
||||
profile_data = setup_profile_data[mode]["WPA2_E"]["5G"]
|
||||
try:
|
||||
id = instantiate_profile.create_wpa2_enterprise_ssid_profile(two4g=False, fiveg=True,
|
||||
profile_data=profile_data)
|
||||
profile_id["ssid"].append(profile_data['ssid_name'])
|
||||
test_cases['ssid_5g_eap_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
test_cases['ssid_5g_eap_' + mode.lower()] = False
|
||||
|
||||
# Create Equipment AP Profile Here
|
||||
profile_data = {
|
||||
"profile_name": testbed + "-Equipment-AP-" + mode
|
||||
}
|
||||
try:
|
||||
instantiate_profile.set_ap_profile(profile_data=profile_data)
|
||||
test_cases['ap_' + mode.lower()] = True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases['ap_' + mode.lower()] = False
|
||||
|
||||
def teardown_profiles():
|
||||
print("\nRemoving Profiles")
|
||||
instantiate_profile.delete_profile_by_name(profile_name=profile_data['profile_name'])
|
||||
time.sleep(20)
|
||||
|
||||
request.addfinalizer(teardown_profiles)
|
||||
yield test_cases
|
||||
ssid_names.sort()
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
@@ -315,3 +446,83 @@ def update_ssid(request, instantiate_profile, setup_profile_data):
|
||||
time.sleep(90)
|
||||
yield status
|
||||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
def create_lanforge_chamberview(create_lanforge_chamberview_dut, get_configuration, testbed):
|
||||
lanforge_data = get_configuration['traffic_generator']['details']
|
||||
ip = lanforge_data["ip"]
|
||||
port = lanforge_data["port"]
|
||||
upstream_port = lanforge_data["upstream"] # eth1
|
||||
uplink_port = lanforge_data["uplink"] # eth2
|
||||
upstream_subnet = lanforge_data["upstream_subnet"]
|
||||
scenario_name = "TIP-" + testbed
|
||||
upstream_res = upstream_port.split(".")[0] + "." + upstream_port.split(".")[1]
|
||||
uplink_res = uplink_port.split(".")[0] + "." + uplink_port.split(".")[1]
|
||||
print(ip)
|
||||
print(upstream_port, upstream_res, upstream_port.split(".")[2])
|
||||
# "profile_link 1.1 upstream-dhcp 1 NA NA eth2,AUTO -1 NA"
|
||||
# "profile_link 1.1 uplink-nat 1 'DUT: upstream LAN 10.28.2.1/24' NA eth1,eth2 -1 NA"
|
||||
raw_line = [
|
||||
["profile_link " + upstream_res + " upstream-dhcp 1 NA NA " + upstream_port.split(".")[2] + ",AUTO -1 NA"]
|
||||
, ["profile_link " + uplink_res + " uplink-nat 1 'DUT: upstream LAN "
|
||||
+ upstream_subnet + "' NA " + uplink_port.split(".")[2] + " -1 NA"]
|
||||
]
|
||||
print(raw_line)
|
||||
Create_Chamberview = CreateChamberview(ip, port)
|
||||
Create_Chamberview.clean_cv_scenario()
|
||||
Create_Chamberview.clean_cv_scenario(type="Network-Connectivity", scenario_name=scenario_name)
|
||||
|
||||
Create_Chamberview.setup(create_scenario=scenario_name,
|
||||
raw_line=raw_line)
|
||||
|
||||
Create_Chamberview.build(scenario_name)
|
||||
Create_Chamberview.show_text_blob(None, None, True) # Show changes on GUI
|
||||
yield Create_Chamberview
|
||||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
def create_lanforge_chamberview_dut(get_configuration, testbed):
|
||||
ap_model = get_configuration["access_point"][0]["model"]
|
||||
version = get_configuration["access_point"][0]["version"]
|
||||
serial = get_configuration["access_point"][0]["serial"]
|
||||
# ap_model = get_configuration["access_point"][0]["model"]
|
||||
lanforge_data = get_configuration['traffic_generator']['details']
|
||||
ip = lanforge_data["ip"]
|
||||
port = lanforge_data["port"]
|
||||
dut = DUT(lfmgr=ip,
|
||||
port=port,
|
||||
dut_name=testbed,
|
||||
sw_version=version,
|
||||
model_num=ap_model,
|
||||
serial_num=serial
|
||||
)
|
||||
dut.setup()
|
||||
yield dut
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def lf_test(get_configuration):
|
||||
obj = RunTest(lanforge_data=get_configuration['traffic_generator']['details'])
|
||||
yield obj
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def station_names_twog(request, get_configuration):
|
||||
station_names = []
|
||||
for i in range(0, int(request.config.getini("num_stations"))):
|
||||
station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i))
|
||||
yield station_names
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def station_names_fiveg(request, get_configuration):
|
||||
station_names = []
|
||||
for i in range(0, int(request.config.getini("num_stations"))):
|
||||
station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i))
|
||||
yield station_names
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def num_stations(request):
|
||||
num_sta = int(request.config.getini("num_stations"))
|
||||
yield num_sta
|
||||
|
||||
69
tests/e2e/basic/test_firmware.py
Normal file
69
tests/e2e/basic/test_firmware.py
Normal file
@@ -0,0 +1,69 @@
|
||||
"""
|
||||
Test Case Module: setup test cases for basic test cases
|
||||
Details: Firmware Upgrade
|
||||
|
||||
"""
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.firmware, pytest.mark.sanity]
|
||||
|
||||
|
||||
@pytest.mark.firmware_cloud
|
||||
class TestFirmware(object):
|
||||
|
||||
@pytest.mark.firmware_create
|
||||
def test_firmware_create(self, upload_firmware, update_report, test_cases):
|
||||
if upload_firmware != 0:
|
||||
update_report.update_testrail(case_id=test_cases["create_fw"],
|
||||
status_id=1,
|
||||
msg='Create new FW version by API successful')
|
||||
PASS = True
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["create_fw"],
|
||||
status_id=5,
|
||||
msg='Error creating new FW version by API')
|
||||
PASS = False
|
||||
assert PASS
|
||||
|
||||
# @pytest.mark.firmware_upgrade
|
||||
# def test_firmware_upgrade_request(self, upgrade_firmware, update_report, test_cases):
|
||||
# print()
|
||||
# if not upgrade_firmware:
|
||||
# update_report.update_testrail(case_id=test_cases["upgrade_api"],
|
||||
# status_id=0,
|
||||
# msg='Error requesting upgrade via API')
|
||||
# PASS = False
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["upgrade_api"],
|
||||
# status_id=1,
|
||||
# msg='Upgrade request using API successful')
|
||||
# PASS = True
|
||||
# assert PASS
|
||||
|
||||
@pytest.mark.check_active_firmware_cloud
|
||||
def test_active_version_cloud(self, get_latest_firmware, check_ap_firmware_cloud, update_report, test_cases):
|
||||
if get_latest_firmware != check_ap_firmware_cloud:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_fw"],
|
||||
status_id=5,
|
||||
msg='CLOUDSDK reporting incorrect firmware version.')
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_fw"],
|
||||
status_id=1,
|
||||
msg='CLOUDSDK reporting correct firmware version.')
|
||||
|
||||
assert get_latest_firmware == check_ap_firmware_cloud
|
||||
|
||||
|
||||
@pytest.mark.firmware_ap
|
||||
def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, update_report,
|
||||
test_cases):
|
||||
if check_ap_firmware_ssh == get_latest_firmware:
|
||||
update_report.update_testrail(case_id=test_cases["ap_upgrade"],
|
||||
status_id=1,
|
||||
msg='Upgrade to ' + str(get_latest_firmware) + ' successful')
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["ap_upgrade"],
|
||||
status_id=4,
|
||||
msg='Cannot reach AP after upgrade to check CLI - re-test required')
|
||||
|
||||
assert check_ap_firmware_ssh == get_latest_firmware
|
||||
@@ -0,0 +1,609 @@
|
||||
import allure
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectivitySuiteOne(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_open_ssid_2g(self, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog,
|
||||
test_cases):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_open_ssid_5g(self, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa 2.4 GHZ Band')
|
||||
def test_wpa_ssid_2g(self, request, get_lanforge_data, update_report,
|
||||
lf_test, test_cases, station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa 5 GHZ Band')
|
||||
def test_wpa_ssid_5g(self, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='5G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='5G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
def test_wpa2_personal_ssid_2g(self, get_lanforge_data, lf_test, update_report, test_cases,
|
||||
station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA2 Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA2 Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
def test_wpa2_personal_ssid_5g(self, get_lanforge_data, update_report, test_cases, station_names_fiveg,
|
||||
lf_test):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_bridge"],
|
||||
status_id=1,
|
||||
msg='5G WPA2 Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_bridge"],
|
||||
status_id=5,
|
||||
msg='5G WPA2 Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeEnterprise(object):
|
||||
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.twog
|
||||
# def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "BRIDGE"
|
||||
# band = "twog"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_twog, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
#
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.fiveg
|
||||
# def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "BRIDGE"
|
||||
# band = "fiveg"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
@@ -0,0 +1,609 @@
|
||||
import allure
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.client_connectivity, pytest.mark.NAT, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNATModeConnectivitySuiteOne(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_open_ssid_2g(self, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog,
|
||||
test_cases):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_open_ssid_5g(self, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa 2.4 GHZ Band')
|
||||
def test_wpa_ssid_2g(self, request, get_lanforge_data, update_report,
|
||||
lf_test, test_cases, station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa 5 GHZ Band')
|
||||
def test_wpa_ssid_5g(self, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='5G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='5G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
def test_wpa2_personal_ssid_2g(self, get_lanforge_data, lf_test, update_report, test_cases,
|
||||
station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA2 Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA2 Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
def test_wpa2_personal_ssid_5g(self, get_lanforge_data, update_report, test_cases, station_names_fiveg,
|
||||
lf_test):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_NAT"],
|
||||
status_id=1,
|
||||
msg='5G WPA2 Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_NAT"],
|
||||
status_id=5,
|
||||
msg='5G WPA2 Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNATModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNATModeEnterprise(object):
|
||||
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.twog
|
||||
# def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "NAT"
|
||||
# band = "twog"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_twog, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
#
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.fiveg
|
||||
# def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "NAT"
|
||||
# band = "fiveg"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
@@ -0,0 +1,609 @@
|
||||
import allure
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.client_connectivity, pytest.mark.VLAN, pytest.mark.sanity]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestVLANModeConnectivitySuiteOne(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_open_ssid_2g(self, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog,
|
||||
test_cases):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_open_ssid_5g(self, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
# if result:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
# passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa 2.4 GHZ Band')
|
||||
def test_wpa_ssid_2g(self, request, get_lanforge_data, update_report,
|
||||
lf_test, test_cases, station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa 5 GHZ Band')
|
||||
def test_wpa_ssid_5g(self, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='5G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='5G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
def test_wpa2_personal_ssid_2g(self, get_lanforge_data, lf_test, update_report, test_cases,
|
||||
station_names_twog):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA2 Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa2_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA2 Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
def test_wpa2_personal_ssid_5g(self, get_lanforge_data, update_report, test_cases, station_names_fiveg,
|
||||
lf_test):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_VLAN"],
|
||||
status_id=1,
|
||||
msg='5G WPA2 Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["5g_wpa2_VLAN"],
|
||||
status_id=5,
|
||||
msg='5G WPA2 Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestVLANModeConnectivitySuiteTwo(object):
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
|
||||
update_report,
|
||||
test_cases):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
|
||||
update_report):
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if result:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert result
|
||||
|
||||
|
||||
setup_params_enterprise = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.enterprise
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestVLANModeEnterprise(object):
|
||||
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.twog
|
||||
# def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "VLAN"
|
||||
# band = "twog"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_twog, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
#
|
||||
# @pytest.mark.wpa_enterprise
|
||||
# @pytest.mark.fiveg
|
||||
# def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
# test_cases, radius_info):
|
||||
# profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa"
|
||||
# mode = "VLAN"
|
||||
# band = "fiveg"
|
||||
# vlan = 1
|
||||
# ttls_passwd = radius_info["password"]
|
||||
# eap = "TTLS"
|
||||
# identity = radius_info['user']
|
||||
# passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
#
|
||||
# if passes:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=1,
|
||||
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
# passes))
|
||||
# else:
|
||||
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
# status_id=5,
|
||||
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
# passes))
|
||||
# assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.twog
|
||||
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
|
||||
@pytest.mark.wpa3_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info):
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security = "wpa3"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
identity = radius_info['user']
|
||||
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
|
||||
mode=mode, band=band,
|
||||
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if passes:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=1,
|
||||
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
|
||||
passes))
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
|
||||
status_id=5,
|
||||
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
|
||||
passes))
|
||||
assert passes
|
||||
@@ -4,7 +4,7 @@ norecursedirs = .svn _build tmp*
|
||||
addopts= --junitxml=test_everything.xml
|
||||
log_format = %(asctime)s %(levelname)s %(message)s
|
||||
log_date_format = %Y-%m-%d %H:%M:%S
|
||||
|
||||
;norecursedirs=out build
|
||||
num_stations=1
|
||||
|
||||
# Cloud SDK settings
|
||||
|
||||
@@ -1,65 +1,68 @@
|
||||
"""
|
||||
Test Case Module: Testing Basic Connectivity with Resources
|
||||
Mode: BRIDGE
|
||||
|
||||
"""
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
pytestmark = [pytest.mark.test_connectivity]
|
||||
pytestmark = [pytest.mark.test_resources]
|
||||
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.bridge
|
||||
@pytest.mark.nat
|
||||
@pytest.mark.vlan
|
||||
@pytest.mark.test_controller_connectivity
|
||||
def test_controller_connectivity(instantiate_controller, instantiate_testrail, instantiate_project, test_cases):
|
||||
try:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["cloud_ver"], run_id=instantiate_project,
|
||||
status_id=1, msg='Read CloudSDK version from API successfully')
|
||||
PASS = True
|
||||
except:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["cloud_ver"], run_id=instantiate_project,
|
||||
status_id=0, msg='Could not read CloudSDK version from API')
|
||||
PASS = False
|
||||
assert instantiate_controller
|
||||
@allure.testcase(name="Test Resources", url="")
|
||||
class TestResources(object):
|
||||
|
||||
@pytest.mark.test_cloud_controller
|
||||
@allure.testcase(name="test_controller_connectivity", url="")
|
||||
def test_controller_connectivity(self, setup_controller, update_report, test_cases):
|
||||
if setup_controller.bearer:
|
||||
allure.attach(name="Controller Connectivity Success", body="")
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=1, msg='Read CloudSDK version from API successfully')
|
||||
else:
|
||||
allure.attach(name="Controller Connectivity Failed", body="")
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=0, msg='Could not read CloudSDK version from API')
|
||||
pytest.exit("Controller Not Available")
|
||||
assert setup_controller.bearer
|
||||
|
||||
@pytest.mark.sanity
|
||||
@pytest.mark.bridge
|
||||
@pytest.mark.nat
|
||||
@pytest.mark.vlan
|
||||
@pytest.mark.test_access_points_connectivity
|
||||
def test_access_points_connectivity(access_point_connectivity, instantiate_testrail, instantiate_project, test_cases, exit_on_fail):
|
||||
if not access_point_connectivity["serial"] and not access_point_connectivity["mgr"]:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["cloud_connection"], run_id=instantiate_project,
|
||||
status_id=5,
|
||||
msg='CloudSDK connectivity failed')
|
||||
status = False
|
||||
pytest.exit("Access Point is not Properly Connected: Sanity Failed")
|
||||
else:
|
||||
instantiate_testrail.update_testrail(case_id=test_cases["cloud_connection"], run_id=instantiate_project,
|
||||
status_id=1,
|
||||
msg='Manager status is Active')
|
||||
status = True
|
||||
@pytest.mark.test_access_points_connectivity
|
||||
@allure.testcase(name="test_access_points_connectivity", url="")
|
||||
def test_access_points_connectivity(self, test_access_point, update_report, test_cases):
|
||||
flag = True
|
||||
for i in test_access_point:
|
||||
if "ACTIVE" not in i:
|
||||
flag = False
|
||||
if flag is False:
|
||||
allure.attach(name="Access Point Connectivity Success", body=str(test_access_point))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=5,
|
||||
msg='CloudSDK connectivity failed')
|
||||
|
||||
assert status
|
||||
pytest.exit("Access Point Manager state is not Active")
|
||||
else:
|
||||
allure.attach(name="Access Point Connectivity Failed", body=str(test_access_point))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=1,
|
||||
msg='Manager status is Active')
|
||||
|
||||
assert flag
|
||||
|
||||
# @pytest.mark.sanity
|
||||
# @pytest.mark.bridge
|
||||
# @pytest.mark.nat
|
||||
# @pytest.mark.vlan
|
||||
# @pytest.mark.test_lanforge_connectivity
|
||||
# def test_lanforge_connectivity(check_lanforge_connectivity):
|
||||
# assert "instantiate_cloudsdk"
|
||||
#
|
||||
#
|
||||
# @pytest.mark.sanity
|
||||
# @pytest.mark.bridge
|
||||
# @pytest.mark.nat
|
||||
# @pytest.mark.vlan
|
||||
# @pytest.mark.test_perfecto_connectivity
|
||||
# def test_perfecto_connectivity(setup_perfecto_devices):
|
||||
# assert "instantiate_cloudsdk"
|
||||
@pytest.mark.traffic_generator_connectivity
|
||||
@allure.testcase(name="test_traffic_generator_connectivity", url="")
|
||||
def test_traffic_generator_connectivity(self, traffic_generator_connectivity, update_report, test_cases):
|
||||
|
||||
if traffic_generator_connectivity is False:
|
||||
allure.attach(name="Access Point Connectivity Success", body=str(traffic_generator_connectivity))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=5,
|
||||
msg='CloudSDK connectivity failed')
|
||||
|
||||
pytest.exit("Traffic Generator is not Available")
|
||||
else:
|
||||
allure.attach(name="Access Point Connectivity Failed", body=str(traffic_generator_connectivity))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=1,
|
||||
msg='Manager status is Active')
|
||||
|
||||
assert traffic_generator_connectivity
|
||||
|
||||
Reference in New Issue
Block a user