goyang icon indicating copy to clipboard operation
goyang copied to clipboard

Add GetOrderedChildren to Entries for Ordering of Dir

Open carlverge opened this issue 6 years ago • 4 comments

Currently ordering from the original yang module is lost when parsing the module as the children in entries are added to a map.

  • This adds a SequenceNum field to the Entry struct that represents the original ordering from the yang module (pending tests)

carlverge avatar Sep 14 '18 15:09 carlverge

Coverage Status

Coverage increased (+0.3%) to 69.093% when pulling 1d80a50500216188fcca109ec46922c9e453c430 on carlverge:patch-1 into b6e1e28273ad274f9240361b3a1ae65d27c045ac on openconfig:master.

coveralls avatar Sep 14 '18 17:09 coveralls

@andaru Is this OK for merging?

w.r.t not being able to tell that a *yang.Entry is part of an augment, this is something that we'll likely need to address at some point. It'll be required to support the construct:

augment /foo/bar {
  when "/baz/bop = 'beep'";
}

since in this case, we need to know about the provenance of the nodes in the augment. I'm happy to support it in another PR (of course), but just wanted to highlight this.

robshakir avatar Nov 12 '18 17:11 robshakir

Sorry, I missed the updates here.

Obviously we have conflicts now, which I'd be happy to help resolve given the delays. The changes made here look fine to me, is the only thing we need to do merge it, or have parts of this work been done later (in other changes)?

andaru avatar May 01 '20 04:05 andaru