Re: [netconf] YANG Library 1.1: a deviation module may exist without a module entry?

Andy Bierman <andy@yumaworks.com> Thu, 13 May 2021 17:38 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 24F7A3A16EE for <netconf@ietfa.amsl.com>; Thu, 13 May 2021 10:38:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.886
X-Spam-Level:
X-Spam-Status: No, score=-1.886 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_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, 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 YaIPXmL_ULgx for <netconf@ietfa.amsl.com>; Thu, 13 May 2021 10:38:36 -0700 (PDT)
Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 02B5E3A16ED for <netconf@ietf.org>; Thu, 13 May 2021 10:38:35 -0700 (PDT)
Received: by mail-lf1-x132.google.com with SMTP id i9so33056228lfe.13 for <netconf@ietf.org>; Thu, 13 May 2021 10:38:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KGEkraCcQSKtrcmGLco17n+xz9fhSolWySs3y3uugF0=; b=tZqwXZia9GlF/py7k9WidfQzRp9b0zGtC+3sMMxPpBWTxQetucFdYIsg9B/PozMEQw LEpUV92djOqaU3uKOfPY57v2JHJPx8YnLW5qCssnotpTiLZJSDS2zF1ub6BOYzgNXzPO /2OoyxNAQ87DHkYw2OF/qpZo9Ibm8Rx6Ce6pC2H73A58SSN0dx3ykw8nR1q4r8l2qsb1 ogXJ8iHUkD31kN7EmLZd2wjfLqpRrUvJcO5aUt92SQIxswuo6Jri+SBqSfv93NrWfyk+ z0YBjhCAT31RUokVpj7fnjbMySdAcf8CB1zhIMrUXzhhGh/sZc0UhBD+0AaClwdNo6rY aErw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KGEkraCcQSKtrcmGLco17n+xz9fhSolWySs3y3uugF0=; b=EmomzzdWI54Gx20mGOXjHfQnzWzcZ7PLUW16PwQTLh+H3uf7Z7Ij/G/KwIOx9Qh5VV pSN/Pp2T07ANH2gIRTN0Pg8w/qGNMCFbr1EyAZHs9Mdy26vnRblUlGZpmGITcWM3iHLX aVg6qM2Hc4ncAg5OwrQJ0D2Sw4Y8fA7UIPBFwMb3Vp8zn1DIIx4P8WKKwKwRnR1Ua4qD M5igg+6CsGSATk4/2NxFJ7kWSigDZGVFCR0AkP/yPxIMOA8PQQqz8dL8Us4Sc7UyFvuj vN+38CVg/rt102qkDzDP4Qr8fDL+U/IeJ9jqYLxC81+9xTGTyNdDOVOM2AEguoQ3QCBs ntlg==
X-Gm-Message-State: AOAM533Rl+DmxiWnVARxOcGV7ee4M9zXKdPCm3/Fx7cRQl0Y7+FjP2Sc AeUOOac4TFLBVAQdQ8tvWVt8/YYQ/jg/ZxtJeSVoxw==
X-Google-Smtp-Source: ABdhPJxmtSNyg9YjFVekZ+2BvQ8kulZmWJt1Eif/EX8QuD7mucWj5V55ePjPpQMll+G6NkwovSh8ulRSuFW4Y7SAFH0=
X-Received: by 2002:a19:3f93:: with SMTP id m141mr18477442lfa.553.1620927512687; Thu, 13 May 2021 10:38:32 -0700 (PDT)
MIME-Version: 1.0
References: <6b520a21-02a7-a41e-caac-fe8dc38a1a9d@mg-soft.si> <f991c985-cc39-3605-34b6-831094ef6e0a@mg-soft.si> <DM6PR08MB50849E201FA7E795438174249B519@DM6PR08MB5084.namprd08.prod.outlook.com> <c93c5998-4223-bccf-1f1f-22ecc2e200ad@nic.cz>
In-Reply-To: <c93c5998-4223-bccf-1f1f-22ecc2e200ad@nic.cz>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 13 May 2021 10:38:21 -0700
Message-ID: <CABCOCHT2qdSDNuuPSN71b4Z5K71Y2H=y1v3DzoDR8YXAdFS5NA@mail.gmail.com>
To: Ladislav Lhotka <ladislav.lhotka@nic.cz>
Cc: Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000099ce3b05c23998d4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/hPTtIe-33vQ5V-mQ1vym5n7BkN0>
Subject: Re: [netconf] YANG Library 1.1: a deviation module may exist without a module entry?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 May 2021 17:38:41 -0000

