summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-01-26 01:02:33 +0100
committerDaniil Baturin <daniil@baturin.org>2019-01-26 01:02:33 +0100
commit4a0027211c0cc1a56294899d0796ed923cacd209 (patch)
tree9fc8539ee2dfa891c1e7f04d15d7e67e90e52196 /src/helpers
parent4960c354afc207814cec419daf0a04d53703d63a (diff)
downloadvyos-1x-4a0027211c0cc1a56294899d0796ed923cacd209.tar.gz
vyos-1x-4a0027211c0cc1a56294899d0796ed923cacd209.zip
T1193: remove the commands pipe since it's no longer needed.
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/commands-pipe.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/helpers/commands-pipe.py b/src/helpers/commands-pipe.py
deleted file mode 100755
index ab68ccade..000000000
--- a/src/helpers/commands-pipe.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python3
-
-import sys
-import re
-
-from signal import signal, SIGPIPE, SIG_DFL
-from vyos.configtree import ConfigTree
-
-signal(SIGPIPE,SIG_DFL)
-
-config_string = sys.stdin.read().strip()
-config_string = config_string.replace("\\", "\\\\")
-
-if not config_string:
- sys.exit(0)
-
-# When used in conf mode pipe, the config given to the script is likely incomplete
-# and breaks the "all top level nodes are neither tag nor leaf"
-# invariant, so we wrap it into a fake node.
-# Since nodes don't normally start with an underscore,
-# __root__ is hygienic enough.
-config_string = "__root__ {{ {0} \n }}".format(config_string)
-
-config_re = re.compile(r'(set|comment)\s+__root__\s+(.*)')
-
-config = ConfigTree(config_string)
-commands = config.to_commands()
-commands = config_re.sub("\\1 \\2", commands)
-
-print(commands)