summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2021-08-04 08:17:46 -0500
committerJohn Estabrook <jestabro@vyos.io>2021-08-04 08:17:46 -0500
commit62fd0c326173eeaccc751ad85969a5f0a93fb155 (patch)
treeee64f69d6b58f46d0903e40e5d7b953b370b33f1 /python
parentd77a2f56ea7e76158c07f5829397be4555473e3d (diff)
downloadvyos-1x-62fd0c326173eeaccc751ad85969a5f0a93fb155.tar.gz
vyos-1x-62fd0c326173eeaccc751ad85969a5f0a93fb155.zip
configquery: T3402: fix imports
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configquery.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/vyos/configquery.py b/python/vyos/configquery.py
index 6871602d5..1ee66ca64 100644
--- a/python/vyos/configquery.py
+++ b/python/vyos/configquery.py
@@ -20,6 +20,7 @@ settings from op mode, and execution of arbitrary op mode commands.
import re
import json
+from copy import deepcopy
from subprocess import STDOUT
import vyos.util
@@ -62,14 +63,14 @@ class CliShellApiConfigQuery(GenericConfigQuery):
def value(self, path: list):
cmd = ' '.join(path)
- (out, err) = popen(f'cli-shell-api returnActiveValue {cmd}')
+ (out, err) = vyos.util.popen(f'cli-shell-api returnActiveValue {cmd}')
if err:
raise ConfigQueryError('No value for given path')
return out
def values(self, path: list):
cmd = ' '.join(path)
- (out, err) = popen(f'cli-shell-api returnActiveValues {cmd}')
+ (out, err) = vyos.util.popen(f'cli-shell-api returnActiveValues {cmd}')
if err:
raise ConfigQueryError('No values for given path')
return out
@@ -136,7 +137,7 @@ class ConfigTreeActiveQuery(GenericConfigQuery):
return conf_dict
if no_multi_convert is False:
- conf_dict = multi_to_list(xmlpath, conf_dict)
+ conf_dict = vyos.xml.multi_to_list(xmlpath, conf_dict)
if not (isinstance(key_mangling, tuple) and \
(len(key_mangling) == 2) and \
@@ -154,7 +155,7 @@ class VbashOpRun(GenericOpRun):
def run(self, path: list, **kwargs):
cmd = ' '.join(path)
- (out, err) = popen(f'. /opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run; _vyatta_op_run {cmd}', stderr=STDOUT, **kwargs)
+ (out, err) = vyos.util.popen(f'. /opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run; _vyatta_op_run {cmd}', stderr=STDOUT, **kwargs)
if err:
raise ConfigQueryError(out)
return out