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

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Thu, 27 May 2021 15:00 UTC

Return-Path: <jason.sterne@nokia.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 22F353A11AB for <netconf@ietfa.amsl.com>; Thu, 27 May 2021 08:00:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-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=nokia.onmicrosoft.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 DvkyX3aCEAMb for <netconf@ietfa.amsl.com>; Thu, 27 May 2021 08:00:26 -0700 (PDT)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2096.outbound.protection.outlook.com [40.107.92.96]) (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 9FFD93A11CB for <netconf@ietf.org>; Thu, 27 May 2021 08:00:26 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j0Cd88N1E1UCPjT0rnObn1MLQUCbatPRwFOqZLFUhnn6/VRcc5l6rRVlqwItsL3S69Hk7GQxRKBxY8i17TTo7saweFnWbC7a57UPGW/hIZJQdUF55YJcXJdQG80AXBfyCzRamKZ3vacFuXHgOkRD+1SwThw2ilVguWnEmv8HjW/MI/W9ix1lUMCGcqCgORj4o7mn+5PX0ESu3CKYjPs6o8P+smwl36SAnoQr+B7FSb4Va3hztYbVrPQXwDcNwlqzlVOrcMNZzPYZS0JEZV7ztnJS0Zw63v9tdIa+FnDmbbDWAC6GHjM+PdCzCCYeT5FikgcGIqLFsH25cJ6zk/dV3g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M5UtMBa5fsPJDfHnvnz/5uvqKx9eaBrkqHkOdLgEW7Q=; b=dxomwUJJ/uwKAy02q085a6ikIZ2JGR6tFvgs+yrq2KcFkmSiab2g33WpLuGsEXbGxm6ydk74tAiEw0wuRSe62OWY/5Y9GieAaMJksX8sHcaz6KskK789epSAGuBZILqs4FrwjGpZxQ3fvIgYHzKEjm/LXrrxS97IU718U2tvppMqYOffBhfLgoQG6QMfVDL2O3SFU7HLVxYfMrX2S9mfo6+w7gamC1nfpkEUPycFGFv/XDn7yhp2ftE7fXFlrgWgqBtgHutOo0zoMH0vHV9PBKJ0zI05sNET30YogsX8wwQui1Bx6Y38ToMAeRMi4SsFRrhohaMxkogPalwQv17USw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M5UtMBa5fsPJDfHnvnz/5uvqKx9eaBrkqHkOdLgEW7Q=; b=yKRUF5cjwKMQ3lIN+xCr0Fo1g9HyNgCuFAFzc8biSMNDSYoTJnab3P+r31SLMQsREGZGQS92418ISQ60Ub8OOzr1IE4iJlZgNfWumf1eyuOUyYpsCmOFNjr5tR7x7MSq3h5yUNBJGbsU7gbQLZ1wKIcvqmpyzQYMdn7VJTT0vcQ=
Received: from DM6PR08MB5084.namprd08.prod.outlook.com (2603:10b6:5:41::29) by DM6PR08MB4090.namprd08.prod.outlook.com (2603:10b6:5:85::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Thu, 27 May 2021 15:00:01 +0000
Received: from DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::616e:7de0:be27:e9b1]) by DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::616e:7de0:be27:e9b1%3]) with mapi id 15.20.4129.037; Thu, 27 May 2021 15:00:01 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Jernej Tuljak <jernej.tuljak@mg-soft.si>, Ladislav Lhotka <ladislav.lhotka@nic.cz>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] YANG Library 1.1: a deviation module may exist without a module entry?
Thread-Index: AQHXRw/eIXpIB3GlaUyMmeqZzkpTW6rfugkAgAHSx5CAAQTa/4AU8LGA
Date: Thu, 27 May 2021 15:00:00 +0000
Message-ID: <DM6PR08MB5084EA140F21ABD5107BBB689B239@DM6PR08MB5084.namprd08.prod.outlook.com>
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> <9b051624-c45e-0929-3b74-4549319301dd@mg-soft.si>
In-Reply-To: <9b051624-c45e-0929-3b74-4549319301dd@mg-soft.si>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: mg-soft.si; dkim=none (message not signed) header.d=none;mg-soft.si; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [23.233.24.194]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 44f109cb-5171-4a8c-febf-08d921201a24
x-ms-traffictypediagnostic: DM6PR08MB4090:
x-microsoft-antispam-prvs: <DM6PR08MB4090372521F4C9A078E430529B239@DM6PR08MB4090.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 2rzha8Pdz3LUnXlElW1bC4616JBG9USrInOLWjLT0TnFArdh+Q3Vmqc4gBXx8JczP0HX/x93i9KPvkRlulUkCUwuKPKhsumeRdmta58hK7oQWeqGAwMk6vkCyTfdXN6OKyhfVJsi2ZXPolYmz8t6rjgIezF13GkEXg26EYCjOYEIdC5IK3Xvrmz8V11ur7/DUCdzCOIi05wtjU+bLFTMSwYnk8ItecFMmmmrr7BSEDAvzfF6UL6ka8Cna6iEj+D/jJMwZXAqY7w9YXzeCLirt7QKxXcucTkzFDuivm+SNRVLApCh7J4JtZif3j4C+Zdx+wZq3ag0UbmjjqsYRsupZ+2LzPAuoEQN5r+LOnQXEzYs42uaYl7JoakVNK/poDSbbooLiw3o0LR68xqs0dDQdi6LTINj2p5wkzeLLh+mUpg0bYUU2uLhDmZd7vXZZkC9VWMqkXvRWiMNqTFfMVLRUWS31bvflVBgyNv6oio08Ql9hlTZWDbGRfx4iGgfK/q/qDUQvaiAjPi8mil62EL9h4T3rgN9BY1ra1nIoePsUKbi2Nrpu2tePakGX+MEqBOwpvLYdhVAF7mKHAB1+W0UkjYeOyKAWtTXpRvMFkR/rew6nZ8iAd7WQGEbJiOnL9Lzbv43ixs9fbJ8zD+ftrTk9dvvXKzeHOlPAhsKYFwQoby2Wo2f2rTpowUKYZ5ez4Bw+AyIWacQ+/X8I4Sr1W7MUhcpiYRnYNsfRtvRfCmUHSs=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR08MB5084.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(396003)(376002)(39850400004)(136003)(8936002)(966005)(5660300002)(83380400001)(55016002)(71200400001)(8676002)(2906002)(7696005)(66556008)(86362001)(33656002)(53546011)(66946007)(478600001)(66446008)(64756008)(316002)(9686003)(52536014)(26005)(186003)(122000001)(66476007)(110136005)(6506007)(76116006)(38100700002); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: =?utf-8?B?emIvUkw0QVF0QldYbmdrb0VYb3I5Y0laYjhpL0xGQzRDNnNJUWJmc2JtM2RU?= =?utf-8?B?enU0cldoQ011SWpaKzcwY3pTRWFxNmhKai9mbzFXdk5Cak1leUxEeUdzUVl5?= =?utf-8?B?cjJNM29XZE1tdjFSMFhHS2FkZ3E3OFU2NzNKbFBsMk04R0R1azhhL3RrQUtU?= =?utf-8?B?WWVOelFyRnIwUWVEMmMyRTdGb1lUbUQ0dXhjZy9PNUpjd0pPMFJOSjlGQWM4?= =?utf-8?B?V2JkMmJCdnFKcERLSWRZZXBhdXhDT0NJZ3RIbVprdFpZcmdhUHRYWnFEVGNu?= =?utf-8?B?dFNTNkVaczk5MFFpUERVblpHNGZXT3Rjak1obC8rd3dxVHM5all6NVN4aldQ?= =?utf-8?B?WVpLM1lmMUZHZGVsNDRoVUNRcHFzeXlCcWY5amlDcWtvUGhtVUdvVmJLSnJJ?= =?utf-8?B?Rk1SNWwyVUNFRXlZMVdCK2tHNzFMR1puVmxHVDllc1JYRCt4T2MvY2pNdmJn?= =?utf-8?B?TUJweDJTcXV4TG82RWNhelJ3Ry9JeEdHVnlrc2c2UnY5Q0VWQVk1NjZCUmhY?= =?utf-8?B?bzhDU1QyWWxjYmZDMGZ3UGdBU1FwNEN1NWlPY25nUnFmSEZmUlE4OFhvZEJG?= =?utf-8?B?OU50cHE0aVFvZ1o4a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5TNmxuRy9HRUlNSHNMNkFlSS9FUEt2Y0t0bzNIZFpCMUZZbGVUM1Bp?= =?utf-8?B?WTdibXZVeG4yaSt5bjNIRFNsRjR5bS9HRC8zTGdyaHQrZGdHZXlNQ1NnY0pG?= =?utf-8?B?NlFzeTZNMjh5QldyZmg5c0R1VExhN1RITW9qaGR6VSs3a1U1Mzh3cjJaSVVZ?= =?utf-8?B?TlQyUlh3TEdsWGZpSHR4NVRxQXg4WklrSmlSRlk4WWVaN0JxRlpaWmN3eUY4?= =?utf-8?Q?eYbvnNI2wtvE8FfUKno+ULPqUsphqB/dytXf7r6?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR08MB5084.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 44f109cb-5171-4a8c-febf-08d921201a24
X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2021 15:00:01.0009 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: AffbmB9VH9bJihyHae1jV3buvVIkEzWWN21SecRqpUT+5Hq6ds4HDpl0qpnD6M/5VoUWbQFUmiRcgWdzF6OPaw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB4090
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/FOgt_qE8hV6-ijHe8nLJtiBZwFk>
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, 27 May 2021 15:00:31 -0000

