openconfig / ygnmi

A Go gNMI client library based on ygot-generated code
Apache License 2.0
12 stars 4 forks source link

Generate "Map" PathStructs and gNMI helpers #101

Closed wenovus closed 1 year ago

wenovus commented 1 year ago
These are PathStructs that are unique to keyed-list types that refer to
the entire map object representing the list.

* This only pertains to compressed structs (will not affect uncompressed
  PathStruct generation).
* Both non-wildcard and wildcard versions are generated. For Wildcard []map will
  be the return type.
* Refactored the code to handle atomic lists as well without impacting ordered map
  generation. Child constructors for atomic lists are also cut off similar to ordered maps.

Tests are in following PR.

Comments to help with reviewing this change:

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5361454072


Changes Missing Coverage Covered Lines Changed/Added Lines %
pathgen/pathgen.go 72 82 87.8%
<!-- Total: 83 93 89.25% -->
Files with Coverage Reduction New Missed Lines %
pathgen/gnmigen.go 1 82.35%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 5351195132: 0.2%
Covered Lines: 1777
Relevant Lines: 2113

💛 - Coveralls