summaryrefslogtreecommitdiff
path: root/src/completion
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-11 14:27:57 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-11 19:08:29 +0100
commite835aef3a0ebbc957abd38e54f8040f5b67157ce (patch)
treeaa4fa7530d948d43cb85235e2a1b0735e8a72f06 /src/completion
parent867fc8d75380fee36dab7d495b835b19e7dafd58 (diff)
downloadvyos-1x-e835aef3a0ebbc957abd38e54f8040f5b67157ce.tar.gz
vyos-1x-e835aef3a0ebbc957abd38e54f8040f5b67157ce.zip
ifconfig: T2223: rename Register to Section
While the class does indeed all the registration, it work is really to map classes to interface section. ie: interface ethernet -> EthernetIf Therefore it can also list which interface are from which type, therefore the name change. Other function name will also be renamed as a consequence
Diffstat (limited to 'src/completion')
-rwxr-xr-xsrc/completion/list_openvpn_clients.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/completion/list_openvpn_clients.py b/src/completion/list_openvpn_clients.py
index 17b0c7008..177ac90c9 100755
--- a/src/completion/list_openvpn_clients.py
+++ b/src/completion/list_openvpn_clients.py
@@ -18,7 +18,7 @@ import os
import sys
import argparse
-from vyos.ifconfig import Interface
+from vyos.ifconfig import Section
def get_client_from_interface(interface):
clients = []
@@ -50,7 +50,7 @@ if __name__ == "__main__":
if args.interface:
clients = get_client_from_interface(args.interface)
elif args.all:
- for interface in Interface.listing("openvpn"):
+ for interface in Section.interfaces("openvpn"):
clients += get_client_from_interface(interface)
print(" ".join(clients))