mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 11:28:09 +00:00
Wifi 11903 (#751)
* Uncommented apnos.py and openwrt_ctl.py to prevent quali reservations from failing * Made changes to get_config.py to support new lab_info.json Signed-off-by: dutta-rohan <94938704+dutta-rohan@users.noreply.github.com> Signed-off-by: dutta-rohan <94938704+dutta-rohan@users.noreply.github.com>
This commit is contained in:
@@ -32,8 +32,9 @@ def main():
|
|||||||
services_in_reservation = reservation_details.Services
|
services_in_reservation = reservation_details.Services
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
'target': 'tip_2x',
|
||||||
'controller': {},
|
'controller': {},
|
||||||
'access_point': [],
|
'device_under_tests': [],
|
||||||
'traffic_generator': {}
|
'traffic_generator': {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,14 +55,30 @@ def main():
|
|||||||
|
|
||||||
for attribute in details.ResourceAttributes:
|
for attribute in details.ResourceAttributes:
|
||||||
key = attribute.Name.replace(f"{resource.ResourceModelName}.", '')
|
key = attribute.Name.replace(f"{resource.ResourceModelName}.", '')
|
||||||
key = 'username' if key == 'uname' else key
|
key = 'host_username' if key == 'uname' else key
|
||||||
key = 'password' if key == 'passkey' else key
|
key = 'host_password' if key == 'passkey' else key
|
||||||
|
key = 'host_ip' if key == 'ip' else key
|
||||||
|
key = 'identifier' if key == 'serial' else key
|
||||||
|
key = 'serial_tty' if key == 'jumphost_tty' else key
|
||||||
|
key = 'host_ssh_port' if key == 'port' else key
|
||||||
|
key = 'firmware_version' if key == 'version' else key
|
||||||
|
|
||||||
|
|
||||||
if get_attribute_value(session, attribute) != "":
|
if get_attribute_value(session, attribute) != "":
|
||||||
ap_config[key] = get_attribute_value(session, attribute)
|
ap_config[key] = get_attribute_value(session, attribute)
|
||||||
#ap_config[key] = get_attribute_value(session, attribute)
|
#ap_config[key] = get_attribute_value(session, attribute)
|
||||||
|
|
||||||
config['access_point'].append(ap_config)
|
#Hard coded values
|
||||||
|
if ap_config["lan_port"]=="N/A":
|
||||||
|
ap_config["lan_port"]= None
|
||||||
|
if ap_config['mode']=="Wifi5":
|
||||||
|
ap_config["supported_bands"] = ["2G","5G"]
|
||||||
|
elif ap_config['mode']=="Wifi6":
|
||||||
|
ap_config["supported_bands"] = ["2G","5G","6G"]
|
||||||
|
ap_config["supported_modes"] = ["BRIDGE","NAT","VLAN"]
|
||||||
|
ap_config["ssid"] = {}
|
||||||
|
ap_config["method"]="serial"
|
||||||
|
config['device_under_tests'].append(ap_config)
|
||||||
|
|
||||||
elif resource.ResourceModelName == 'Trafficgenerator':
|
elif resource.ResourceModelName == 'Trafficgenerator':
|
||||||
details = session.GetResourceDetails(resource.Name)
|
details = session.GetResourceDetails(resource.Name)
|
||||||
@@ -73,20 +90,35 @@ def main():
|
|||||||
|
|
||||||
config['traffic_generator'] = {
|
config['traffic_generator'] = {
|
||||||
'name': 'lanforge',
|
'name': 'lanforge',
|
||||||
|
'testbed': tf_config["Lab Type"].lower(),
|
||||||
|
'scenario': "dhcp-bridge",
|
||||||
'details': {
|
'details': {
|
||||||
'ip': tf_config['ip'],
|
'manager_ip': tf_config['ip'],
|
||||||
'port': tf_config['port'],
|
'http_port': tf_config['port'],
|
||||||
'ssh_port': tf_config['ssh_port'],
|
'ssh_port': tf_config['ssh_port'],
|
||||||
'2.4G-Radio': tf_config['lf_2dot4G_Radio'].replace(' ', '').split(','),
|
'setup': {"method":"build","DB": "Test_Scenario_Automation"},
|
||||||
'5G-Radio': tf_config['lf_5G_Radio'].replace(' ', '').split(','),
|
'wan_ports': {
|
||||||
'AX-Radio': tf_config['AX_Radio'].replace(' ', '').split(','),
|
tf_config["Upstream"]: {"addressing": "dhcp-server",
|
||||||
'upstream': tf_config['Upstream'],
|
"subnet": "172.16.0.1/16",
|
||||||
'upstream_subnet': tf_config['upstream_subnet'],
|
"dhcp": {
|
||||||
'uplink': tf_config['uplink'],
|
"lease-first": 10,
|
||||||
'2.4G-Station-Name': tf_config['lf_2dot4G_Station_Name'],
|
"lease-count": 10000,
|
||||||
'5G-Station-Name': tf_config['lf_5G_Station_Name'],
|
"lease-time": "6h"
|
||||||
'AX-Station-Name': tf_config['AX_Station_Name']
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'lan_ports':{},
|
||||||
|
"uplink_nat_ports":{
|
||||||
|
tf_config["uplink"]:{
|
||||||
|
"addressing":"static",
|
||||||
|
"ip":tf_config["eth3_ip"],
|
||||||
|
"gateway_ip":tf_config['upstream_subnet'],
|
||||||
|
"ip_mask": "255.255.255.0",
|
||||||
|
"dns_servers": "BLANK"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user