openconfig / goyang

YANG parser and compiler to produce Go language objects
Apache License 2.0
218 stars 83 forks source link

Retain Extra fields over transforming Uses and Augments to Entry #243

Closed bclasse closed 1 year ago

bclasse commented 1 year ago

Hi,

In a YANG model, uses or augments can be used to extend modules. It's possible to define under those nodes an IfFeature attribute. But when turning those into an Entry (yang.ToEntry), IfFeature field disappears. It should become an attribute located under Extras, but when using Uses, it simply isn't copied hence some information is lost.

This PR adds support for moving all the Extra fields defined in Uses or Merge to the augment element.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

bclasse commented 1 year ago

CLA problem, will reissue this one.