client connectivity all security modes added

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-05-24 04:04:15 +05:30
parent 1d218cf6fc
commit d8ab943b88
18 changed files with 3397 additions and 1097 deletions

View File

@@ -496,6 +496,7 @@ class ProfileUtility:
# wpa personal
def create_wpa_ssid_profile(self, profile_data=None):
self.get_default_profiles()
try:
if profile_data is None:
return False
@@ -608,18 +609,18 @@ class ProfileUtility:
profile = False
return profile
# wpa enterprise
# wpa enterprise done
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']
print("shivams", self.profile_creation_ids["radius"][0])
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'
@@ -632,7 +633,7 @@ class ProfileUtility:
profile = False
return profile
# wpa wpa2 enterprise mixed mode
# wpa wpa2 enterprise mixed mode done
def create_wpa_wpa2_enterprise_mixed_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
@@ -646,7 +647,7 @@ class ProfileUtility:
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'
default_profile._details['secureMode'] = 'wpa2Radius'
profile = self.profile_client.create_profile(body=default_profile)
profile_id = profile._id
self.profile_creation_ids['ssid'].append(profile_id)
@@ -703,7 +704,7 @@ class ProfileUtility:
profile = False
return profile
# wpa3 enterprise mixed mode
# wpa3 enterprise mixed mode done
def create_wpa3_enterprise_mixed_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
@@ -726,6 +727,47 @@ class ProfileUtility:
profile = False
return profile
# wpa3 enterprise mixed mode done
def create_wep_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['secureMode'] = 'wep'
default_profile._details['wepConfig'] = {}
default_profile._details['wepConfig']["model_type"] = "WepConfiguration"
default_profile._details['wepConfig']["wepAuthType"] = "open"
default_profile._details['wepConfig']["primaryTxKeyId"] = profile_data["default_key_id"]
default_profile._details['wepConfig']["wepKeys"] = [{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'}]
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
"""
@@ -754,6 +796,7 @@ class ProfileUtility:
def create_radius_profile(self, radius_info=None):
default_profile = self.default_profiles['radius']
default_profile._name = radius_info['name']
default_profile._details['primaryRadiusAuthServer'] = {}
default_profile._details['primaryRadiusAuthServer']['ipAddress'] = radius_info['ip']
default_profile._details['primaryRadiusAuthServer']['port'] = radius_info['port']
default_profile._details['primaryRadiusAuthServer']['secret'] = radius_info['secret']
@@ -980,7 +1023,7 @@ class FirmwareUtility(JFrogUtility):
if __name__ == '__main__':
controller = {
'url': "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", # API base url for the controller
'url': "https://wlan-portal-svc-digicert.cicd.lab.wlan.tip.build", # API base url for the controller
'username': 'support@example.com',
'password': 'support',
'version': "1.1.0-SNAPSHOT",
@@ -988,6 +1031,18 @@ if __name__ == '__main__':
}
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()
profile_data = {
"profile_name": "ssid_wep_2g",
"ssid_name": "ssid_wep_2g",
"appliedRadios": ["is2dot4GHz"],
"default_key_id" : 1,
"wep_key" : 1234567890,
"vlan": 1,
"mode": "BRIDGE"
}
profile.create_wep_ssid_profile(profile_data=profile_data)
# print(profile.get_profile_by_name(profile_name="wpa_wpa2_eap"))
profile.get_default_profiles()
api.disconnect_Controller()

View File

@@ -304,8 +304,9 @@ FRAMEWORK MARKER LOGIC
@pytest.fixture(scope="session")
def get_security_flags():
# 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"]
security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", "wpa_wpa2_enterprise_mixed",
"wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed",
"wpa3_enterprise", "twog", "fiveg", "radius"]
yield security
@@ -318,7 +319,7 @@ def get_markers(request, get_security_flags):
for item in session.items:
for j in item.iter_markers():
markers.append(j.name)
# print(set(markers))
print(set(markers))
for i in security:
if set(markers).__contains__(i):
security_dict[i] = True
@@ -335,8 +336,6 @@ 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)

View File

@@ -0,0 +1,322 @@
import pytest
import allure
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 TestSetupBridgeEnterpriseSuiteA(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_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["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_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["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
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["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_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["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False
setup_params_enterprise_two = {
"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_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterpriseSuiteB(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_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["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_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["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
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["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_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["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -34,7 +34,7 @@ class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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,
@@ -48,7 +48,7 @@ class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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"],
@@ -126,12 +126,12 @@ class TestSetupBridge(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupBridge(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,16 +153,14 @@ class TestSetupBridge(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
@@ -201,12 +199,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -261,12 +259,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -277,12 +275,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,177 +316,13 @@ class TestBridgeModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
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

View File

@@ -0,0 +1,162 @@
import pytest
import allure
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_wpa_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["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_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["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
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["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_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["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -2,10 +2,10 @@ import allure
import pytest
import time
pytestmark = [pytest.mark.setup, pytest.mark.NAT, pytest.mark.sanity]
pytestmark = [pytest.mark.setup, pytest.mark.bridge, pytest.mark.sanity]
setup_params_general = {
"mode": "NAT",
"mode": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
@@ -22,7 +22,7 @@ setup_params_general = {
@pytest.mark.basic
@allure.feature("NAT MODE SETUP")
@allure.feature("BRIDGE MODE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
@@ -30,11 +30,11 @@ setup_params_general = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupNAT(object):
class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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,
@@ -48,7 +48,7 @@ class TestSetupNAT(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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"],
@@ -126,12 +126,12 @@ class TestSetupNAT(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupNAT(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,21 +153,19 @@ class TestSetupNAT(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_general_two = {
"mode": "NAT",
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
@@ -187,7 +185,7 @@ setup_params_general_two = {
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_two],
@@ -195,18 +193,18 @@ setup_params_general_two = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestNATModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestNATModeConnectivitySuiteTwo(object):
@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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestNATModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -261,12 +259,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -277,12 +275,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,177 +316,13 @@ class TestNATModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
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

View File

@@ -0,0 +1,162 @@
import pytest
import allure
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_wpa_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["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_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["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
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_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
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["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_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["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -2,10 +2,10 @@ import allure
import pytest
import time
pytestmark = [pytest.mark.setup, pytest.mark.VLAN, pytest.mark.sanity]
pytestmark = [pytest.mark.setup, pytest.mark.bridge, pytest.mark.sanity]
setup_params_general = {
"mode": "VLAN",
"mode": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
@@ -22,7 +22,7 @@ setup_params_general = {
@pytest.mark.basic
@allure.feature("VLAN MODE SETUP")
@allure.feature("BRIDGE MODE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
@@ -30,11 +30,11 @@ setup_params_general = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupVLAN(object):
class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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,
@@ -48,7 +48,7 @@ class TestSetupVLAN(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_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"],
@@ -126,12 +126,12 @@ class TestSetupVLAN(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupVLAN(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,21 +153,19 @@ class TestSetupVLAN(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_general_two = {
"mode": "VLAN",
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
@@ -187,7 +185,7 @@ setup_params_general_two = {
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_two],
@@ -195,18 +193,18 @@ setup_params_general_two = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
@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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -261,12 +259,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -277,12 +275,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
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"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,177 +316,13 @@ class TestVLANModeConnectivitySuiteTwo(object):
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"],
update_report.update_testrail(case_id=test_cases["bridge_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"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
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

View File

@@ -104,7 +104,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
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")
@@ -145,7 +144,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
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)
@@ -290,6 +288,35 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa_enterprise":
for j in profile_data["ssid"][mode]:
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_enterprise_ssid_profile(profile_data=j)
test_cases["wpa_enterprise_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_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_wpa_enterprise_ssid_profile(profile_data=j)
test_cases["wpa_enterprise_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_enterprise_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)
@@ -318,7 +345,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
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)
@@ -348,6 +374,92 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa_wpa2_enterprise_mixed":
print("shivam", mode)
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_enterprise_mixed_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_wpa_wpa2_enterprise_mixed_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")
if mode == "wpa3_enterprise_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_enterprise_mixed_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_mixed_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")
if mode == "wep":
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_wep_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_wep_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'])

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
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 TestBridgeModeEnterpriseTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"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 TestBridgeModeEnterpriseTLSSuiteTwo(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
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 TestBridgeModeEnterpriseTTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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

View File

@@ -1,7 +1,7 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "BRIDGE",
@@ -349,11 +349,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -377,11 +378,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
@@ -398,19 +400,14 @@ class TestBridgeModeConnectivitySuiteTwo(object):
assert result
setup_params_enterprise = {
setup_params_wep = {
"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"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -419,92 +416,28 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterprise(object):
class TestBridgeModeWEP(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.wep
@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]
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
@@ -518,83 +451,21 @@ class TestBridgeModeEnterprise(object):
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.wep
@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]
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][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"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
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 TestNATModeEnterpriseTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"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 TestNATModeEnterpriseTLSSuiteTwo(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
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 TestNATModeEnterpriseTTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"mode": "NAT",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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

View File

@@ -1,7 +1,7 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.NAT, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "NAT",
@@ -349,11 +349,12 @@ class TestNATModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -377,11 +378,12 @@ class TestNATModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
@@ -398,19 +400,14 @@ class TestNATModeConnectivitySuiteTwo(object):
assert result
setup_params_enterprise = {
setup_params_wep = {
"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"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -419,92 +416,28 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterprise(object):
class TestNATModeWEP(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.wep
@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]
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -518,83 +451,21 @@ class TestNATModeEnterprise(object):
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.wep
@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]
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][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"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
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 TestVLANModeEnterpriseTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"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 TestVLANModeEnterpriseTLSSuiteTwo(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
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 TestVLANModeEnterpriseTTLSSuiteOne(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"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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
setup_params_enterprise_two = {
"mode": "VLAN",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_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_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["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, extra_securities=extra_secu,
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_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][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

View File

@@ -1,7 +1,7 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.VLAN, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "VLAN",
@@ -349,11 +349,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -377,11 +378,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
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"
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
@@ -398,19 +400,14 @@ class TestVLANModeConnectivitySuiteTwo(object):
assert result
setup_params_enterprise = {
setup_params_wep = {
"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"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -419,92 +416,28 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterprise(object):
class TestVLANModeWEP(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.wep
@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]
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
@@ -518,83 +451,21 @@ class TestVLANModeEnterprise(object):
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.wep
@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]
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][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"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
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)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],