akarneliuk / pygnmi

The pure Python implementation of the gNMI client.
https://training.karneliuk.com
BSD 3-Clause "New" or "Revised" License
126 stars 44 forks source link

adding bytes_val and leaflist_val with string_val parsing #151

Closed brunoonovais closed 6 months ago

brunoonovais commented 6 months ago

Hi @akarneliuk

Finally had time to work on committing the bytes_val, but also added a recent find that leaflist_val is not being processed either. For bytes_val, it is just converting the ieeefloat32 value correctly, and for leaflist_val, it looks like so:

MainThread_2024-03-07 10:19:23,121_gnmi_subscribe_INFO_telemetry_entry={'update': {'update': [{'path': 'system/processes/process[pid=5983]/state/args', 'val': '-C /etc/dnsmasq.conf -h -H /etc/hosts --pid-file=/var/run/dnsmasq.pid'}], 'timestamp': 1709602406601003300}, 'sync_response': True}