When creating a Yang module programatically including pattern statements, some of them gets serialized with wrapping single quotes, and some don't. This is fine most of the time, but for the following particular pattern string pyang validation fails:
$ cat test.yang
...
typedef my-dt {
type string {
pattern (/.*/i?); // line 736
}
}
...
$ pyang test.yang
test.yang:736: error: unterminated statement definition for keyword "pattern", looking at *
If on the other hand the pattern statement is wrapped there is no error:
pattern '(/.*/i?)';
Would it be possible to update the serializer to always wrap the patterns? This is actually an internal design rule we have defined.
Hello,
When creating a Yang module programatically including pattern statements, some of them gets serialized with wrapping single quotes, and some don't. This is fine most of the time, but for the following particular pattern string pyang validation fails:
If on the other hand the pattern statement is wrapped there is no error:
pattern '(/.*/i?)';
Would it be possible to update the serializer to always wrap the patterns? This is actually an internal design rule we have defined.
Thanks, Andreas