Robert Wilton <rwil...@cisco.com> wrote:
> 
> 
> On 23/04/2018 21:08, Martin Bjorklund wrote:
> > Andy Bierman <a...@yumaworks.com> wrote:
> >>> ....
> >>>> I do not understand the need for a yang-data structure that represents
> >>> data
> >>>> that can be instantiated anywhere and everywhere.
> >>> AFAIK noone is proposing that.
> >>>
> >>>> I do not want to break
> >>>> existing tools that expect sibling data nodes in the same module
> >>> namespace
> >>>> to
> >>>> be unique local-names.
> >>>>
> >>>> I would rather stick with the yang-data in RFC 8040 than introduce a
> >>>> new
> >>>> extension
> >>>> with no restrictions.  Standard YANG extensions should be
> >>>> interoperable
> >>> and
> >>>> have
> >>>> a clear purpose.
> >>> Of course.
> >>>
> >>>> If we do not need to define what a YANG extension does in
> >>>> a way that can be observed somehow, then it does not need to be a
> >>> standard.
> >>>
> >>> Agreed.
> >>>
> >>> Not sure how any of this helps with the original issue though.
> >>>
> >>>
> >> You proposed that duplicate nodes were OK:
> >>
> >> module X {
> >> prefix x;
> >>
> >> x:yang-data A {
> >>     list foo { ... }
> >> }
> >>
> >> x:yang-data B {
> >>    container foo { ... }
> >> }
> >>
> >> }
> >>
> >>
> >> I do not want to allow any duplicates.
> > Yes, I got that.
> >
> >> There are no encoding and parsing rules for instance data
> >> that support this sort of duplicate.
> > This is not correct, as I have demonstrated earlier, and I think you
> > also accepted; if different structures are defined for different rpcs'
> > error-infos, then these structures can have the same child node names.
> >
> > I think that we have to agree on the basics before disussing
> > solutions:
> >
> >    1)  Should we do anything at all?
> >
> >        (i.e., keep using yang-data in RFC 8040)
> There is also an option 1(b) which is to move the current yang-data
> definition on RFC 8040 into it's own document, just to fix the
> references issue.

Sure, but I don't think it is worth the effort.

> >    2)  Should we define structures that only can be used in
> >        standalone instance documents?
> >
> >        (i.e., *more* restrictive than yang-data in RFC 8040)
> I don't think that we should define something more restrictive that
> yang-data in RFC 8040.

I agree.

> >    3)  Should we define structures that can be used in standalone
> >        instance documents, error-info contents, and other places that
> >        we might not know right now?
> >
> >        (i.e., *less* restrictive than yang-data in RFC 8040)
> I don't know about this one because I'm not sure that I understand the
> problem space well enough.
> 
> For some of the categories above would a choice statement + groupings
> works just as well as a yang-data extension?

Not sure what you mean, but before we had yang-data in 8040, people
used something like this:

  module my-module {
    ....
    container foo {
      description
        "This is not really a real data node that is supposed to be
         instantiated in any datastore.  Instead it is supposed to be
         the top-level node in an instance document that
         describes...";
    }
  }

By this is really a mis-use of YANG statements.  Wrapping it in an
extension solves that problem.
    
> A different thought, one that has probably been considered before:
>  - Could all yang data definitions be defined using groupings
> instead.  I.e. a grouping without any associated uses statements.
>  - Perhaps an extra statement under the grouping could be used to
> indicate whether the grouping represents a yang data definition.

Nodes in a grouping do not belong to any namespace.  Forcing such a
namespace binding with a substatement to "grouping" feels worse than
having a YANG extension with the nodes defined (which of course can be
done with "uses").


/martin


> 
> Thanks,
> Rob
> 
> 
> >
> >
> > Since the current draft says:
> >
> >     The "yang-data" extension statement from RFC
> >     8040 [RFC8040] is defined for this purpose, however it is limited in
> >     its functionality.
> >
> >     The intended use of the "yang-data" extension is to model all or part
> >     of a protocol message, such as the "errors" definition in ietf-
> >     restconf.yang [RFC8040], or the contents of a file.  However,
> >     protocols are often layered such that the header or payload portions
> >     of the message can be extended by external documents.  The YANG
> >     statements that model a protocol need to support this extensibility
> >     that is already found in that protocol.
> >
> >
> > I thought we are doing (3).
> >
> >
> >
> > /martin
> >
> >
> >
> >> yang-data definitions define conceptual data nodes (e.g, /x:foo)
> >> Only one data-def-stmt (in yang-data or otherwise) can define a data
> >> node
> >> /x:foo.
> >> The descriptive names for the yang-data (A or B) do not define
> >> namespaces.
> >>
> >>
> >>
> >>> /martin
> >>>
> >>>
> >> Andy
> > _______________________________________________
> > 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

Reply via email to