google / link022

Link022 - an open WiFi access point
Apache License 2.0
120 stars 34 forks source link

Set failed error with ap_config.json #38

Closed alshaboti closed 6 years ago

alshaboti commented 6 years ago

Hi, I got a set fiailed error when I tryed to run gnmi_set with the ap_config.json as it is explained in the demo. Command was:

root@raspi1:/home/pi/link022/demo# sudo env PATH=$PATH gnmi_set -ca=cert/client/ca.crt -cert=cert/client/client.crt -key=cert/client/client.key -target_name=www.example.com -target_addr=192.168.11.5:8080 -replace=/:@ap_config.json

Output:

== getRequest:
< ap_config.json content here, then> 

F0120 12:10:19.679681    1961 gnmi_set.go:158] Set failed: rpc error: code = InvalidArgument desc = config data validation fails: pointed-to value with path ../config/name from field Name value freeradius (string ptr) schema /device/system/aaa/server-groups/server-group/name is empty set, pointed-to value with path ../config/address from field Address value 192.168.11.1 (string ptr) schema /device/system/aaa/server-groups/server-group/servers/server/address is empty set
boleifu commented 6 years ago

The existing sample config does not pass the validation. Added a PR to fix the issue (https://github.com/google/link022/pull/39). You can use the updated payload for testing.