mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
Implementing removal of vlan
This commit is contained in:
1 parent
7694f1a625
commit
4ad0b7fd3d
1 file changed
+6
-1
+6
-1
@@ -297,6 +297,11 @@ class Handler(SimpleHTTPRequestHandler):
|
||||
"pvid": self._parse_pvid
|
||||
}
|
||||
|
||||
def remove_vlan(self, id):
|
||||
global state
|
||||
if id in state["vlans"]:
|
||||
del state["vlans"][id]
|
||||
|
||||
def newVlan(self, name):
|
||||
return {"active":True, "name":name, "untagged":[], "tagged":[], "pvid":[]}
|
||||
|
||||
@@ -306,7 +311,7 @@ class Handler(SimpleHTTPRequestHandler):
|
||||
startIndex=2
|
||||
name=""
|
||||
if pieces[2] == "d":
|
||||
return remove_vlan(vid)
|
||||
return self.remove_vlan(vid)
|
||||
elif pieces[2] == "mgmt":
|
||||
state["mgmt_vlan"] = vid
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user