Dear List,

yanglint (version 0.16.105) does not validate the schema below when the
a default value is assigned to string that has a pattern. Is this the
specified behavior; and if so is there a workaround? (Comments not in
schema, added for emphasis)

    module tmp
    {
        namespace "example.com";
        prefix "foo";

        container bar {
            leaf wibble {
                type string {
                    pattern "^x$";
                }
                default "x";      ### NOT OKAY
            }

            leaf wobble {
                type string;
                default "y";     ### OKAY
            }
        }
    }


yanglint error message:

err : Value "x" does not satisfy the constraint "^x$" (range, length, or
pattern). (/tmp:wibble)
err : Module "tmp" parsing failed.


Regards,

- Olumide

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to