Ladislav Lhotka <[email protected]> writes:
> I think the "x" and "n" is only needed next to the name of
> rpc/action/notification. So my version would be:
>
> <flags> is one of:
> c for configuration data
> x for rpcs and actions
> n for notifications
>
> module: tree-sample
> +--c config-true-container
> | +--c param? string
> +--- config-false-container
> | +--- value? string
> +--c inline-action
> | +--x action
> | +--- input
> | | +--- in? string
> | +--- output
> | +--- out? string
> +--c inline-notification
> +--n notification
> +--- duration? string
Naively, it seems to me that "c" for configuration and "s" for state
makes a great deal of sense. ("cf" for state ("config=false") is
hazardous as "cf" is a natural contraction of "configuration".)
config/state is a somewhat messy distinction as the transition between
them can happen anywhere in the tree.
For RPCs, actions, and notifications, using a flag only for their top
nodes makes sense, because that makes it easy to find their top nodes,
and any node under them can only be assessed based on where it is
relative to the top node.
One thing that threw me the first time I saw it is marking lists with
"*". That doesn't match the generic use of "*", which is to mark the
thing that is repeated. (Compare using "?" to mark an optional thing,
which does match the generic usage.) But in the context of Yang, you
don't want to flag the items in the list with "*", that would make the
tree harder to read.
I support having a rigid and consistent standard for indentation and
where the descending lines are placed under the parent nodes --
consistency in formatting allows one to train one's eye to parse the
diagram reflexively rather than having to pause and mentally group the
items into a structure.
Dale
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod