mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 03:17:54 +00:00
exception error in apnos get_uc_latest_config()
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -365,7 +365,7 @@ class APNOS:
|
||||
print(type(json_output))
|
||||
client.close()
|
||||
except Exception as e:
|
||||
json_output = False
|
||||
json_output = {}
|
||||
print(e)
|
||||
return json_output
|
||||
|
||||
@@ -383,7 +383,7 @@ class APNOS:
|
||||
print(json_output)
|
||||
client.close()
|
||||
except Exception as e:
|
||||
json_output = False
|
||||
json_output = {}
|
||||
print(e)
|
||||
return json_output
|
||||
|
||||
@@ -416,6 +416,8 @@ class APNOS:
|
||||
else:
|
||||
wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""]
|
||||
data = self.get_iwinfo()
|
||||
print(wifi_info)
|
||||
print(data)
|
||||
for i in wifi_info.keys():
|
||||
wifi_info[i].append(data[i])
|
||||
return wifi_info
|
||||
@@ -529,17 +531,17 @@ class APNOS:
|
||||
|
||||
if __name__ == '__main__':
|
||||
obj = {
|
||||
'model': 'eap102',
|
||||
'mode': 'wifi6',
|
||||
'serial': '0000c1018812',
|
||||
'model': 'ec420',
|
||||
'mode': 'wifi5',
|
||||
'serial': '001122090801',
|
||||
'jumphost': True,
|
||||
'ip': "10.28.3.100", # 10.28.3.103
|
||||
'ip': "10.28.3.100",
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 22, # 22
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP3',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
|
||||
}
|
||||
var = APNOS(credentials=obj, sdk="1.x")
|
||||
var = APNOS(credentials=obj, sdk="2.x")
|
||||
x = var.get_interface_details()
|
||||
print(x)
|
||||
|
||||
@@ -225,7 +225,7 @@ class UProfileUtility:
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 80,
|
||||
# "channel": 36
|
||||
# "channel": "auto"
|
||||
})
|
||||
|
||||
self.vlan_section["ssids"] = []
|
||||
@@ -335,6 +335,7 @@ class UProfileUtility:
|
||||
|
||||
uri = self.sdk_client.build_uri("device/" + serial_number + "/configure")
|
||||
basic_cfg_str = json.dumps(payload)
|
||||
allure.attach(name="ucentral_config: ", body=str(self.base_profile_config))
|
||||
# print(self.base_profile_config)
|
||||
resp = requests.post(uri, data=basic_cfg_str, headers=self.sdk_client.make_headers(),
|
||||
verify=False, timeout=100)
|
||||
|
||||
@@ -237,7 +237,83 @@ CONFIGURATION = {
|
||||
"AX-Station-Name": "ax"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-03": {
|
||||
"controller": {
|
||||
'url': 'https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
|
||||
'username': "tip@ucentral.com",
|
||||
'password': 'openwifi',
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ec420',
|
||||
'mode': 'wifi5',
|
||||
'serial': '001122090801',
|
||||
'jumphost': True,
|
||||
'ip': "10.28.3.100",
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP3',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "10.28.3.10",
|
||||
"port": 8080,
|
||||
"ssh_port": 22,
|
||||
"2.4G-Radio": ["1.1.wiphy4"],
|
||||
"5G-Radio": ["1.1.wiphy5"],
|
||||
"AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"],
|
||||
"upstream": "1.1.eth2",
|
||||
"upstream_subnet": "10.28.2.1/24",
|
||||
"uplink": "1.1.eth3",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan1",
|
||||
"AX-Station-Name": "ax"
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-04": {
|
||||
"controller": {
|
||||
'url': 'https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
|
||||
'username': "tip@ucentral.com",
|
||||
'password': 'openwifi',
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5211',
|
||||
'mode': 'wifi5',
|
||||
'serial': '68215fda456d',
|
||||
'jumphost': True,
|
||||
'ip': "10.28.3.100",
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP5',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "10.28.3.12",
|
||||
"port": 8080,
|
||||
"ssh_port": 22,
|
||||
"2.4G-Radio": ["1.1.wiphy4"],
|
||||
"5G-Radio": ["1.1.wiphy5"],
|
||||
"AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"],
|
||||
"upstream": "1.1.eth2",
|
||||
"upstream_subnet": "10.28.2.1/24",
|
||||
"uplink": "1.1.eth3",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan0",
|
||||
"AX-Station-Name": "ax"
|
||||
}
|
||||
}
|
||||
} # checked uci
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ setup_params_general = {
|
||||
|
||||
@pytest.mark.uc_sanity
|
||||
@pytest.mark.suiteA
|
||||
@pytest.mark.sudo
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
|
||||
Reference in New Issue
Block a user