diff options
Diffstat (limited to 'src/completion/list_interfaces.py')
-rwxr-xr-x | src/completion/list_interfaces.py | 9 |
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() |