fixed merge conflicts

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-12-13 13:01:01 +05:30
197 changed files with 29645 additions and 14907 deletions

View File

@@ -300,17 +300,17 @@ class StationProfile:
pprint(set_port.set_port_current_flags)
pprint(set_port.set_port_interest_flags)
return
if (param_name in set_port.set_port_cmd_flags):
if param_name in set_port.set_port_cmd_flags:
if (value == 1) and (param_name not in self.desired_set_port_cmd_flags):
self.desired_set_port_cmd_flags.append(param_name)
elif value == 0:
self.desired_set_port_cmd_flags.remove(param_name)
elif (param_name in set_port.set_port_current_flags):
elif param_name in set_port.set_port_current_flags:
if (value == 1) and (param_name not in self.desired_set_port_current_flags):
self.desired_set_port_current_flags.append(param_name)
elif value == 0:
self.desired_set_port_current_flags.remove(param_name)
elif (param_name in set_port.set_port_interest_flags):
elif param_name in set_port.set_port_interest_flags:
if (value == 1) and (param_name not in self.desired_set_port_interest_flags):
self.desired_set_port_interest_flags.append(param_name)
elif value == 0:
@@ -359,7 +359,7 @@ class StationProfile:
def cleanup(self, desired_stations=None, delay=0.03, debug_=False):
print("Cleaning up stations")
if (desired_stations is None):
if desired_stations is None:
desired_stations = self.station_names
if len(desired_stations) < 1:
@@ -371,7 +371,9 @@ class StationProfile:
self.local_realm.rm_port(port_eid, check_exists=True, debug_=debug_)
time.sleep(delay)
# And now see if they are gone
LFUtils.wait_until_ports_disappear(base_url=self.lfclient_url, port_list=desired_stations)
LFUtils.wait_until_ports_disappear(base_url=self.lfclient_url,
port_list=desired_stations,
debug=debug_)
# Checks for errors in initialization values and creates specified number of stations using init parameters
def create(self, radio,
@@ -440,7 +442,6 @@ class StationProfile:
set_port_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_port", debug_=debug)
wifi_extra_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_wifi_extra", debug_=debug)
wifi_txo_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_wifi_txo", debug_=debug)
my_sta_names = []
# add radio here
if (num_stations > 0) and (len(sta_names_) < 1):
# print("CREATING MORE STA NAMES == == == == == == == == == == == == == == == == == == == == == == == ==")
@@ -449,7 +450,7 @@ class StationProfile:
else:
my_sta_names = sta_names_
if (len(my_sta_names) >= 15) or (suppress_related_commands_ == True):
if (len(my_sta_names) >= 15) or suppress_related_commands_:
self.add_sta_data["suppress_preexec_cli"] = "yes"
self.add_sta_data["suppress_preexec_method"] = 1
self.set_port_data["suppress_preexec_cli"] = "yes"
@@ -503,13 +504,13 @@ class StationProfile:
continue
# print("- 3264 - ## %s ## add_sta_r.jsonPost - - - - - - - - - - - - - - - - - - "%eidn)
json_response = add_sta_r.jsonPost(debug=self.debug)
add_sta_r.jsonPost(debug=self.debug)
finished_sta.append(eidn)
# print("- ~3264 - %s - add_sta_r.jsonPost - - - - - - - - - - - - - - - - - - "%eidn)
time.sleep(0.01)
set_port_r.addPostData(self.set_port_data)
# print("- 3270 -- %s -- set_port_r.jsonPost - - - - - - - - - - - - - - - - - - "%eidn)
json_response = set_port_r.jsonPost(debug)
set_port_r.jsonPost(debug)
# print("- ~3270 - %s - set_port_r.jsonPost - - - - - - - - - - - - - - - - - - "%eidn)
time.sleep(0.01)
@@ -519,10 +520,10 @@ class StationProfile:
self.wifi_txo_data["port"] = name
if self.wifi_extra_data_modified:
wifi_extra_r.addPostData(self.wifi_extra_data)
json_response = wifi_extra_r.jsonPost(debug)
wifi_extra_r.jsonPost(debug)
if self.wifi_txo_data_modified:
wifi_txo_r.addPostData(self.wifi_txo_data)
json_response = wifi_txo_r.jsonPost(debug)
wifi_txo_r.jsonPost(debug)
# append created stations to self.station_names
self.station_names.append("%s.%s.%s" % (radio_shelf, radio_resource, name))
@@ -534,7 +535,7 @@ class StationProfile:
# and set ports up
if dry_run:
return
if (self.up):
if self.up:
self.admin_up()
# for sta_name in self.station_names:
@@ -551,8 +552,15 @@ class StationProfile:
self.add_sta_data["flags"] = self.add_named_flags(self.desired_add_sta_flags, add_sta.add_sta_flags)
self.add_sta_data["flags_mask"] = self.add_named_flags(self.desired_add_sta_flags_mask,
add_sta.add_sta_flags)
station_eid = self.local_realm.name_to_eid(station)
station_shelf = station_eid[0]
station_resource = station_eid[1]
station_port = station_eid[2]
self.add_sta_data["radio"] = radio
self.add_sta_data["sta_name"] = station
self.add_sta_data["shelf"] = station_shelf
self.add_sta_data["resource"] = station_resource
self.add_sta_data["sta_name"] = station_port
self.add_sta_data["ssid"] = 'NA'
self.add_sta_data["key"] = 'NA'
self.add_sta_data['mac'] = 'NA'
@@ -565,4 +573,4 @@ class StationProfile:
print(self.lfclient_url + "/cli_json/add_sta")
print(self.add_sta_data)
add_sta_r.addPostData(self.add_sta_data)
json_response = add_sta_r.jsonPost(self.debug)
add_sta_r.jsonPost(self.debug)