mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
Added PortUtils class, set_ftp method WIP
This commit is contained in:
@@ -1575,6 +1575,29 @@ class VAPProfile(LFCliBase):
|
||||
data["port"] = current_stations["interface"]["alias"]
|
||||
self.local_realm.json_post(req_url, data, debug_=self.debug)
|
||||
|
||||
class PortUtils(LFCliBase):
|
||||
def __init__(self, local_realm):
|
||||
self.local_realm = local_realm
|
||||
|
||||
def set_ftp(self, port_name="", resource=1, on=False):
|
||||
if port_name != "":
|
||||
data = {
|
||||
"shelf": 1,
|
||||
"resource": resource,
|
||||
"port": port_name,
|
||||
"current_flags": 0,
|
||||
"interest": 0
|
||||
}
|
||||
|
||||
if on:
|
||||
data["current_flags"] = 0x400000000000
|
||||
data["interest"] = 0x10000000
|
||||
else:
|
||||
data["interest"] = 0x10000000
|
||||
|
||||
self.local_realm.json_post("cli-json/set_port", data)
|
||||
else:
|
||||
raise ValueError("Port name required")
|
||||
|
||||
# use the station profile to set the combination of features you want on your stations
|
||||
# once this combination is configured, build the stations with the build(resource, radio, number) call
|
||||
|
||||
Reference in New Issue
Block a user