Subject: [netmod] if-feature in state

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 13 Nov 2014 18:19:22 -1000

Hi,

the way in which if-feature was used in state data of the routing model always had this form:

container X {
  if-feature foo;
  list Y { … }
}

A server that doesn’t implement feature foo will simply not populate the list (there are no min-elements), and then it is allowed to remove the empty container X. So it seems to me that the if-feature doesn’t help in any way.

Lada
 
--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 14 Nov 2014 05:23:02 +0100 (CET)

Ladislav Lhotka <[email-masked]> wrote:
> A server that doesn’t implement feature foo will simply not populate the list
> (there are no min-elements), and then it is allowed to remove the empty
> container X. So it seems to me that the if-feature doesn’t help in any way.

I think it does:

  o  it makes the intention of the model clear for the reader.

  o  it helps an implementor understand what is supposed to be
     implemented. 

  o  it helps the client to understand what to expect from a server.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 13 Nov 2014 18:35:48 -1000

>  o  it helps an implementor understand what is supposed to be

These two points are already conveyed by having a feature in configuration.

>  o  it helps the client to understand what to expect from a server.

Even for a server supporting feature foo the list can be empty, and it can get non-empty only because of configuration, which is conditional wrt feature foo.

The problem really was that with the addition of recursive next-hop-lists we would need to define yet another feature to make them conditional. I am not sure that having many features makes the model clearer.

Lada