Subject: [netmod] Is necessary to express mutual exclusion of features?

From: chong feng <[email-masked]>
Date: Tue, 8 Apr 2014 23:54:20 +0800

Hi all,
      Sometimes a feature and other features are mutually exclusive.For
example,
if feature A is on, feature B must be off. Is necessary to express this
relation?
If not, when a node with if-feature A and if-feature B,this node will never
take effect.

So, I suggest add 'exclude' sub statement to feature statement. This sub
statement is optional, and can have one or more instances.

For example:
feature foo1 {
     exclude foo2;
     exclude foo3;
}

if a node definition is below:

leaf fooleaf {
      if-feature foo1;
      if-feature foo2;
}

This definition would be considered illegal.

---

From: Andy Bierman <[email-masked]>
Date: Tue, 8 Apr 2014 09:34:31 -0700

On Tue, Apr 8, 2014 at 8:54 AM, chong feng <[email-masked]> wrote:

> If not, when a node with if-feature A and if-feature B,this node will
> never take effect.
>

IMO the "if-feature" based conformance model is getting too complicated.
The combined description-stmts of all the feature-stmts represent some
sort of conformance model definition.  A complex data model that attempts
to represent a complex conformance model as a base model + some
purely optional features will be a mess to use and understand, but that
is how YANG works.

All this hard-wired boolean conformance really makes future re-use
difficult.
New use-cases are likely to cause previous hard-wired feature logic to
be obsolete, and prevent re-use.

The conformance rules say that if-feature-stmts cannot be added or changed
in an existing statement:

   o  An "if-feature" statement may be removed, provided its node is not
      mandatory (Section 3.1).

IMO the SMIv2 conformance model is significantly better than the YANG
conformance
model.  It is really useful to define conformance separate from the
in-line data definitions.  The use-case and external reuse requirements can
change
independently of the data syntax and semantics.

Andy

For example:
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>
>