On Thu, May 13, 2021 at 9:04 AM Ladislav Lhotka <ladislav.lhotka@nic.cz>
wrote:

>
>
> On 13. 05. 21 17:39, Sterne, Jason (Nokia - CA/Ottawa) wrote:
> > The concept of "deviation module" is a bit odd IMO in RFC8525.
> >
> > Deviation statements can sit in any module and can be mixed in a module
> that declares other schema nodes (containers, lists, etc).
> >
> > Maybe it is a nice idea for authors to gather deviations into modules
> that contain nothing but deviation statements, but that would just be a
> convention of how to organize your modules. Nothing in the specs really
> requires that.
>
> Right, I never really understood why the "deviation" leaf-list was
> needed in the first place, given that it is completely redundant. It
> just creates ambiguous situations:
>
> https://mailarchive.ietf.org/arch/msg/netconf/BPVPQf-I9p-1C1K5NLmSsk0K_D8/
>
>
+1 (!)

The deviation list helps compilers know where to find the deviations for
the target module being compiled.
But they cannot really rely on it for many reasons.

I tried to get the WG to use a separate deviations module instead of
allowing
deviations for anything to be mixed in any regular module.
(But YANG is supposed to be easy for readers, almost easy for writers,
and almost impossible for tool makers ;-)

In reality vendors are struggling with the complex mix of overlapping
standards,
proprietary extensions, platform and version specific deviations, and
implementation-specific annotations.
But at least they do not mix deviations and regular statements in the same
module.

(One thing I never hear from customers:
"Please make YANG even more complicated.  We love a good challenge.")


Lada
>
>
Andy


> >
> > Jason
> >
> >> -----Original Message-----
> >> From: netconf <netconf-bounces@ietf.org> On Behalf Of Jernej Tuljak
> >> Sent: Wednesday, May 12, 2021 7:44 AM
> >> To: Netconf <netconf@ietf.org>
> >> Subject: Re: [netconf] YANG Library 1.1: a deviation module may exist
> >> without a module entry?
> >>
> >> Somehow it slipped my mind that require-instance defaults to true in
> >> YANG 1.1. Everything checks out.
> >>
> >> A server implementation that announces a deviation module in the
> >> "/yang-library/module-set/module/deviation" leaf-list, but lacks a
> >> corresponding entry in "/yang-library/module-set/module" list is
> >> non-RFC8525 compliant.
> >>
> >> Jernej
> >>
> >> On 12/05/2021 11:18, Jernej Tuljak wrote:
> >>> Hi,
> >>>
> >>> is there a particular reason for the deviation leaf-list in
> >>> ietf-yang-library@2019-01-04 not having require-instance true for its
> >>> leafref path, therefore allowing servers to report "incomplete" module
> >>> sets/schemas to the client?
> >>>
> >>>      grouping module-implementation-parameters {
> >>>        description
> >>>          "Parameters for describing the implementation of a module.";
> >>>        leaf-list feature {
> >>>          type yang:yang-identifier;
> >>>          description
> >>>            "List of all YANG feature names from this module that are
> >>>             supported by the server, regardless whether they are
> defined
> >>>             in the module or any included submodule.";
> >>>        }
> >>>        leaf-list deviation {
> >>>          type leafref {
> >>>            path "../../module/name";
> >>>          }
> >>>
> >>>          description
> >>>            "List of all YANG deviation modules used by this server to
> >>>             modify the conformance of the module associated with this
> >>>             entry.  Note that the same module can be used for
> deviations
> >>>             for multiple modules, so the same entry MAY appear within
> >>>             multiple 'module' entries.
> >>>
> >>>             This reference MUST NOT (directly or indirectly)
> >>>             refer to the module being deviated.
> >>>
> >>>             Robust clients may want to make sure that they handle a
> >>>             situation where a module deviates itself (directly or
> >>>             indirectly) gracefully.";
> >>>        }
> >>>      }
> >>>
> >>> Why are deviation modules allowed to exist without a module entry
> >>> within YANG Library instances? Why would a server choose to withhold
> >>> namespace information for a deviation module?
> >>>
> >>> Jernej
> >>>
> >>> _______________________________________________
> >>> netconf mailing list
> >>> netconf@ietf.org
> >>> https://www.ietf.org/mailman/listinfo/netconf
> >>
> >> _______________________________________________
> >> netconf mailing list
> >> netconf@ietf.org
> >> https://www.ietf.org/mailman/listinfo/netconf
> > _______________________________________________
> > netconf mailing list
> > netconf@ietf.org
> > https://www.ietf.org/mailman/listinfo/netconf
> >
>
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>