rf profile custom options added, lf_tests fixes

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-06-09 15:59:37 +05:30
parent 884df9d825
commit 2aef336e65
3 changed files with 27 additions and 7 deletions

View File

@@ -462,9 +462,13 @@ class ProfileUtility:
default_profile._details["rfConfigMap"]["is5GHz"]["rf"] = profile_data["name"]
default_profile._details["rfConfigMap"]["is5GHzL"]["rf"] = profile_data["name"]
default_profile._details["rfConfigMap"]["is5GHzU"]["rf"] = profile_data["name"]
# for i in profile_data['rfConfigMap']:
# for j in profile_data['rfConfigMap'][i]:
# default_profile._details["rfConfigMap"][i][j] = profile_data['rfConfigMap'][i][j]
for i in default_profile._details["rfConfigMap"]:
for j in profile_data:
if i == j:
for k in default_profile._details["rfConfigMap"][i]:
for l in profile_data[j]:
if l == k:
default_profile._details["rfConfigMap"][i][l] = profile_data[j][l]
profile = self.profile_client.create_profile(body=default_profile)
self.profile_creation_ids['rf'].append(profile._id)
return profile
@@ -482,6 +486,13 @@ class ProfileUtility:
default_profile._details["rfConfigMap"]["is5GHzL"]["rf"] = profile_data["name"]
default_profile._details["rfConfigMap"]["is5GHzU"]["rf"] = profile_data["name"]
default_profile._name = profile_data["name"]
for i in default_profile._details["rfConfigMap"]:
for j in profile_data:
if i == j:
for k in default_profile._details["rfConfigMap"][i]:
for l in profile_data[j]:
if l == k:
default_profile._details["rfConfigMap"][i][l] = profile_data[j][l]
profile = self.profile_client.create_profile(body=default_profile)
self.profile_creation_ids['rf'].append(profile._id)
return profile
@@ -1023,7 +1034,15 @@ if __name__ == '__main__':
}
api = Controller(controller_data=controller)
profile = ProfileUtility(sdk_client=api)
profile.cleanup_profiles()
profile_data = {
"name": "test-rf-wifi-6",
"is2dot4GHz": {},
"is5GHz": {"channelBandwidth": "is20MHz"},
"is5GHzL": {"channelBandwidth": "is20MHz"},
"is5GHzU": {"channelBandwidth": "is20MHz"}
}
profile.set_rf_profile(profile_data=profile_data, mode="wifi6")
print(profile.default_profiles["rf"])
# profile.get_default_profiles()
# profile_data = {
# "profile_name": "ssid_wep_2g",

View File

@@ -46,7 +46,7 @@ class RunTest:
self.ax_prefix = lanforge_data["AX-Station-Name"]
self.debug = debug
self.lf_ssh_port = lanforge_data["ssh_port"]
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=debug)
self.staConnect = None
self.dataplane_obj = None
self.influx_params = influx_params
self.influxdb = RecordInflux(_lfjson_host=self.lanforge_ip,
@@ -63,6 +63,7 @@ class RunTest:
def Client_Connectivity(self, ssid="[BLANK]", passkey="[BLANK]", security="open", extra_securities=[],
station_name=[], mode="BRIDGE", vlan_id=1, band="twog"):
"""SINGLE CLIENT CONNECTIVITY using test_connect2.py"""
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug)
self.staConnect.sta_mode = 0
self.staConnect.upstream_resource = 1
if mode == "BRIDGE":

View File

@@ -33,8 +33,8 @@ CONFIGURATION = {
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"2.4G-Station-Name": "twog0",
"5G-Station-Name": "fiveg0",
"AX-Station-Name": "ax"
}
}