[YANG] default values

Ladislav Lhotka <lhotka@cesnet.cz> Wed, 16 January 2008 12:39 UTC

Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JF7Y4-00072b-Bc; Wed, 16 Jan 2008 07:39:16 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JF7Y3-00072R-2S for yang-confirm+ok@megatron.ietf.org; Wed, 16 Jan 2008 07:39:15 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JF7Y2-00072J-OS for yang@ietf.org; Wed, 16 Jan 2008 07:39:14 -0500
Received: from office2.cesnet.cz ([195.113.144.244]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JF7Y2-0000nd-C6 for yang@ietf.org; Wed, 16 Jan 2008 07:39:14 -0500
Received: from [172.29.2.201] (asus-gx.lhotka.cesnet.cz [195.113.161.161]) by office2.cesnet.cz (Postfix) with ESMTP id 1D5FFD800C8 for <yang@ietf.org>; Wed, 16 Jan 2008 13:39:13 +0100 (CET)
From: Ladislav Lhotka <lhotka@cesnet.cz>
To: yang@ietf.org
In-Reply-To: <20080116.123549.140000433.mbj@tail-f.com>
References: <1200478981.7029.27.camel@missotis> <20080116.123549.140000433.mbj@tail-f.com>
Content-Type: text/plain
Organization: CESNET
Date: Wed, 16 Jan 2008 13:39:13 +0100
Message-Id: <1200487153.7029.71.camel@missotis>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: e5ba305d0e64821bf3d8bc5d3bb07228
Subject: [YANG] default values
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org

> Yes, changing defaults is incompatible.  If you do that, you have to
> change the namespace.

BTW, that's exactly why I am against the default values in typedef: they
make the data model too specialised. The defaults could be easily
handled as follows:

1. The standard that defines the type specifies in plain RFC-English
that the default value MUST, SHOULD or MAY be something.

2. An implementor reflects this in a device, but is also required to
fill the default (or another) value in the initial startup
configuration.

3. The client needn't care about what the default is, it just queries
the device to see the actual value, changes it if necessary etc.

This approach would make the same data model reusable with other default
value and, in addition, allow for honouring the semantics of MUST,
SHOULD and MAY. The default in typedefs is only usable in the MUST case.

So my suggestion is to remove the default statement form YANG.

Lada


-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C



_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang