On Wed, Jun 12, 2019 at 10:01:30AM +0200, Ladislav Lhotka wrote: > I think it is very unfortunate that OpenConfig folks use POSIX regular > expressions instead of XSD. This of course causes confusion, see e.g. this PR: > > https://github.com/CZ-NIC/yangson/pull/22 > > Given the popularity of OpenConfig models, it seems to me that it would be > better if YANG somehow accomodates such (largely cosmetic) differences.
The differences are not cosmetic. See previous discussions on this topic. > One option would be that each YANG module declares the regex flavour used in > its > patterns. Yes, it is a complication, but having separate forks of YANG is much > worse. It is sad that OpenConfig does not follow the standard. If OpenConfig can't live without POSIX regular expressions, then OpenConfig should have used proper extension statements instead of simply changing the semantics of the YANG pattern statement to measn something different. That said, they do seem to declare something like oc-ext:regexp-posix; but it would have been much smarter to use for example oc-posix:regex instead of changing the semantics of the pattern statement. I would rather see OpenConfig adopting the standard or fixing their POSIX regular expression solution so that it avoids changing the semantics of YANG statements. Having statements mean different things depending on some context is pretty bad design. /js -- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <https://www.jacobs-university.de/> _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
