Christian Hopps <[email protected]> wrote: > > > > On Oct 16, 2018, at 7:39 PM, Andy Bierman <[email protected]> wrote: > > > > > > > > On Tue, Oct 16, 2018 at 3:15 PM, Christian Hopps <[email protected]> wrote: > > > > Andy Bierman <[email protected]> writes: > > > > This draft needs to define the module-tag encoding wrt/ > > - valid characters (e.g., some subset of UTF-8) > > - min/max length (e.g., implementation MUST support at least 64 chars > > and can support larger) > > > > I'm looking for suggestions on how to do this subset. We had intended to > > allow for as wide as possible content; however, I think disallowing tabs, > > newlines, carriage returns is more than reasonable. Has a type like this > > already been standardized or is there an example available somewhere? > > > > I suppose yang-identifier type is too restrictive so I will agree that > > restricting whitespace and colon chars > > is probably good enough > > > I'm going to use: > > typedef tag { > type string { > pattern '[a-zA-Z_][a-zA-Z0-9\-_]*:[\S ]+';
Ok. Note that the legal characters in "string" are different in YANG version 1 and 1.1, so this is a good reason (theoretical perhaps) to use 1.1. I do think that this module should be 1.1. A number of fixes were done in 1.1, and unless there are strong reasons not to use 1.1, you should use it. The string type is one example, and the effect on the size of <hello> in NETCONF is another. /martin > length "1..max"; > } > description > "A tag value is composed of a standard prefix followed > by any string value that does not include carriage return, > form-feed, newline or tab characters." > } > > I left in space -- lot's of people in the non-unix world use spaces. > > Thanks, > Chris. > _______________________________________________ > netmod mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/netmod > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
