summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/op_mode/show_interfaces.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/op_mode/show_interfaces.py b/src/op_mode/show_interfaces.py
index ebeca3fc8..39e5dc7ac 100755
--- a/src/op_mode/show_interfaces.py
+++ b/src/op_mode/show_interfaces.py
@@ -71,7 +71,10 @@ def filtered_interfaces(ifnames, iftypes, vif, vrrp):
if ifnames and ifname not in ifnames:
continue
- interface = Interface(ifname)
+ # return the class which can handle this interface name
+ klass = Section.klass(ifname)
+ # connect to the interface
+ interface = klass(ifname, create=False, debug=False)
if iftypes and interface.definition['section'] not in iftypes:
continue