mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
Added country data to set_radio_channel
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
This commit is contained in:
@@ -932,7 +932,8 @@ class lf_libs:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(e)
|
logging.error(e)
|
||||||
|
|
||||||
def set_radio_channel(self, radio="1.1.wiphy0", channel="AUTO"):
|
def set_radio_channel(self, radio="1.1.wiphy0", channel="AUTO", country=None):
|
||||||
|
# country_code = US(840)
|
||||||
try:
|
try:
|
||||||
radio = radio.split(".")
|
radio = radio.split(".")
|
||||||
shelf = radio[0]
|
shelf = radio[0]
|
||||||
@@ -946,6 +947,11 @@ class lf_libs:
|
|||||||
"mode": "NA",
|
"mode": "NA",
|
||||||
"channel": channel
|
"channel": channel
|
||||||
}
|
}
|
||||||
|
try:
|
||||||
|
if country: # update the dictionary
|
||||||
|
data["country"] = country
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"{e}\nunable to change lanforge radio country code")
|
||||||
local_realm_obj.json_post("/cli-json/set_wifi_radio", _data=data)
|
local_realm_obj.json_post("/cli-json/set_wifi_radio", _data=data)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user