openconfig / public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Apache License 2.0
894 stars 652 forks source link

pattern statement approach with regexp-posix extension #271

Closed exa-arrcus closed 2 months ago

exa-arrcus commented 5 years ago

While raised many times in the past, it was mentioned in https://github.com/openconfig/public/issues/122 that an extension was going to be brought in for the posix regexp flavor of the pattern statement. The interpretation of this would be that for a given string type, this type may have both a XSD compliant pattern statement as well as a posix variant posix-regex-pattern.

What appears to be the case however is that a regexp-posix extension was introduced and that each module conveys which flavor is being used while still abusing the YANG pattern statement. It is up to an implementation to be built surrounding IETF standards and a divergence in behavior to attempt to interpret statements outside of standards.

Is this the final plan for solving this issue? Are pattern statements not going to get corrected to their XSD variants any longer?

aashaikh commented 5 years ago

This was originally intended to be an interim plan, as I believe was mentioned in the past. It at least allows tooling to have a signal as to which variant of regex is being used in the module.

The most compatible approach remains one where we replace the value of the pattern statement with an XSD-compliant version, and add a new statement type for other variants as you mentioned. As this is a fair bit of work, we discussed recently the possibility of simplifying through some automation, e.g., to remove anchors, that might be sufficient to provide XSD-compliant statements without introducing other incompatible features.

exa-arrcus commented 4 years ago

Thx @aashaikh - is there a timeline associated with when this might happen?

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.