update vlan parsers
This commit is contained in:
@@ -15,10 +15,11 @@ class Vrp(BaseDevice):
|
||||
vlans = []
|
||||
pattern = self.unamed_vlans_parse_pattern
|
||||
for match in re.finditer(pattern, self.config, re.MULTILINE):
|
||||
print(match)
|
||||
tokens = match.group(1).split(self.unamed_vlan_splitter)
|
||||
i = 0
|
||||
while i < len(tokens):
|
||||
if i + 2 < len(tokens) and tokens[i + 1].lower() == 'to':
|
||||
if i + 2 < len(tokens) and tokens[i + 1].lower() == self.unamed_vlan_counter:
|
||||
start = int(tokens[i])
|
||||
end = int(tokens[i + 2])
|
||||
for vlan_id in range(start, end + 1):
|
||||
|
||||
Reference in New Issue
Block a user