diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-08-05 12:29:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 12:29:16 +0200 |
commit | 2afd1163361ea2ad3e94f51eac882007d8f9b7cf (patch) | |
tree | 975f51ccf8c749257d631fab9198c4ed521c06b0 /src/completion/list_interfaces.py | |
parent | b5c1b646beb025bce40cf1a5fb647ab39070da58 (diff) | |
parent | f8cc906b8ef3427b3a8686777d5bc2e3acbe4b7e (diff) | |
download | vyos-1x-2afd1163361ea2ad3e94f51eac882007d8f9b7cf.tar.gz vyos-1x-2afd1163361ea2ad3e94f51eac882007d8f9b7cf.zip |
Merge pull request #96 from c-po/t1156-bridge
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() |