mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
Handling "vlan 2"
This commit is contained in:
1 parent
4ad0b7fd3d
commit
16d61857b7
1 file changed
+9
-8
+9
-8
@@ -310,14 +310,15 @@ class Handler(SimpleHTTPRequestHandler):
|
|||||||
vid = int(pieces[1]);
|
vid = int(pieces[1]);
|
||||||
startIndex=2
|
startIndex=2
|
||||||
name=""
|
name=""
|
||||||
if pieces[2] == "d":
|
if len(pieces) > 2:
|
||||||
return self.remove_vlan(vid)
|
if pieces[2] == "d":
|
||||||
elif pieces[2] == "mgmt":
|
return self.remove_vlan(vid)
|
||||||
state["mgmt_vlan"] = vid
|
elif pieces[2] == "mgmt":
|
||||||
return
|
state["mgmt_vlan"] = vid
|
||||||
elif not re.match('^[0-9]+$', pieces[2]):
|
return
|
||||||
name = pieces[2]
|
elif not re.match('^[0-9]+$', pieces[2]):
|
||||||
startIndex=3
|
name = pieces[2]
|
||||||
|
startIndex=3
|
||||||
|
|
||||||
state["vlans"][vid] = self.newVlan(name)
|
state["vlans"][vid] = self.newVlan(name)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user