On Fri, Feb 03, 2017 at 03:50:57PM +0000, Xufeng Liu wrote:
> Hi,
> 
> > -----Original Message-----
> > From: Martin Bjorklund [mailto:[email protected]]
> > Sent: Friday, February 3, 2017 10:32 AM
> > To: Xufeng Liu <[email protected]>
> > Cc: [email protected]; [email protected];
> > [email protected]
> > Subject: Re: [i2rs] Kathleen Moriarty's No Objection on 
> > draft-ietf-i2rs-yang-l3-
> > topology-08: (with COMMENT)
> > 
> > Hi,
> > 
> > 
> > Xufeng Liu <[email protected]> wrote:
> > > Hi Kent,
> > >
> > > > -----Original Message-----
> > > > From: Kent Watsen [mailto:[email protected]]
> > > > Sent: Thursday, February 2, 2017 8:39 PM
> > > > To: Xufeng Liu <[email protected]>
> > > > Cc: [email protected]; [email protected]
> > > > Subject: Re: [i2rs] Kathleen Moriarty's No Objection on
> > > > draft-ietf-i2rs-yang-l3-
> > > > topology-08: (with COMMENT)
> > > >
> > > > [reducing distribution]
> > > >
> > > >
> > > > Hi Xufeng,
> > > >
> > > > > Assume the following model:
> > > > >
> > > > > +--rw nodes
> > > > >   +--rw node [id]
> > > > >      +--rw id   string
> > > > >      +--rw under-lay-attribute-a ???
> > > > > +---ro nodes-state
> > > > >   +--ro node [id]
> > > > >      +--ro id   string
> > > > >      +--ro attribute-a string
> > > > >
> > > > > I cannot define the under-lay-attribute-a to reference attribute-a as:
> > > > >               type leafref {
> > > > >                 path "../node/attribute-a"'
> > > > >               }
> > > >
> > > >
> > > > True, but maybe it could be:
> > > >
> > > >    type leafref {
> > > >       path "../node/attribute-a"
> > > >       require-instance false;
> > > >       description
> > > >         "In the case when the referenced instance is not a configured
> > > >          object, the system may resolve it by looking for it under the
> > > >          /nodes-state node.  As the referenced operational state data
> > > >          may have a lifecycle independent of configuration, this results
> > > >          in an effect much like pre-provisioning interfaces in RFC 
> > > > 7223.";
> > > >    }
> > > [Xufeng] I think that "require-instance false" does not help here. The
> > > validation for path "../node/attribute-a" still fails because
> > > "attribute-a" does not exist under /nodes/node/.
> > 
> > No, "require-instance false" essentially turns off validation.  Section
> > 9.9.3 in RFC 7950 says:
> > 
> >    If "require-instance" is "false", it means that the instance being
> >    referred to MAY exist in valid data.
> > 
> [Xufeng] My understanding is that this section talks about instance "data" 
> validation, but I was talking about schema validation. The path statement is 
> pointing to a non-existing schema node. At least, pyang, yangdump, and 
> yangvalidator all fail on this currently.

Yes, the example is confusing. If the idea was that the path would be

../node/under-lay-attribute-a

then I find the description questionable since the leafref is
restricted to ../node/under-lay-attribute-a but the description says
go look elsewhere. Perhaps I need an even simpler 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/>

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

Reply via email to