summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_mpls.py2
-rwxr-xr-xsrc/conf_mode/system-ip.py2
-rwxr-xr-xsrc/conf_mode/system-ipv6.py2
-rwxr-xr-xsrc/conf_mode/vrf.py2
-rw-r--r--src/tests/test_util.py3
5 files changed, 6 insertions, 5 deletions
diff --git a/src/conf_mode/protocols_mpls.py b/src/conf_mode/protocols_mpls.py
index 73af6595b..bb982c5fc 100755
--- a/src/conf_mode/protocols_mpls.py
+++ b/src/conf_mode/protocols_mpls.py
@@ -23,7 +23,7 @@ from vyos.config import Config
from vyos.template import render_to_string
from vyos.util import dict_search
from vyos.util import read_file
-from vyos.util import sysctl_write
+from vyos.utils.system import sysctl_write
from vyos.configverify import verify_interface_exists
from vyos import ConfigError
from vyos import frr
diff --git a/src/conf_mode/system-ip.py b/src/conf_mode/system-ip.py
index 95865c690..b2225d665 100755
--- a/src/conf_mode/system-ip.py
+++ b/src/conf_mode/system-ip.py
@@ -22,8 +22,8 @@ from vyos.configverify import verify_route_map
from vyos.template import render_to_string
from vyos.util import call
from vyos.util import dict_search
-from vyos.util import sysctl_write
from vyos.util import write_file
+from vyos.utils.system import sysctl_write
from vyos.xml import defaults
from vyos import ConfigError
from vyos import frr
diff --git a/src/conf_mode/system-ipv6.py b/src/conf_mode/system-ipv6.py
index b6d3a79c3..60ebc8006 100755
--- a/src/conf_mode/system-ipv6.py
+++ b/src/conf_mode/system-ipv6.py
@@ -22,7 +22,7 @@ from vyos.configdict import dict_merge
from vyos.configverify import verify_route_map
from vyos.template import render_to_string
from vyos.util import dict_search
-from vyos.util import sysctl_write
+from vyos.utils.system import sysctl_write
from vyos.util import write_file
from vyos.xml import defaults
from vyos import ConfigError
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 0b983293e..2871f8527 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -32,7 +32,7 @@ from vyos.util import dict_search
from vyos.util import get_interface_config
from vyos.util import popen
from vyos.util import run
-from vyos.util import sysctl_write
+from vyos.utils.system import sysctl_write
from vyos import ConfigError
from vyos import frr
from vyos import airbag
diff --git a/src/tests/test_util.py b/src/tests/test_util.py
index 473052bef..2e8f1b6cc 100644
--- a/src/tests/test_util.py
+++ b/src/tests/test_util.py
@@ -15,14 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest import TestCase
-from vyos.util import *
class TestVyOSUtil(TestCase):
def test_key_mangline(self):
+ from vyos.util import mangle_dict_keys
data = {"foo-bar": {"baz-quux": None}}
expected_data = {"foo_bar": {"baz_quux": None}}
new_data = mangle_dict_keys(data, '-', '_')
self.assertEqual(new_data, expected_data)
def test_sysctl_read(self):
+ from vyos.utils.system import sysctl_read
self.assertEqual(sysctl_read('net.ipv4.conf.lo.forwarding'), '1')