summaryrefslogtreecommitdiff
path: root/python/vyos/interfaces.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-11-08 18:37:33 +0100
committerChristian Poessinger <christian@poessinger.com>2019-11-08 18:37:33 +0100
commit8abde544455dd158d080eb6ea7b7ed226b27965a (patch)
tree2259e5768e5c71fbf38efccea7e3f0d81d819074 /python/vyos/interfaces.py
parent37dcd23368de5872a5d56d356d29cafb1b185ce5 (diff)
parentcc2ea329b1bb2ac23ffcc64892e831e7978023e2 (diff)
downloadvyos-1x-8abde544455dd158d080eb6ea7b7ed226b27965a.tar.gz
vyos-1x-8abde544455dd158d080eb6ea7b7ed226b27965a.zip
Merge branch 'current' of github.com:vyos/vyos-1x into equuleus
* 'current' of github.com:vyos/vyos-1x: ddclient: T1789: fix RFC2136 generated config T1774: fix error output Python/ifconfig: T1557: do not allow both IPv4 and dhcp address on interfaces list_interfaces: add wifi interfaces to bridgeable interfaces
Diffstat (limited to 'python/vyos/interfaces.py')
-rw-r--r--python/vyos/interfaces.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/interfaces.py b/python/vyos/interfaces.py
index ecf061d17..37c093aca 100644
--- a/python/vyos/interfaces.py
+++ b/python/vyos/interfaces.py
@@ -59,7 +59,7 @@ def wireguard_dump():
"""Dump wireguard data in a python friendly way."""
last_device=None
output = {}
-
+
# Dump wireguard connection data
_f = subprocess.check_output(["wg", "show", "all", "dump"]).decode()
for line in _f.split('\n'):
@@ -72,14 +72,14 @@ def wireguard_dump():
# We are currently entering a new node
device, private_key, public_key, listen_port, fw_mark = items
last_device = device
-
+
output[device] = {
'private_key': None if private_key == '(none)' else private_key,
'public_key': None if public_key == '(none)' else public_key,
'listen_port': int(listen_port),
'fw_mark': None if fw_mark == 'off' else int(fw_mark),
'peers': {},
- }
+ }
else:
# We are entering a peer
device, public_key, preshared_key, endpoint, allowed_ips, latest_handshake, transfer_rx, transfer_tx, persistent_keepalive = items
@@ -95,5 +95,5 @@ def wireguard_dump():
'transfer_rx': int(transfer_rx),
'transfer_tx': int(transfer_tx),
'persistent_keepalive': None if persistent_keepalive == 'off' else int(persistent_keepalive),
- }
+ }
return output