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

Ladislav Lhotka <ladislav.lhotka@nic.cz> Thu, 13 May 2021 16:04 UTC

Return-Path: <ladislav.lhotka@nic.cz>
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 391D13A1313 for <netconf@ietfa.amsl.com>; Thu, 13 May 2021 09:04:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 5Pcx3X3euC3y for <netconf@ietfa.amsl.com>; Thu, 13 May 2021 09:04:34 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DD1D63A1311 for <netconf@ietf.org>; Thu, 13 May 2021 09:04:33 -0700 (PDT)
Received: from [IPv6:2001:1488:fffe:6:a88f:7eff:fed2:45f8] (unknown [IPv6:2001:1488:fffe:6:a88f:7eff:fed2:45f8]) by mail.nic.cz (Postfix) with ESMTPSA id B62C2140A61 for <netconf@ietf.org>; Thu, 13 May 2021 18:04:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1620921866; bh=f224aA0KGp8EItRKmmGnGsnfiqqAXs2lK0S9ddrFYPY=; h=To:From:Date; b=npDbK9mDBuWI5GUrvJMho4ERaAEURLSM6rEc1L2X1K0kYG0XdIPay+9u1QP8BZuIx Q14JBLOMP/I76fjRhK6Ti3v4mVAPe4DPhTYKtJ1NJWtZHyLYE0vEutaG8McPGUpgMp rOGbU9yKwEUlZsbppR518QCCw8ST+qH5X9KBCGQo=
To: netconf@ietf.org
References: <6b520a21-02a7-a41e-caac-fe8dc38a1a9d@mg-soft.si> <f991c985-cc39-3605-34b6-831094ef6e0a@mg-soft.si> <DM6PR08MB50849E201FA7E795438174249B519@DM6PR08MB5084.namprd08.prod.outlook.com>
From: Ladislav Lhotka <ladislav.lhotka@nic.cz>
Organization: CZ.NIC
Message-ID: <c93c5998-4223-bccf-1f1f-22ecc2e200ad@nic.cz>
Date: Thu, 13 May 2021 18:04:26 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1
MIME-Version: 1.0
In-Reply-To: <DM6PR08MB50849E201FA7E795438174249B519@DM6PR08MB5084.namprd08.prod.outlook.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.102.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/ndLZWL4wZd6yqYza3kfrh2TlcDM>
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 16:04:38 -0000


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/

Lada

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