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

Andy Bierman <andy@yumaworks.com> Thu, 17 August 2017 15:32 UTC

Return-Path: <andy@yumaworks.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 5D42F1321C8 for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:32:22 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
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 Yrksv3BO3-1Y for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:32:20 -0700 (PDT)
Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 91978132144 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 08:32:19 -0700 (PDT)
Received: by mail-wr0-x232.google.com with SMTP id y96so44135875wrc.1 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 08:32:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ln77OVG7/vwwoRLeovOPuW04s0hRnfS+Sl6Ri+hxYnE=; b=kxx5+7TUe8k2wnclnYK9ymbON8W8SIo9Feshrt/2w5i5PE6U5ChDXpw6Cbn10HdL+E iuE5orE3xiYfpaPgiu7vmiM1Catt9bi+qfJ/Wi1Gc/znG5Iws1lPhxe+KgEJxB0hxIS7 Plv2YiycrbRQgwp8haSf0BL/gy3iZS4CCmnpo4TytmmlKPGXqJS51w6bDsBLsmPP4/pF SfCrLJzztf26Kd1/0ndHlzrReZbTzoaJLj5gnZywoL7oN3jc3P64YK82pGsm97wDYQZu q30v0alPAs8bCkjWu6p3uvTTExI0FkOigZa7+wIAEmBwoBA2SjiM5ecgXJgrmytWUrwT RkYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ln77OVG7/vwwoRLeovOPuW04s0hRnfS+Sl6Ri+hxYnE=; b=Sk57MbwP0X3DcCHI0ObQ3yKrdp+El+eeDMq5fKhwU53IfjpOLjYUC6cMw3Ni6PDTnL xd2MrYowkNF7FnLh3OXY66k/+PEU5gJ/Mm1FHN7Av3ubxrgcfYyyZb7wiL3SjaLjtV/Y bdH+7vqUoo3EFQaX0/BbPk+8hRPYkB0bcgcrnLCwLw0JMzd2UlN+d9tQ6utYrqvPBL89 ASuUgXIeC2DlIJ0dRzhv0J/LEHw5PdURXLlTW6+HbUUZryZbbwFdZ0ck4BnozLArHMwH Z1gpj6+w/5Fb2npHB26p/oBdF6jiLWaChRHc56KqEXO1okdZSCsZc+ck7T4T4ytcjPM6 V1rQ==
X-Gm-Message-State: AHYfb5iLQt/Mo1PCNCxA4GckCkzkVGgjWGYc0ZFmPHQgSef4K/lLuUnA QJ/4m1FZUtKrZ/losPmETUgTF9RC5M/u
X-Received: by 10.28.105.150 with SMTP id z22mr1578386wmh.22.1502983938021; Thu, 17 Aug 2017 08:32:18 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.164.129 with HTTP; Thu, 17 Aug 2017 08:32:17 -0700 (PDT)
In-Reply-To: <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> <3EA7384C-2D5D-4C00-8479-75277389DE5B@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 17 Aug 2017 08:32:17 -0700
Message-ID: <CABCOCHR9ooj7VQZhqAzJkAR=9vn4C0okTDKQJ842p-Qa_2YZDg@mail.gmail.com>
To: Jan Lindblad <janl@tail-f.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>
Content-Type: multipart/alternative; boundary="001a11478686bab4430556f4b7a2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/hG1haT4piWq_y1vKYqpQzGpiRXI>
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:32:22 -0000

On Thu, Aug 17, 2017 at 5:40 AM, Jan Lindblad <janl@tail-f.com> wrote:

> >> 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.
>


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 can make this process automated and de-facto
standardized.




>
> /jan
>


Andy


>
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors
>