mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-05 13:17:53 +00:00
Fixed upstream resource issue in staconnect2
Signed-off-by: shivam <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -85,6 +85,7 @@ class lf_tests(lf_libs):
|
|||||||
_cleanup_on_exit=False)
|
_cleanup_on_exit=False)
|
||||||
|
|
||||||
obj_sta_connect.sta_mode = sta_mode
|
obj_sta_connect.sta_mode = sta_mode
|
||||||
|
print(data[dut]["upstream_resource"], "shivam")
|
||||||
obj_sta_connect.upstream_resource = data[dut]["upstream_resource"]
|
obj_sta_connect.upstream_resource = data[dut]["upstream_resource"]
|
||||||
obj_sta_connect.upstream_port = data[dut]["upstream"]
|
obj_sta_connect.upstream_port = data[dut]["upstream"]
|
||||||
self.enable_verbose_debug(radio=radio, enable=True)
|
self.enable_verbose_debug(radio=radio, enable=True)
|
||||||
@@ -933,7 +934,7 @@ class lf_tests(lf_libs):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
basic_04 = {
|
basic = {
|
||||||
"target": "tip_2x",
|
"target": "tip_2x",
|
||||||
"controller": {
|
"controller": {
|
||||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||||
@@ -941,10 +942,10 @@ if __name__ == '__main__':
|
|||||||
"password": "OpenWifi%123"
|
"password": "OpenWifi%123"
|
||||||
},
|
},
|
||||||
"device_under_tests": [{
|
"device_under_tests": [{
|
||||||
"model": "cig_wf196",
|
"model": "edgecore_eap101",
|
||||||
"supported_bands": ["2G", "5G", "6G"],
|
"supported_bands": ["2G", "5G"],
|
||||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||||
"wan_port": "1.3.eth2",
|
"wan_port": "1.1.eth3",
|
||||||
"lan_port": None,
|
"lan_port": None,
|
||||||
"ssid": {
|
"ssid": {
|
||||||
"2g-ssid": "OpenWifi",
|
"2g-ssid": "OpenWifi",
|
||||||
@@ -960,14 +961,14 @@ if __name__ == '__main__':
|
|||||||
"5g-bssid": "68:7d:b4:5f:5c:3c",
|
"5g-bssid": "68:7d:b4:5f:5c:3c",
|
||||||
"6g-bssid": "68:7d:b4:5f:5c:38"
|
"6g-bssid": "68:7d:b4:5f:5c:38"
|
||||||
},
|
},
|
||||||
"mode": "wifi6e",
|
"mode": "wifi6",
|
||||||
"identifier": "68215fda456d",
|
"identifier": "903cb36c4301",
|
||||||
"method": "serial",
|
"method": "serial",
|
||||||
"host_ip": "localhost",
|
"host_ip": "192.168.52.89",
|
||||||
"host_username": "lanforge",
|
"host_username": "lanforge",
|
||||||
"host_password": "pumpkin77",
|
"host_password": "lanforge",
|
||||||
"host_ssh_port": 22,
|
"host_ssh_port": 22,
|
||||||
"serial_tty": "/dev/ttyAP5",
|
"serial_tty": "/dev/ttyUSB0",
|
||||||
"firmware_version": "next-latest"
|
"firmware_version": "next-latest"
|
||||||
}],
|
}],
|
||||||
"traffic_generator": {
|
"traffic_generator": {
|
||||||
@@ -975,12 +976,12 @@ if __name__ == '__main__':
|
|||||||
"testbed": "basic",
|
"testbed": "basic",
|
||||||
"scenario": "dhcp-bridge",
|
"scenario": "dhcp-bridge",
|
||||||
"details": {
|
"details": {
|
||||||
"manager_ip": "10.28.3.30",
|
"manager_ip": "192.168.52.89",
|
||||||
"http_port": 8080,
|
"http_port": 8080,
|
||||||
"ssh_port": 22,
|
"ssh_port": 22,
|
||||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||||
"wan_ports": {
|
"wan_ports": {
|
||||||
"1.3.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
"1.1.eth3": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||||
"lease-first": 10,
|
"lease-first": 10,
|
||||||
"lease-count": 10000,
|
"lease-count": 10000,
|
||||||
"lease-time": "6h"
|
"lease-time": "6h"
|
||||||
@@ -991,10 +992,10 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
},
|
},
|
||||||
"uplink_nat_ports": {
|
"uplink_nat_ports": {
|
||||||
"1.1.eth3": {
|
"1.1.eth2": {
|
||||||
"addressing": "dhcp-server",
|
"addressing": "static",
|
||||||
"ip": "10.28.2.9",
|
"ip": "192.168.52.150",
|
||||||
"gateway_ip": "10.28.2.1/24",
|
"gateway_ip": "192.168.52.1/24",
|
||||||
"ip_mask": "255.255.255.0",
|
"ip_mask": "255.255.255.0",
|
||||||
"dns_servers": "BLANK"
|
"dns_servers": "BLANK"
|
||||||
}
|
}
|
||||||
@@ -1003,7 +1004,7 @@ if __name__ == '__main__':
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = lf_tests(lf_data=dict(basic_04["traffic_generator"]), dut_data=list(basic_04["device_under_tests"]),
|
obj = lf_tests(lf_data=dict(basic["traffic_generator"]), dut_data=list(basic["device_under_tests"]),
|
||||||
log_level=logging.DEBUG, run_lf=False)
|
log_level=logging.DEBUG, run_lf=False)
|
||||||
|
|
||||||
# obj.add_stations()
|
# obj.add_stations()
|
||||||
@@ -1028,19 +1029,18 @@ if __name__ == '__main__':
|
|||||||
# vlan_id=[None], num_sta=65, scan_ssid=True,
|
# vlan_id=[None], num_sta=65, scan_ssid=True,
|
||||||
# station_data=["4way time (us)", "channel", "cx time (us)", "dhcp (ms)", "ip", "signal"],
|
# station_data=["4way time (us)", "channel", "cx time (us)", "dhcp (ms)", "ip", "signal"],
|
||||||
# allure_attach=True)
|
# allure_attach=True)
|
||||||
obj.multi_psk_test(band="twog", mpsk_data=None, ssid="OpenWifi", bssid="['00:00:c1:01:88:12']", passkey="OpenWifi",
|
# obj.multi_psk_test(band="twog", mpsk_data=None, ssid="OpenWifi", bssid="['00:00:c1:01:88:12']", passkey="OpenWifi",
|
||||||
encryption="wpa", mode="BRIDGE", num_sta=1)
|
# encryption="wpa", mode="BRIDGE", num_sta=1)
|
||||||
# obj.add_vlan(vlan_iFds=[100])
|
# obj.add_vlan(vlan_iFds=[100])
|
||||||
# obj.create_dhcp_external()obj.add_vlan(vlan_ids=[100, 200, 300, 400, 500, 600])
|
# obj.create_dhcp_external()obj.add_vlan(vlan_ids=[100, 200, 300, 400, 500, 600])
|
||||||
# obj.get_cx_data()
|
# obj.get_cx_data()
|
||||||
# obj.chamber_view()
|
# obj.chamber_view()
|
||||||
# dut = {'0000c1018812': [['ssid_open_2g_nat', 'open', 'something', '2G', '6A:21:5F:DA:45:6F'],
|
dut = {'903cb36c4301': {'ssid_data': {0: {'ssid': 'ssid_wpa_2g_br', 'encryption': 'wpa', 'password': 'something', 'band': '2G', 'bssid': '90:3C:B3:6C:43:04'}}, 'radio_data': {'2G': {'channel': 6, 'bandwidth': 20, 'frequency': 2437}, '5G': {'channel': None, 'bandwidth': None, 'frequency': None}, '6G': {'channel': None, 'bandwidth': None, 'frequency': None}}}}
|
||||||
# {'2G': [6, 40, 2437], '5G': None, '6G': None}]}
|
|
||||||
|
|
||||||
# passes, result = obj.client_connectivity_test(ssid="ssid_open_2g_nat", passkey="something", security="open",
|
passes, result = obj.client_connectivity_test(ssid="ssid_wpa_2g_br", passkey="something", security="wpa",
|
||||||
# extra_securities=[],
|
extra_securities=[],
|
||||||
# num_sta=1, mode="NAT-WAN", dut_data=dut,
|
num_sta=1, mode="NAT-WAN", dut_data=dut,
|
||||||
# band="twog")
|
band="twog")
|
||||||
# print(passes == "PASS", result)
|
# print(passes == "PASS", result)
|
||||||
# # obj.start_sniffer(radio_channel=1, radio="wiphy7", test_name="sniff_radio", duration=30)
|
# # obj.start_sniffer(radio_channel=1, radio="wiphy7", test_name="sniff_radio", duration=30)
|
||||||
# print("started")
|
# print("started")
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ class StaConnect2(Realm):
|
|||||||
raise ValueError("Unable to find ports named '%s'+" % self.sta_prefix)
|
raise ValueError("Unable to find ports named '%s'+" % self.sta_prefix)
|
||||||
self.l3_udp_profile.create(endp_type="lf_udp",
|
self.l3_udp_profile.create(endp_type="lf_udp",
|
||||||
side_a=port_list,
|
side_a=port_list,
|
||||||
side_b="%s.%s" % (self.resource, self.upstream_port),
|
side_b="%s.%s" % (int(self.upstream_resource), self.upstream_port),
|
||||||
suppress_related_commands=True)
|
suppress_related_commands=True)
|
||||||
|
|
||||||
# Create TCP endpoints
|
# Create TCP endpoints
|
||||||
@@ -380,7 +380,7 @@ class StaConnect2(Realm):
|
|||||||
self.l3_tcp_profile.report_timer = 1000
|
self.l3_tcp_profile.report_timer = 1000
|
||||||
self.l3_tcp_profile.create(endp_type="lf_tcp",
|
self.l3_tcp_profile.create(endp_type="lf_tcp",
|
||||||
side_a=list(self.find_ports_like("%s+" % self.sta_prefix)),
|
side_a=list(self.find_ports_like("%s+" % self.sta_prefix)),
|
||||||
side_b="%s.%s" % (self.resource, self.upstream_port),
|
side_b="%s.%s" % (int(self.upstream_resource), self.upstream_port),
|
||||||
suppress_related_commands=True)
|
suppress_related_commands=True)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user