summaryrefslogtreecommitdiff
path: root/src/completion
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-08-02 12:34:34 +0200
committerChristian Poessinger <christian@poessinger.com>2019-08-02 12:34:34 +0200
commitc40d6e8d6dc7b513dca666e7dcd1cab42e0fde31 (patch)
tree8c7467ac6a3b56d12d708d7af6a24640700b18bb /src/completion
parentf9654c1c91de4c8b43edaf7571c696373deeef15 (diff)
downloadvyos-1x-c40d6e8d6dc7b513dca666e7dcd1cab42e0fde31.tar.gz
vyos-1x-c40d6e8d6dc7b513dca666e7dcd1cab42e0fde31.zip
[list-interfaces] support listing interfaces which can be bridged
Diffstat (limited to 'src/completion')
-rwxr-xr-xsrc/completion/list_interfaces.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/completion/list_interfaces.py b/src/completion/list_interfaces.py
index a4968c52f..66432af19 100755
--- a/src/completion/list_interfaces.py
+++ b/src/completion/list_interfaces.py
@@ -10,6 +10,7 @@ parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument("-t", "--type", type=str, help="List interfaces of specific type")
group.add_argument("-b", "--broadcast", action="store_true", help="List all broadcast interfaces")
+group.add_argument("-br", "--bridgeable", action="store_true", help="List all bridgeable interfaces")
args = parser.parse_args()
@@ -25,6 +26,14 @@ elif args.broadcast:
bridge = vyos.interfaces.list_interfaces_of_type("bridge")
bond = vyos.interfaces.list_interfaces_of_type("bonding")
interfaces = eth + bridge + bond
+elif args.bridgeable:
+ eth = vyos.interfaces.list_interfaces_of_type("ethernet")
+ bond = vyos.interfaces.list_interfaces_of_type("bonding")
+ l2tpv3 = vyos.interfaces.list_interfaces_of_type("l2tpv3")
+ openvpn = vyos.interfaces.list_interfaces_of_type("openvpn")
+ vxlan = vyos.interfaces.list_interfaces_of_type("vxlan")
+ wireless = vyos.interfaces.list_interfaces_of_type("wireless")
+ interfaces = eth + bond + l2tpv3 + openvpn + vxlan + wireless
else:
interfaces = vyos.interfaces.list_interfaces()