Closed raghavendramayagundi closed 11 months ago
refine_default.txt Attaching the yang file used for testing
I haven't forgot about this. looks like it should be straightforward, just need to find few minutes to take a look
Just to highlight, https://www.rfc-editor.org/rfc/rfc7950.html#page-106 says leaf and leaf-list will get "new" default values defined by "refine"
should be fixed, you can reopen if not test case : https://github.com/freeconf/yang/blob/master/parser/testdata/grouping/refine-default.yang test result: https://github.com/freeconf/yang/blob/master/parser/testdata/grouping/gold/refine-default.json
Two issues seen for "refine" statement:
Yang used:
module refine_default { grouping grouping-data { leaf grouping-data-leaf { default "grouping default"; config false; type string; } leaf-list grouping-data-leaf-list { min-elements 2; type string; default "one"; } } container grouping-container { uses grouping-data { refine grouping-data-leaf { default "testing refine"; description "refine leaf";//fails mandatory true; config true; } refine grouping-data-leaf-list { min-elements 5; max-elements 14; default "two"; default "three";//fails } } } }
I am using v0.0.0-20230828130712-4df55d501001 of the freeconf lib.