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

Jan Lindblad <janl@tail-f.com> Thu, 17 August 2017 15:50 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 641E513219F for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:50:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 PfwlQAQLcTd0 for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:50:02 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 945F8132144 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 08:50:02 -0700 (PDT)
Received: from [10.147.40.126] (unknown [173.38.220.53]) by mail.tail-f.com (Postfix) with ESMTPSA id 63F301AE01AA; Thu, 17 Aug 2017 17:50:01 +0200 (CEST)
From: Jan Lindblad <janl@tail-f.com>
Message-Id: <36E052B8-9028-4EE6-A393-F68EA3EF926B@tail-f.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_04B3FB62-EBDA-432D-8864-E24DA6FA9D09"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Thu, 17 Aug 2017 17:49:58 +0200
In-Reply-To: <CABCOCHR9ooj7VQZhqAzJkAR=9vn4C0okTDKQJ842p-Qa_2YZDg@mail.gmail.com>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, Norm Strahle <nstrahle@juniper.net>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
To: Andy Bierman <andy@yumaworks.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> <3EA7384C-2D5D-4C00-8479-75277389DE5B@tail-f.com> <CABCOCHR9ooj7VQZhqAzJkAR=9vn4C0okTDKQJ842p-Qa_2YZDg@mail.gmail.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/cZ-oBtf0OWjRw3-rsq3mgPdHS0o>
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 15:50:05 -0000

> 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.
> 
> 
> Doesn't your client build a session-specific schema tree based on the advertised modules?
> 
> Deviations are clearly better than just not returning anything.
> They tell the client that the missing counters are not implemented as opposed
> to possibly a temporary, recoverable condition.
> 
> Deviations are known at session startup time but they can also be known in advance.
> Vendors use naming conventions to specify the platform-specific deviations.
> Tools like yangcatalog.org <http://yangcatalog.org/> can make this process automated and de-facto standardized.

NSO itself will be just fine, but I'm worried about the people building applications on top of NSO, e.g. an L3VPN application. Let's say a deviation comes up at session start, what's the application supposed to do then? I can't think of much that doesn't involve a programmer.

Declared deviations are clearly better than deviating and not telling. But they are only really worth anything if they are known to the application programmer before he finishes his code. Yangcatalog.org <http://yangcatalog.org/> helps, but not all modules will be there and there's also a time dimension. Deviations found at session start are probably not worth anything other than as triggers for that special code someone wrote to handle the situation.

I feel deviations should not be recommended lightly. In the particular case that started this discussion, they'd bring little value.

/jan