Subject: [netmod] feature advertisement

From: Andy Bierman <[email-masked]>
Date: Sat, 23 May 2009 07:27:50 -0700

Hi,

Here is a corner-case for the feature capability
that I am trying to code right now:

module foo {

   feature A;

   feature B {
     if-feature A;
   }

   leaf X {
      if-feature B;
      mandatory true;
      type string;
   }
}

So what happens if the agent developer messes up
and just enables feature 'B', not features 'A' and 'B'?

Should the agent advertise feature 'B' for module 'foo'?
The manager can figure out that 'A' is not enabled, and
therefore leaf 'X' is not really mandatory.

Or should the agent only advertise a capability if all
of the nested if-features are also true?  It seems like
this is the intent, although either way works.

Perhaps some text (in 5.6.4 and/or 7.18.1) about this
issue is needed.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Sun, 24 May 2009 16:37:34 +0200 (CEST)

> therefore leaf 'X' is not really mandatory.

Since feature B is valid only if feature A is enabled, an agent that
advertises only feature B has a bug.  

> Perhaps some text (in 5.6.4 and/or 7.18.1) about this

Would this work (in 7.18.1):

  If a feature is dependent on another feature (i.e. the feature
  has a "if-feature" substatement), a device which implement the first
  feature MUST also implement the feature it depends on.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Sun, 24 May 2009 08:24:59 -0700

> advertises only feature B has a bug.  

OK -- let's make sure the text is clear about that

>   feature MUST also implement the feature it depends on.

How about:

    If a feature is dependent on any other features (i.e., the feature
    has one or more "if-feature" sub-statements), then all of features
    it depends on MUST also be implemented by the agent.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Sun, 24 May 2009 18:42:56 +0200 (CEST)

>     it depends on MUST also be implemented by the agent.

Ok, with s/agent/device since we use "device" in the surrounding text.

/martin

---

From: Phil Shafer <[email-masked]>
Date: Tue, 26 May 2009 09:57:19 -0400

>    it depends on MUST also be implemented by the agent.

Will the Postel Principle render this moot, since if you tell me
you support B and B requires A, I can reasonably assume that you
support A?  Sure, clean up the text, but any implementation should
still be Postelistic (Postelized?).

Thanks,
 Phil

---

From: Andy Bierman <[email-masked]>
Date: Tue, 26 May 2009 07:31:21 -0700

> still be Postelistic (Postelized?).

I think if the draft is clarified to force the agent to
only advertise B if A==true, then you can assume that
advertising B means that A is supported as well,
but the agent MUST still send both A and B in the feature list.

Is this text more clear:

       If a feature is dependent on any other features (i.e., the feature
       has one or more "if-feature" sub-statements), then all of features
       it depends on MUST also be implemented by the device, in order for
       the device to advertise the feature.

Andy