summaryrefslogtreecommitdiff
path: root/src/validators/allowed-vlan
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-11-03 17:40:12 +0100
committerChristian Poessinger <christian@poessinger.com>2022-11-03 17:40:12 +0100
commit6f37744ad45a5f4cd585fa7c981833a9ebe5e437 (patch)
tree1efc49e712e0c314f16fb54df3340230b133af78 /src/validators/allowed-vlan
parent4ae434d50337b6a1543176b0b86e938fc0663626 (diff)
downloadvyos-1x-6f37744ad45a5f4cd585fa7c981833a9ebe5e437.tar.gz
vyos-1x-6f37744ad45a5f4cd585fa7c981833a9ebe5e437.zip
xml: T4795: superseed allowed-vlan validator by numeric range validator
Reduce CPU time when spawning the python interpreter. Same can be done by the numeric validator.
Diffstat (limited to 'src/validators/allowed-vlan')
-rwxr-xr-xsrc/validators/allowed-vlan19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/validators/allowed-vlan b/src/validators/allowed-vlan
deleted file mode 100755
index 11389390b..000000000
--- a/src/validators/allowed-vlan
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /usr/bin/python3
-
-import sys
-import re
-
-if __name__ == '__main__':
- if len(sys.argv)>1:
- allowed_vlan = sys.argv[1]
- if re.search('[0-9]{1,4}-[0-9]{1,4}', allowed_vlan):
- for tmp in allowed_vlan.split('-'):
- if int(tmp) not in range(1, 4095):
- sys.exit(1)
- else:
- if int(allowed_vlan) not in range(1, 4095):
- sys.exit(1)
- else:
- sys.exit(2)
-
- sys.exit(0)