diff options
-rw-r--r-- | python/vyos/interfaces.py | 8 | ||||
-rwxr-xr-x | src/completion/list_interfaces.py | 4 |
2 files changed, 7 insertions, 5 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 diff --git a/src/completion/list_interfaces.py b/src/completion/list_interfaces.py index 84d17f89f..47eeaf00c 100755 --- a/src/completion/list_interfaces.py +++ b/src/completion/list_interfaces.py @@ -16,7 +16,7 @@ args = parser.parse_args() if args.type: try: interfaces = vyos.interfaces.list_interfaces_of_type(args.type) - + except ValueError as e: print(e, file=sys.stderr) print("") @@ -35,6 +35,8 @@ elif args.bridgeable: vxlan = vyos.interfaces.list_interfaces_of_type("vxlan") wireless = vyos.interfaces.list_interfaces_of_type("wireless") tunnel = vyos.interfaces.list_interfaces_of_type("tunnel") + wireless = vyos.interfaces.list_interfaces_of_type("wireless") + interfaces = eth + bond + l2tpv3 + openvpn + vxlan + wireless + tunnel elif args.bondable: |