Subject: [netmod] Combining if-feature statements

From: Robert Wilton <[email-masked]>
Date: Thu, 16 Mar 2017 10:04:56 +0000

YANG nodes can have multiple if-feature statements.  Its not entirely 
obvious to me how if-feature statements combine for a given node.  I 
presume that a node is supported if all if-feature statements on the 
node are valid.  Is this the correct interpretation?

I.e. in the example below, "things" container is only supported if both 
"do-things" and "do-more-things" features are enabled.

E.g.

module base-module {
   prefix bmod;

   feature do-things;
   feature do-more-things;

    container things {
     if-feature do-things;
     if-feature do-more-things;
  ...
   }
}

Thanks,
Rob

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 16 Mar 2017 11:09:07 +0100

On Thu, Mar 16, 2017 at 10:04:56AM +0000, Robert Wilton wrote:
> obvious to me how if-feature statements combine for a given node.  I presume
> that a node is supported if all if-feature statements on the node are valid.
> Is this the correct interpretation?

yes

/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/>

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 16 Mar 2017 11:09:35 +0100 (CET)

> node are valid.  Is this the correct interpretation?

Yes.

/martin

> 
> I.e. in the example below, "things" container is only supported if
> both "do-things" and "do-more-things" features are enabled.
> 
> E.g.
> 
> module base-module {
>   prefix bmod;
> 
>   feature do-things;
>   feature do-more-things;
> 
>    container things {
>     if-feature do-things;
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>