-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Describe the bug
Example GNMI device cannot establish a connection when user wishes to use PLAINTEXT connection-type.
Branch
main
To Reproduce
Steps to reproduce the behavior:
- Follow https://github.com/PANTHEONtech/lighty/blob/main/lighty-examples/lighty-gnmi-community-restconf-app/README.md.
- Do not add certificates.
- Change payload to connect device to:
curl --request PUT 'http://127.0.0.1:8888/restconf/data/network-topology:network-topology/topology=gnmi-topology/node=gnmi-simulator' \
--header 'Content-Type: application/json' \
--data-raw '{
"node": [
{
"node-id": "gnmi-simulator",
"connection-parameters": {
"host": "127.0.0.1",
"port": 10161,
"connection-type" : "PLAINTEXT"
"credentials": {
"username": "admin",
"password": "admin"
}
},
"extensions-parameters": {
"gnmi-parameters": {
"use-model-name-prefix": true
}
}
}
]
}'
- Device fails to connect:
curl --request GET 'http://127.0.0.1:8888/restconf/data/network-topology:network-topology/topology=gnmi-topology/node=gnmi-simulator' | python3 -m json.tool
returns
{
"network-topology:node": [
{
"node-id": "gnmi-simulator",
"gnmi-topology:extensions-parameters": {
"gnmi-parameters": {
"use-model-name-prefix": true
}
},
"gnmi-topology:connection-parameters": {
"port": 10161,
"host": "127.0.0.1",
"connection-type": "PLAINTEXT"
},
"gnmi-topology:node-state": {
"node-status": "TRANSIENT_FAILURE"
}
}
]
}
Expected behavior
Device is connected successfully and requests to device are exchanged in plaintext which is useful for debugging purposes during development.
Additional context
Nor controller, nor device are not providing any useful logs.