Andy Bierman <a...@yumaworks.com> writes: > Hi, > > I entered a new 6087bis issue: > https://github.com/netmod-wg/rfc6087bis/issues/27 > > I agree the conventions need to be spelled out. > IMO there are many problematic examples in 6020bis. > The convention "..." is used and some newbie could think > it was some valid YANG syntax. There are also example > modules that use prefixes although no prefix-stmt or import-stmt > is shown to match up the prefix. > > This is a bigger problem than automated tools extracting modules. > People learn from examples (more than we would like) so it needs > to be clear in every YANG draft whether a YANG example > is complete vs. trimmed for readability and not meant to be compiled. > > Let's not use 'example' as a hack to indicate 1 or the other. > Compiler writers want deterministic syntax, not ad-hoc conventions. > > There are 3 scenarios: > > 1) normative: has <CODE BEGINS> and complete YANG module > > > 2) example: no <CODE BEGINS> but complete YANG module, > intended to be compiled > > 3) snippet: no <CODE BEGINS> and not complete, not intended to be compiled > > > So we cannot tell the difference between (2) and (3).
I think the "example-" prefix could be such a discriminator, to be used at I-D author's discretion. It's better than nothing. Lada > > IMO we should have <EXAMPLE BEGINS> for (2) so it can be > extracted automatically and distinguished from (3). > > > Andy > > > On Wed, Feb 3, 2016 at 1:38 PM, Mahesh Jethanandani <mjethanand...@gmail.com >> wrote: > >> >> On Feb 3, 2016, at 2:49 AM, Juergen Schoenwaelder < >> j.schoenwael...@jacobs-university.de> wrote: >> >> On Wed, Feb 03, 2016 at 11:19:33AM +0100, Benoit Claise wrote: >> >> module foomod { >> >> namespace"http://example.com/foomod"; >> >> prefix "foo"; >> >> container top { >> leaf foo { >> type uint8; >> } >> } >> } >> >> Use "example-" in the module name, as mentioned >> inhttps://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-05: >> >> Example modules are non-normative, and SHOULD be named with the >> prefix "example-". >> >> Same remark for module barmod (and btw, pay attention to the "import >> foomod") and module exmod >> >> >> I still believe the text in draft-ietf-netmod-rfc6087bis-05 needs >> fixing to distinguish between examples that should be subject to >> validation and examples that are just there for documentation purposes >> and which are typically designed to be incomplete in order to aid the >> reader. >> >> >> I agree. Currently there is no way to distinguish between models that are >> examples, meant to be extracted and validated, and what I call snippets of >> an example that are designed to incomplete and for demonstrating a point. >> >> Should there be a stipulation in 6087bis that incomplete examples should >> NOT use the prefix example-? >> >> >> /js >> >> -- >> Juergen Schoenwaelder Jacobs University Bremen gGmbH >> Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany >> Fax: +49 421 200 3103 <http://www.jacobs-university.de/> >> >> _______________________________________________ >> netmod mailing list >> netmod@ietf.org >> https://www.ietf.org/mailman/listinfo/netmod >> >> >> Mahesh Jethanandani >> mjethanand...@gmail.com >> >> >> >> >> >> >> _______________________________________________ >> netmod mailing list >> netmod@ietf.org >> https://www.ietf.org/mailman/listinfo/netmod >> >> > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod