Re: [netmod] [Anima] mcr's YANG question raised during the ANIMA WG session

Michael Richardson <mcr@sandelman.ca> Thu, 04 August 2022 23:01 UTC

Return-Path: <mcr@sandelman.ca>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 57854C147930; Thu, 4 Aug 2022 16:01:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.708
X-Spam-Level:
X-Spam-Status: No, score=-6.708 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=sandelman.ca
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DNMZEz_8pSDc; Thu, 4 Aug 2022 16:01:13 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 94115C14F6EC; Thu, 4 Aug 2022 16:01:11 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id E1DF3389A8; Thu, 4 Aug 2022 19:20:00 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FD6ExyMiCB4E; Thu, 4 Aug 2022 19:20:00 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [209.87.249.21]) by tuna.sandelman.ca (Postfix) with ESMTP id 3EBD0389A7; Thu, 4 Aug 2022 19:20:00 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1659655200; bh=8J6bgkB8ZYkhHinTomOPC5PszHpGBE1SI0iAeGAH6HI=; h=From:To:Subject:In-Reply-To:References:Date:From; b=LUsn96nOjSelLaeyT6oze/7y0wJpSvISWsDHZT3lce05f71hFMOO15Ut0NSDPg6+p Yi4hqJ4Dv5+LJvdpbPh/8KdmUszcv/9o9LhamuAU1ck9nELg85+IdJtZ6NDfjEwSfQ dvjMOjefYJns6murMgW1JSHk+r5t+J1B08yZ/vj+/eslfqZdwKBg66WQ9pQmVuV1d6 WOhrDeZSzgWvfHrf50Gbx5fH95+M7xb+fc/3Bv2IQXGdm3A2WXJ7c7JB3gJKfmjihP hvq9T4fcI6gdgv1x2m6g5uPmpLaByw1tsPWrxx/l7e2hGcxgq4fk4Mbiga32jWoGci an6SB6eywLSzQ==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 0AC191AB; Thu, 4 Aug 2022 19:01:10 -0400 (EDT)
From: Michael Richardson <mcr@sandelman.ca>
To: Jan Lindblad <janl@tail-f.com>, "Anima@ietf.org" <anima@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <58217DD1-D5C2-4C99-BDF9-5BA5B252AE56@tail-f.com>
References: <DU0PR10MB5196F26C92DD2F266A4FAC28F3949@DU0PR10MB5196.EURPRD10.PROD.OUTLOOK.COM> <365823.1658933390@dooku> <DU0PR10MB5196ADB3702B7417B0589555F3979@DU0PR10MB5196.EURPRD10.PROD.OUTLOOK.COM> <446675.1659033968@dooku> <DU0PR10MB51966008D0EA49AC6FCD3FB9F3999@DU0PR10MB5196.EURPRD10.PROD.OUTLOOK.COM> <539974.1659103385@dooku> <YuhrI/iINFJxPOC7@faui48e.informatik.uni-erlangen.de> <32336.1659550668@localhost> <58217DD1-D5C2-4C99-BDF9-5BA5B252AE56@tail-f.com>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 27.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k --------
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <21549.1659654070.1@localhost>
Date: Thu, 04 Aug 2022 19:01:10 -0400
Message-ID: <21550.1659654070@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/51lUGw4X91xrkh8FTGhNUQa-6gA>
Subject: Re: [netmod] [Anima] mcr's YANG question raised during the ANIMA WG session
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Aug 2022 23:01:17 -0000

Thank you for very much for the reply.

Jan Lindblad <janl@tail-f.com> wrote:
    > I had a look at your test example. The example is invalid, but pyang
    > fails to detect the error and overwrites some internal structures, with
    > the result below. The root cause of the problem is this:

...

    > Each one of the two uses statement brings in a "container voucher"
    > (with partly different content) at this point in the schema. That is an
    > attempt at a duplicate definition of voucher, which is an error.

okay, so it partly works, which is an error, and I'll see if I can make that
into a test case for pyang.

BUT:
   The goal is exactly to be able to combine two extensions to RFC8366 into a
   new module that has both extensions.  Is there another way to do this?

Puting them into two containers does not accomplish the goal, because now you
have two expires-on, ...

    > Pyang
    > misses this, and overwrites one voucher object with the next, losing
    > some of the content.

    > By placing the two uses statements into separate containers, pyang is
    > able to successfully make a tree:

...

    > Normally in YANG, it wouldn't be hard to to let modules "B" and "C"
    > augment module "A" independently. But here you are working with
    > groupings in such a way that both "B" and "C" build up a complete
    > grouping with everything in "A". When "D" tries to use both "B" and
    > "C", there is inevitably unwanted duplication.

    > If instead, "B" and "C"
    > just defined their little contributions, "D" could import groupings
    > from "A", "B" and "C" and compose them as desired.

The reason I am asking this question now, and proposing this example now, is
so that if there is a better way to build "B" and "C" then we need to know
about that *now*

I see that you have proposed a different way, which I will attempt to work
through.  Fortunately, we still have time to fix some things.