Skip to content

Tags: openconfig/ygot

Tags

v0.29.22

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
update go mod (#1015)

* update go mod
* update static check go version

v0.29.21

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Handle enums in protomap (#1012)

Co-authored-by: Rob Shakir <[email protected]>

v0.29.20

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
🐜: squash bug related to leaf-lists and shadow schemas. (#980)

* 🐜: squash bug related to leaf-lists and shadow schemas.

 * (M) util/reflect.go
   - Fix missing parameter to string output.
 * (M) ytypes/{leaf,node,node_test,schema_test,util_schema}.go
   - Two bugs fixed.
     1. In the case that one calls `SetNode` with something that was
        not a gNMI `TypedValue` and was not JSON, then we could panic
        when attempting to type cast it.
     2. If a schema was generated that uses path compression, and
        `SetNode` was called for a node that was compressed out, but
        `PreferShadowPaths` was not set AND this node was a leaf-list
        then rather than performing a no-op (the expected behaviour,
        since we asked to set a node that was not the 'preferred' thing
        to set), then we would bail with an error since the schema was
        not a leaf schema. Small fix, lots of testing to find the root
        cause here.
 * (M) ytypes/schema_test/set_test.go
   - Bug reproduction.

* Remove `TestFish`. 🐠

v0.29.19

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add `GetOrCreate<ListName>Map` helper for lists. (#971)

This helps avoid nil checks when there is a need to operate on the map
field directly.

v0.29.18

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix `Marshal7951` for direct union leaf calls. (#947)

When `jsonValue` is called using the output of `reflect.ValueOf()` instead of
`reflect.StructField`, any interface type is lost through re-packing to the
empty interface (any). This means the `reflect.Kind` of a union field is no
longer the union type, but instead its underlying concrete type. The current
code doesn't handle this case, leading to runtime errors.

This handling code is now added, with a couple more fixes related to `empty`
types.

-----
Tested manually that the following ygnmi call is no longer affected by the
original error:
```go
sp := gnmi.OC().NetworkInstance("DEFAULT").Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, "STATIC")
return ygnmi.Replace(context.Background(), c, sp.Static("1.1.1.1/32").SetTag().Config(), oc.NetworkInstance_Protocol_Static_SetTag_Union(oc.UnionUint32(42)))
```

v0.29.17

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Avoid panic when calling Elem on a nil map member. (#941)

* (M) ygot/struct_validation_map(_test)?.go
   - if a map was received that had a nil value in it, this caused
     a panic to occur since `(reflect.Value).Elem()` does not handle
     these cases cleanly. Add a check whether the value is nil before
     calling Elem.

v0.29.16

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Support skipping any-xml using -ignore_unsupported. (#931)

Currently it fails because containers are being detected via the
`default` case, so they're being classified as containers.

v0.29.15

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Use standard protobuf library naming for gribi_aft. (#930)

* (M) protomap/integration_tests/integration_test.go
  - Rename `gribi_aft` to `aftpb` to reflect standard protobuf library
    naming.

v0.29.14

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add support leaf-lists in paths->protobuf. (#926)

* Add support leaf-lists in paths->protobuf.

 * (M) protomap/integration_tests/integration_test.go
  - Add test case for a failure that was causing a panic,
    where a leaf-list of union values was being handed to
    PathsToProto. Currently not yet implemented, but test
    checks error handling works as expected.
 * (M) protomap/proto(_test)?.go
  - Add support and testing for mapping of leaf-lists of
    YANG inbuilt types to protobufs.

* Add TODO.

* Throw an error for `repeated` in `makeWrapper`.

* Add support for mapping leaf-lists of unions to protobufs. (#927)

* Add support for mapping leaf-lists of unions to protobufs.

 * (M) integration_tests/integration_test.go
  - Reflect the fact that the gRIBI integration test cases is now
    implemented.
 * (M) protomap/proto.go
  - Add support for mapping both []any and gNMI TypedValue messages
    to fields within a protobuf from input gNMI paths.
 * (M) protomap/testdata/...
  - Additional fields in test protobufs.

* Add outdated file.

* Remove stale output.

* Improve test coverage - add handling for bool.

v0.29.13

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Remove bottleneck in validation (#923)

Even with debugLibrary not enabled ValueStr is calculated in this call,
which causes significant bottlenecks in validation.

All other calls to DbgPrint already use ValueStrDebug to avoid formatting
string output that won't ever be used.