Re: [yang-doctors] question regarding conditional/optional statements

Jan Lindblad <janl@tail-f.com> Thu, 17 August 2017 12:40 UTC

Return-Path: <janl@tail-f.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3C1881323AC for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 05:40:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rPiCemPleeoB for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 05:40:56 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 6D9B1132391 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 05:40:56 -0700 (PDT)
Received: from [10.147.40.126] (unknown [173.38.220.53]) by mail.tail-f.com (Postfix) with ESMTPSA id 376431AE01AA; Thu, 17 Aug 2017 14:40:54 +0200 (CEST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Jan Lindblad <janl@tail-f.com>
In-Reply-To: <20170817120451.syz54lblctjitbm7@elstar.local>
Date: Thu, 17 Aug 2017 14:40:51 +0200
Cc: Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, Norm Strahle <nstrahle@juniper.net>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <3EA7384C-2D5D-4C00-8479-75277389DE5B@tail-f.com>
References: <BN1PR0201MB0833B05FB5307BDEF2E8E3F5C3820@BN1PR0201MB0833.namprd02.prod.outlook.com> <20170817050647.apfeuvfhfw23ws6n@elstar.local> <BCE95ECB-360D-46E0-B062-371931C0F46A@tail-f.com> <20170817083739.u4vfbtkm34vf5utw@elstar.local> <6991455A-91A6-42A6-86A6-F19A95BCD133@tail-f.com> <20170817120451.syz54lblctjitbm7@elstar.local>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/bXFUG6S0kB1S7yKmCkUJbFk0UY8>
Subject: Re: [yang-doctors] question regarding conditional/optional statements
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 17 Aug 2017 12:40:58 -0000

>> The problem with #4 is that many clients faithfully implementing applications based on the advertised, standard model will break. To fix the breakage requires after the fact programmer intervention. Not very software-defined. The long term effect is that application developers ignore standard models since custom adaptation to each device's implementation is required anyway, if deviations are used more than very occasionally.
> 
> I again fail to see the difference here between #4 and #5. Simple
> clients will fail in the same way. Option #4 allows smarter clients
> that are able to determine upfront that they won't work with a certain
> server.
> 
> Perhaps your logic is that a smarter client will still have to expect
> that a server is not entirely implementing a model (i.e., doing #5)
> with out documenting this, and hence since the smarter client has to
> expect some servers to be 'incomplete' anyway you can equally well
> expect all of them to be 'incomplete' and skip the effort to decide
> upfront whether a server implements a model 'complete enough' for the
> client to work.

I think we're mostly in agreement. In this case where we only talk about optional config false leafs, the client will have to cope with any/all of them being absent in any case. Bit masks, if-feature or deviation not-supoprted statements are not going to change that. In that case #5 is the leanest solution.

I don't look at client applications the same way as you do, however. You think a simple client is one that would fail if the YANG is randomly deviated, while a smarter one would cope. In my experience, it's the other way around. The really simple clients are just browsers that print whatever they get. They don't care if something is missing, or if a leaf is of a different type than stated in the standard YANG. It's the smart clients that actually understand and use the returned information for complex decisions that will fail when things deviate.

Have you ever seen a smart client that can cope with randomly deviated YANG models, unless a programmer has intervened and created special code for handing that particular deviating device type? I have not.

/jan