Comments (5)
Should be fixed now. Please reopen if something is amiss.
from gnxi.
Hi CoCumis, you should get an encoded subtree as per gNMI spec:
https://github.com/google/gnxi/blob/master/gnmi/server.go#L530
which client and target are you using? Can you provide examples of the get and the response?
from gnxi.
Thanks for response.
I am using docker image provided by faucet which you are mentioning in your README. For get request I use script provided in this docker image. Here is example:
#!/bin/sh
gnmi_get \
-target_addr $GNMI_TARGET:$GNMI_PORT \
-key $HOME/certs/client.key \
-cert $HOME/certs/client.crt \
-ca $HOME/certs/ca.crt \
-target_name server.com \
-alsologtostderr \
-xpath "/system/openflow/controllers/controller[name=main]/"
I would expect it will send response with one update message which contains JSON encoded subtree. But instead I get this (just excerpt):
notification: <
timestamp: 1530705017155554011
prefix: <
elem: <
name: "system"
>
elem: <
name: "openflow"
>
elem: <
name: "controllers"
>
elem: <
name: "controller"
key: <
key: "name"
value: "main"
>
>
>
update: <
path: <
elem: <
name: "connections"
>
elem: <
name: "connection"
key: <
key: "aux-id"
value: "0"
>
>
elem: <
name: "config"
>
elem: <
name: "transport"
>
>
val: <
string_val: "TLS"
>
>
update: <
path: <
elem: <
name: "connections"
>
elem: <
name: "connection"
key: <
key: "aux-id"
value: "0"
>
>
elem: <
name: "state"
>
elem: <
name: "address"
>
>
val: <
string_val: "192.0.2.10"
>
>
update: <
path: <
elem: <
name: "connections"
>
elem: <
name: "connection"
key: <
key: "aux-id"
value: "0"
>
>
elem: <
name: "state"
>
elem: <
name: "aux-id"
>
>
val: <
uint_val: 0
>
>
...
I also get the same result, if I try it with java client (generated from gnmi.proto). Is there something I had to configure in order to get whole subtree encoded as JSON instead of separate update message for each leaf?
from gnxi.
Hi, bugfix you provided fixes this problem only when the encoding is set to IETF_JSON
(as title says). However I encountered this problem again when the encoding is set to JSON
, which is the default one (is used when no encoding is specified).
Please, can you reopen this issue?
from gnxi.
Thanks I have a potential fix here: https://github.com/samribeiro/gnxi/tree/gnmi
But I need to test it first.
from gnxi.
Related Issues (20)
- crypto/sha1 is insecure
- os_grpc.pb.go without .proto file HOT 1
- Multiple models for gnmi target HOT 8
- crypto/md5 is insecure HOT 1
- gnmi get is giving metadata credentials not present though notls is given and tls has been disabled on device i am accessing HOT 7
- incorrect package for reset.proto file
- gRPC connection struck in TRANSIENT_FAILURE when InsecureSkipVerify = true HOT 1
- Reset start rpc arguments need to be switched around. HOT 1
- subscription is not implemented in gnmi_target
- perf_testing files are GPL licensed HOT 1
- Username and password duplication. HOT 2
- gnmi_set: IPv6 address parsing error in -update xpath
- Updating dependencies to the latest HOT 6
- oc_config_validate <=2.2.0 trusts Target self-signed certs by default
- oc_config_validate retries gNMI Set messages, it should only retry Gets
- Arista AP sends EOF error in the middle of telemetry stream
- oc_config_validate is pinned to Python 3.9 due to pyanbdind HOT 1
- Xpath validation broken for multi-leaf keys HOT 1
- rpc error: code = DeadlineExceeded desc = context deadline exceeded HOT 1
- Security risk due to unprotected TCP socket.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnxi.