summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-25 09:13:27 +0200
committerChristian Poessinger <christian@poessinger.com>2022-09-25 09:18:53 +0200
commit8f2f6303229814c03494369c51cedd31703406ec (patch)
tree937588f84be896e698babf99b10466368423eeff
parent01fcfb82122f1f1ae1dc4efe6636474c06c6ede4 (diff)
downloadvyos-1x-8f2f6303229814c03494369c51cedd31703406ec.tar.gz
vyos-1x-8f2f6303229814c03494369c51cedd31703406ec.zip
wireguard: ifconfig: T2653: move Config() import to be local to consumer
-rw-r--r--python/vyos/ifconfig/wireguard.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/wireguard.py b/python/vyos/ifconfig/wireguard.py
index 0ae431163..fe5e9c519 100644
--- a/python/vyos/ifconfig/wireguard.py
+++ b/python/vyos/ifconfig/wireguard.py
@@ -22,7 +22,6 @@ from tempfile import NamedTemporaryFile
from hurry.filesize import size
from hurry.filesize import alternative
-from vyos.config import Config
from vyos.ifconfig import Interface
from vyos.ifconfig import Operational
from vyos.template import is_ipv6
@@ -72,10 +71,11 @@ class WireGuardOperational(Operational):
return output
def show_interface(self):
- wgdump = self._dump().get(self.config['ifname'], None)
-
+ from vyos.config import Config
c = Config()
+ wgdump = self._dump().get(self.config['ifname'], None)
+
c.set_level(["interfaces", "wireguard", self.config['ifname']])
description = c.return_effective_value(["description"])
ips = c.return_effective_values(["address"])