Xufeng Liu <[email protected]> wrote:
> 
> 
> > -----Original Message-----
> > From: Martin Bjorklund [mailto:[email protected]]
> > Sent: Friday, February 3, 2017 11:08 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)
> > 
> > Xufeng Liu <[email protected]> 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.
> > 
> > Aha, ok.  Yes, the path needs to refer to a valid schema node.  So the path 
> > would
> > be /nodes-state/node/attribute-a.
> > 
> [Xufeng] Right. If we do so, the approach will be different from
> RFC7223, and requires the capability that a "config true" leafref
> references a "config false" leaf.

You don't need any additional capability for this; if you tag the
leafref with "require-instance false", it can reference config false
(from config true).


/martin

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

Reply via email to