Juergen Schoenwaelder <[email protected]> wrote: > On Fri, Jan 08, 2016 at 12:52:37PM +0100, Martin Bjorklund wrote: > > Juergen Schoenwaelder <[email protected]> wrote: > > > On Thu, Jan 07, 2016 at 04:21:42PM +0100, Martin Bjorklund wrote: > > > > > > > > With YANG 1.1, a leafref can be marked as "require-instance false", > > > > which allows a interface-state-ref to be used in config: > > > > > > > > type if:interface-state-ref { > > > > require-instance false; > > > > } > > > > // + add description that explains what happens if there is no such > > > > // instance > > > > > > > > > > > > (NOTE: this doesn't work w/ pyang at the momement, I am working on a > > > > fix) > > > > > > > > > > And it would have to be if:interface-ref instead if:interface-state-ref > > > I think. > > > > No, I meant interface-state-ref. This way you can put a filter on > > non-configured interfaces. > > > > But with require-instance false, this is also true for > if:interface-ref.
Sure. > If I preconfigure and interface, I might also want > to preconfigure ACLs refering the preconfigure interface. But this is also ok for interface-state-ref with require-instance false. I prefer this, b/c then we can say that once the target leaf exists, the filter applies. > And note > that if:interface-state-ref refers to a config false leaf. Yes, this is ok w/ require-instance false. /martin _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
