Subject: [netmod] default value depending one some other parameter?

From: Gerhard Muenz <[email-masked]>
Date: Thu, 02 Jul 2009 21:03:46 +0200

Hi,

I assume that it is not possible to specify a default value for a leaf
which depends on the value or existence of another leaf/container?

My use-case: The usual default port for IPFIX is 4739, however it's 4740
if DTLS or TLS is used.

At the moment, I specify a default value of 4739, yet this is not what
the user expects if he configures transport layer security.

Regard,
Gerhard

---

From: Andy Bierman <[email-masked]>
Date: Thu, 02 Jul 2009 13:35:32 -0700

> the user expects if he configures transport layer security.

no -- you cannot use the default-stmt.
You need to put the details in the description-stmt.
The NETCONF <test-option> has different defaults
depending on the capabilities supported.
This sort of conditional default is too complicated for YANG 1.0.

> Gerhard

Andy