Environment: YANG Suite 3.0.13, Docker, Python 3.10.
Device: Nexus 9000v, NX-OS, gNMI over TLS on port 50051, self-signed cert CN=ems.cisco.com.
Repro
- Create a device profile named
N9Kv (slug becomes n9kv).
- gNMI section:
secure: true, secure port 50051, TLS host override ems.cisco.com.
- Upload the device cert as TLS Authority Certificate, save, run the reachability check.
Actual
POST /devices/upload/n9kv stores the file under the slug:
/ys-data/users/admin/devices/n9kv/n9k-gnmi.pem
But the lookup uses profile_name instead:
ERROR [yangsuite:373] Client certificate file not found. /ys-data/users/admin/devices/N9Kv/client.crt
ERROR [yangsuite:389] Client key file not found. /ys-data/users/admin/devices/N9Kv/client.key
So the certificate lookup fails and the 'None' is not an instance of 'bytes' issue is shown.
Workaround
ln -s n9kv /ys-data/users/admin/devices/N9Kv
All-lowercase profile names avoid the bug entirely.
Suggested fix
Use the slug on both sides of the cert path, since POST /devices/upload/<slug> already does.
Also consider surfacing "certificate file not found" to the user.
Environment: YANG Suite 3.0.13, Docker, Python 3.10.
Device: Nexus 9000v, NX-OS, gNMI over TLS on port 50051, self-signed cert
CN=ems.cisco.com.Repro
N9Kv(slug becomesn9kv).secure: true, secure port50051, TLS host overrideems.cisco.com.Actual
POST /devices/upload/n9kvstores the file under the slug:But the lookup uses
profile_nameinstead:So the certificate lookup fails and the
'None' is not an instance of 'bytes'issue is shown.Workaround
All-lowercase profile names avoid the bug entirely.
Suggested fix
Use the slug on both sides of the cert path, since
POST /devices/upload/<slug>already does.Also consider surfacing "certificate file not found" to the user.