Hi Jernej,

You may have identified a problem with Library 1.1 but I'm not certain. Does anybody know if it was intended to prevent deviations from being in a different module-set than the modules being deviated ?  I'm doubtful that was the intention (given the text you mention below where a module-set is allowed to be referentially incomplete on its own).

Jason

> -----Original Message-----
> From: netconf <netconf-bounces@ietf.org> On Behalf Of Jernej Tuljak
> Sent: Friday, May 14, 2021 3:08 AM
> To: Ladislav Lhotka <ladislav.lhotka@nic.cz>cz>; netconf@ietf.org
> Subject: Re: [netconf] YANG Library 1.1: a deviation module may exist
> without a module entry?
> 
> On 13/05/2021 18:04, Ladislav Lhotka 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/
> 
> Perhaps this was an attempt to ensure the order of applying deviation
> modules to the target module, which may be relevant in some cases (that
> are bad practice and should be avoided anyway).
> 
> We encountered a couple of implementations that do the opposite of what
> you (Ladislav) pointed out in that archive thread - they only list
> deviation modules in the "leaf-list"...
> 
> Another potential caveat: because of the way the "path" expression for
> this "leafref" is defined ("../../module/name" as opposed to
> "../../../module-set/module/name"), you cannot put a module that
> contains deviations in one module-set as an implementation module and
> reference it in another module-set via this "leaf-list's" value.
> 
>    <yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
>      <module-set>
>        <name>deviations</name>
>        <module>
>          <name>foo-devs</name>
>          <namespace>urn:foo:devs</namespace>
>        </module>
>      </module-set>
>      <module-set>
>        <name>common</name>
>        <module>
>          <name>foo</name>
>          <namespace>urn:foo</namespace>
>          <deviation>foo-devs</deviation>
>        </module>
>      </module-set>
>      // ...
>    </yang-library>
> 
> The above instance is not valid according to the model, which I think is
> fine, but may be confusing for some, especially if you consider
> "referential completeness"  of "imports", which only need to become
> complete once woven into a schema list entry, as stated in several
> "description" texts.
> 
> Jernej
> 
> >
> > 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
> >>
> 
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf