Commit 19cc3ca
committed
Fix
When fields are absent in the YANG payload, they are skipped when the
payload is unmarshaled into a Go struct. This lead to invalid
comparisons, as the `gnmiext.Client` failed to detect changes in this
case. This commit fixes this issue, by resetting struct fields not
present in the YANG payload with a json struct tag back to their zero
value.gnmiext skipping updates due to missing fields in YANG payload1 parent 54c88e1 commit 19cc3ca
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
311 | 339 | | |
312 | 340 | | |
313 | 341 | | |
| |||
326 | 354 | | |
327 | 355 | | |
328 | 356 | | |
| 357 | + | |
329 | 358 | | |
330 | 359 | | |
331 | 360 | | |
| |||
0 commit comments