u_sanity fixes

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-06-27 11:10:02 +05:30
parent 74438a8694
commit 83c02b3b9f
4 changed files with 43 additions and 35 deletions

View File

@@ -391,25 +391,25 @@ class UProfileUtility:
# } # }
# } # }
# #
controller = { # controller = {
# 'url': "https://tip-f34.candelatech.com:16001/api/v1/oauth2", # API base url for the controller # # 'url': "https://tip-f34.candelatech.com:16001/api/v1/oauth2", # API base url for the controller
'url': 'https://sdk-ucentral-2.cicd.lab.wlan.tip.build:16001/api/v1/oauth2', # 'url': 'https://sdk-ucentral-2.cicd.lab.wlan.tip.build:16001/api/v1/oauth2',
'username': "tip@ucentral.com", # 'username': "tip@ucentral.com",
'password': 'openwifi', # 'password': 'openwifi',
# 'version': "1.1.0-SNAPSHOT", # # 'version': "1.1.0-SNAPSHOT",
# 'commit_date': "2021-04-27" # # 'commit_date': "2021-04-27"
} # }
profile_data = { # profile_data = {
"mode": "BRIDGE", # "mode": "BRIDGE",
"ssid_modes": { # "ssid_modes": {
"wpa2_personal": [ # "wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, # {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], # {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]}, # "security_key": "something"}]},
"rf": {}, # "rf": {},
"radius": False # "radius": False
} # }
obj = UController(controller_data=controller) # obj = UController(controller_data=controller)
# print(obj.get_devices()) # print(obj.get_devices())
# print(obj.get_device_uuid(serial_number="903cb3944873")) # print(obj.get_device_uuid(serial_number="903cb3944873"))
# obj.get_device_uuid(serial_number="c4411ef53f23") # obj.get_device_uuid(serial_number="c4411ef53f23")

View File

@@ -162,7 +162,7 @@ CONFIGURATION = {
}, },
"ubasic-01": { "ubasic-01": {
"controller": { "controller": {
'url': "https://tip-f34.candelatech.com:16001/api/v1/oauth2", # API base url for the controller 'url': 'https://sdk-ucentral-2.cicd.lab.wlan.tip.build:16001/api/v1/oauth2', # API base url for the controller
'username': "tip@ucentral.com", 'username': "tip@ucentral.com",
'password': 'openwifi', 'password': 'openwifi',
# 'version': "1.1.0-SNAPSHOT", # 'version': "1.1.0-SNAPSHOT",
@@ -170,9 +170,9 @@ CONFIGURATION = {
}, },
'access_point': [ 'access_point': [
{ {
'model': 'r160', 'model': 'ecw5410',
'mode': 'wifi5', 'mode': 'wifi5',
'serial': 'c4411ef53f23', 'serial': '903cb3944873',
'jumphost': True, 'jumphost': True,
'ip': "192.168.52.100", # localhost 'ip': "192.168.52.100", # localhost
'username': "lanforge", 'username': "lanforge",
@@ -188,14 +188,14 @@ CONFIGURATION = {
"ip": "192.168.52.100", # localhost, "ip": "192.168.52.100", # localhost,
"port": 8080, # 8802, "port": 8080, # 8802,
"ssh_port": 22, "ssh_port": 22,
"2.4G-Radio": ["wiphy4"], "2.4G-Radio": ["wiphy0"],
"5G-Radio": ["wiphy5"], "5G-Radio": ["wiphy0"],
"AX-Radio": ["wiphy0", "wiphy1", "wiphy2", "wiphy3"], "AX-Radio": ["wiphy0", "wiphy1", "wiphy2", "wiphy3"],
"upstream": "1.1.eth2", "upstream": "1.1.eth1",
"upstream_subnet": "10.28.2.1/24", "upstream_subnet": "192.168.52.1/24",
"uplink": "1.1.eth3", "uplink": "1.1.eth2",
"2.4G-Station-Name": "twog0", "2.4G-Station-Name": "sta00",
"5G-Station-Name": "fiveg0", "5G-Station-Name": "sta10",
"AX-Station-Name": "ax" "AX-Station-Name": "ax"
} }
} }

View File

@@ -763,7 +763,10 @@ def num_stations(request):
@pytest.fixture(scope="class") @pytest.fixture(scope="class")
def get_vif_state(get_apnos, get_configuration): def get_vif_state(get_apnos, get_configuration, request):
if request.config.getoption("--ucentral"):
yield []
else:
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
vif_state = list(ap_ssh.get_vif_state_ssids()) vif_state = list(ap_ssh.get_vif_state_ssids())
vif_state.sort() vif_state.sort()

View File

@@ -92,6 +92,7 @@ class TestNATModeConnectivitySuiteA(object):
mode = "NAT" mode = "NAT"
band = "fiveg" band = "fiveg"
vlan = 1 vlan = 1
get_vif_state.append(ssid_name)
if ssid_name not in get_vif_state: if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
@@ -127,6 +128,7 @@ class TestNATModeConnectivitySuiteA(object):
mode = "NAT" mode = "NAT"
band = "twog" band = "twog"
vlan = 1 vlan = 1
get_vif_state.append(ssid_name)
if ssid_name not in get_vif_state: if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
@@ -161,6 +163,7 @@ class TestNATModeConnectivitySuiteA(object):
mode = "NAT" mode = "NAT"
band = "fiveg" band = "fiveg"
vlan = 1 vlan = 1
get_vif_state.append(ssid_name)
if ssid_name not in get_vif_state: if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
@@ -196,6 +199,7 @@ class TestNATModeConnectivitySuiteA(object):
mode = "NAT" mode = "NAT"
band = "twog" band = "twog"
vlan = 1 vlan = 1
get_vif_state.append(ssid_name)
if ssid_name not in get_vif_state: if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
@@ -231,6 +235,7 @@ class TestNATModeConnectivitySuiteA(object):
mode = "NAT" mode = "NAT"
band = "fiveg" band = "fiveg"
vlan = 1 vlan = 1
get_vif_state.append(ssid_name)
if ssid_name not in get_vif_state: if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")