I am on vyos VyOS 2025.11.04-0019-rolling using the https api. I have a simple python script to generate me a wireguard interface with its keys. when I run the code I get what looks like the correct response.
import os
import json
import urllib3
urllib3.disable_warnings()
from pyvyos import VyDevice
from dotenv import load_dotenv
load_dotenv()
hostname = os.getenv('VYDEVICE_HOSTNAME')
apikey = os.getenv('VYDEVICE_APIKEY')
port = os.getenv('VYDEVICE_PORT')
protocol = os.getenv('VYDEVICE_PROTOCOL')
verify_ssl = os.getenv('VYDEVICE_VERIFY_SSL')
verify = verify_ssl.lower() == "true" if verify_ssl else True
# Initialize VyDevice and store in app context
device = VyDevice(hostname=hostname, apikey=apikey, port=port, protocol=protocol, verify=verify)
data = device.generate(path=["pki", "wireguard", "key-pair", "install", "interface", "wg0"])
print(data.result)
Response:
1 value(s) installed. Use "compare" to see the pending changes, and "commit" to apply.
Corresponding public-key to use on peer system is: '+Nsm/cgOysi6za5TeRoEPRU5iPpitKVgTbuNX8h0Bmk='
But if I check to see if it was created properly I donβt see the new interface anywhere.
vyos@vyos# show interfaces
dummy dum0 {
address 192.168.0.1/32
}
ethernet eth0 {
address dhcp
description WAN
hw-id f8:b1:56:cb:9f:45
}
ethernet eth1 {
address 10.50.50.1/24
description LAN
hw-id 60:e3:27:00:2d:62
vif 5 {
address 10.5.5.1/24
description TEST5
}
vif 6 {
address 10.6.6.1/23
description TEST6
}
vif 7 {
address 10.7.7.1/24
description TEST7
}
vif 8 {
address 10.8.8.1/24
description TEST8
}
}
loopback lo {
}
[edit]
vyos@vyos#
Anyone have any idea what to look for to troubleshoot this? I appreciate the help.