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

Andy Bierman <andy@yumaworks.com> Thu, 17 August 2017 16:06 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 0ED831321D0 for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 09:06: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 W0OVFrfWSdoB for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 09:06:20 -0700 (PDT)
Received: from mail-wr0-x22c.google.com (mail-wr0-x22c.google.com [IPv6:2a00:1450:400c:c0c::22c]) (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 D7718132144 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 09:06:19 -0700 (PDT)
Received: by mail-wr0-x22c.google.com with SMTP id b65so47973352wrd.0 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 09:06: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=/LSAVXQ06xqVgU4pUlS8OsqixvdlaDEKT7YCTcVTWqY=; b=Pknjx8L3G/bgR5g6uI4Hx2Z4C/FWNZei7d5j/xWZz8k7OrV0cXHsKU/v0tY1XoTPkL xCxJqlRfFvXmTqn2lCq1/LGPrwhQCdhPMwBF2oFiviSL3POSw1zvnNm4dLs8w/Hy7JY6 a4YgQqjsSLISHmkPnEUzG1rZIX/owUs4KOSqIUaMgsr7Gmo9uzbFx2YYlxRrcJXkCCNx QpcBkEp1RlNkWXQBPtUJOUhzABch7JdJWxu37pQR7fa/NJaMAlXeWFzL4Lech0eZs9wO fIF3G8TWy7odGiURWueJz9aSP3jNLu5KSm1N6LENPG0uM4sTudR9TYk1lJNGb+o7GmrT sXUA==
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=/LSAVXQ06xqVgU4pUlS8OsqixvdlaDEKT7YCTcVTWqY=; b=rAOGwfFV1UkolIMYeZ4mEEmCCU8oxKLEaGSicrnHptxIAbrMVlgLFl8sPoUaZcemRF QS4QT3RIfeH2PfjiJjygX34YpbHqPgJi+F7FgxJ654cwQiR5CfXuo8FKuX5R7Llj2NMn oGG+qI7RPKMrMY0d2EDRNbF3h3fc9SjLdH1mcvoKhlRpDafNfXdpwlQBOtlZIRdnDdJB jyMDiYlg5WOTue0jyoboC3SjqAMt1hyEhpinVKpcRiU5yZxeX+Em9/RudmToLjhY3Csw Bi0z25JrdN5n0KsptOYnXUhUQfFQvryxJctTA1q38M6SwuNzGVpyl7TOq27G9W9hAJ3x 6yXw==
X-Gm-Message-State: AHYfb5h2F95yAfD0wffStk2v/Pwq7SXAwefAl48RcLZc/zaNRzFB0M2D 3juyVx8jzh3DjDdjuinbaGcRlVhxHCE+
X-Received: by 10.28.159.133 with SMTP id i127mr1455561wme.172.1502985978383; Thu, 17 Aug 2017 09:06:18 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.164.129 with HTTP; Thu, 17 Aug 2017 09:06:17 -0700 (PDT)
In-Reply-To: <E180B2C6-3E5F-43A9-9A20-E7D056D2E23D@cisco.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> <36E052B8-9028-4EE6-A393-F68EA3EF926B@tail-f.com> <E180B2C6-3E5F-43A9-9A20-E7D056D2E23D@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 17 Aug 2017 09:06:17 -0700
Message-ID: <CABCOCHTVM-XCSsUsCKPnvzYNWj8+OWD5LJOhOSGfHx2k2XEHzw@mail.gmail.com>
To: "Giles Heron (giheron)" <giheron@cisco.com>
Cc: Jan Lindblad <janl@tail-f.com>, "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="001a114545fc5821760556f53142"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/zy8xTr-5UXvh6BqDd1Yinno37lU>
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 16:06:22 -0000

On Thu, Aug 17, 2017 at 8:56 AM, Giles Heron (giheron) <giheron@cisco.com>
wrote:

> On 17 Aug 2017, at 16:49, Jan Lindblad <janl@tail-f.com> wrote:
>
>
> 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.
>
>
> 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.
>
>
> right - isn’t deviation supposed to be for the case where you don’t
> support something that implementations are generally expected to support?
>
> for what Helen wants features seem to be a better fit - at least to me.
>
>
Features are intended to convey that the functionality is optional.
Presumably the data model is attempting to deliver some functionality to
the client developer.
Features correspond well to optional protocol capabilities.
Generally a single counter is not considered to be high-level functionality.

Ask the question "Why is counter FOO missing?"

A1) because device XYZ does not support it

A2) because it counts the FIZZBANG protocol, and that protocol is not used
on every device


If A1 then use deviations. If A2 then use features.




> Giles
>
>

Andy