summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-04 16:11:07 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-04 16:25:46 +0100
commitae72ab6de76dbc86cb881da7eafa64413819a9bc (patch)
tree1d4cc663cd627ed484ccfecb804575e606ecbcd8 /src
parentf91a8869cb1ab3acc605a93789e9310f33dbd979 (diff)
downloadvyos-1x-ae72ab6de76dbc86cb881da7eafa64413819a9bc.tar.gz
vyos-1x-ae72ab6de76dbc86cb881da7eafa64413819a9bc.zip
ifconfig: T2190: option to prevent Interface creation
a new option was added to the Interface class "create". By default the value is set to True, and when an instance of the class is created and the underlying interface does not exists, the class will create it. If the option "create" is set to False, the interface will not be created and instead the class will raise an error when it is instantiated.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/wireguard.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/wireguard.py b/src/op_mode/wireguard.py
index 512c80dda..c684f8a47 100755
--- a/src/op_mode/wireguard.py
+++ b/src/op_mode/wireguard.py
@@ -150,7 +150,7 @@ if __name__ == '__main__':
if args.listkdir:
list_key_dirs()
if args.showinterface:
- intf = WireGuardIf(args.showinterface, debug=False)
+ intf = WireGuardIf(args.showinterface, create=False, debug=False)
intf.op_show_interface()
if args.delkdir:
if args.location: