Re: [netmod] Fw: grouping when

tom petch <ietfc@btconnect.com> Thu, 31 December 2020 12:46 UTC

Return-Path: <ietfc@btconnect.com>
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 44E9F3A0B32 for <netmod@ietfa.amsl.com>; Thu, 31 Dec 2020 04:46:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=btconnect.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 yNXxT5MZQKd6 for <netmod@ietfa.amsl.com>; Thu, 31 Dec 2020 04:46:50 -0800 (PST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60117.outbound.protection.outlook.com [40.107.6.117]) (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 4D8EC3A0B2D for <netmod@ietf.org>; Thu, 31 Dec 2020 04:46:50 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VeMfbWyhvesUxEL81XXARRT0dvq44szKq6/Fw8DTPr0oMt063121Uo5CEc7dMgqOas6waDtOMVEE/3X6je65tOGbUx9uu57uYLOS1oyk6kCnPwjGxSABf98Sz0tKBOnORctRBTh619vuaad/PMZ28eHjqx1l3wc+Xyg5sj3+/GlUFHsi4AWLyyJ7jKXNfMnnkkPe92nfELuMaPut2wqn0gNAVwv1+0UJSnBAAfqIsTkrPRf3x+Ik/RP11nV+GQ6KPy60DaYxUoPNXR4pwKXjCE/cjjWCoUuNCRcLu2yBGIPQ9H0Mz8BKdL5G2Fm4V/TaYUPXcwpeds8z4lRAmIPW6g==
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=RPOIEKwcG9KxmGTEMsYTSGuJ+bBPq7RYNn9YIQ09YTk=; b=DtrD2aMnI4ZhGlKbbXSE9P2SWS6hSIghIfDWrcP5gipaFHAm/2vnscf9GnIK65rc+1DViPb89irQVN/2n6Jg6fB05UTG6mVQVq1gd4qNvFwRf5CG3XOes83zZrIzG2Aad7+iz0uqD4UVJiH0G4CsE/2h94mV+9D3h/ZOK3Eub3YKN0cnAGuzLFYTdQ7lD9ajdbNij1ukTu59yCkUpKUdrD8uNcpPYG4vNz7IS3yP5D6IDyytuLMqo4fM71TOsDLvIf2kZ4smbLut8AAZj5a34lADoYWWrRJGWNsYdb8LqTHSsLAfQsforv3NAFbt2SPpcOqziwx7rR+OfdBJIQSkdw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=btconnect.com; dmarc=pass action=none header.from=btconnect.com; dkim=pass header.d=btconnect.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btconnect.onmicrosoft.com; s=selector2-btconnect-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RPOIEKwcG9KxmGTEMsYTSGuJ+bBPq7RYNn9YIQ09YTk=; b=jvRkwvItTPUF4BaWoWDuZxT9lvfREo5gBM7ljLCvIJpQeGHvsZGVGC7o66TbBq3aIpsrHAkjMTSjDStEcjgwuPAI4F45vGuXk2/f+eU2c9p8yTQwY4DLrGoiJBFqbdWnXXcTqRiTytNJhbgcnOFaT/itGQBjvLd8UCrCHrxWnaU=
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com (2603:10a6:20b:134::11) by AM6PR07MB4134.eurprd07.prod.outlook.com (2603:10a6:209:2f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.11; Thu, 31 Dec 2020 12:46:47 +0000
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::6d46:4f3c:643:4849]) by AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::6d46:4f3c:643:4849%6]) with mapi id 15.20.3742.004; Thu, 31 Dec 2020 12:46:47 +0000
From: tom petch <ietfc@btconnect.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Fw: grouping when
Thread-Index: AQHW2fHLaWBLC5Q47EutlpdGKdkFhKoRL1Ig
Date: Thu, 31 Dec 2020 12:46:47 +0000
Message-ID: <AM7PR07MB624865A3E1EB3ACF4D51DA06A0D60@AM7PR07MB6248.eurprd07.prod.outlook.com>
References: <AM7PR07MB6248CCA2DE29252D9E3155D5A0DD0@AM7PR07MB6248.eurprd07.prod.outlook.com>, <AM7PR07MB6248CDD215ED9A55F8AFAE25A0DD0@AM7PR07MB6248.eurprd07.prod.outlook.com>
In-Reply-To: <AM7PR07MB6248CDD215ED9A55F8AFAE25A0DD0@AM7PR07MB6248.eurprd07.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=none action=none header.from=btconnect.com;
x-originating-ip: [86.146.121.140]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: a2de1787-4b44-467b-91aa-08d8ad8a22d5
x-ms-traffictypediagnostic: AM6PR07MB4134:
x-microsoft-antispam-prvs: <AM6PR07MB413441496785C43597E3340EA0D60@AM6PR07MB4134.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: mtMjwRvVvpjW9Db/nsrFte0AEu93la/42knuCShjTAU6xybXMJUKU/9ijF88vsycDCo9AtossFUvwoRYYMTxKcLXkhIpYe3AUzj2hUDgPJAlKM45lxR8n2P5eAJ0H9lDkThxkkoHII/o3fdU3Vt+AxvuFVcUxsokLp4iLYQ2OT2JKybT2gfmtjs95ZwKvqWJ/ueeC7yowHyDKd1c/j75QmuK5VPgfADUPCy7OK7eWQwPwN5DAhtqbSrj4cwNEDcGda2Wnyypi4p65EJKHS6HjaFjHQRika3ScDmJLSGHOyc8qa/veinW/5+ve/sD1pRTJ1TGDxM7e7kfnQ3oZ03aCtVYyENHYmeh8HzTaOm4p9cB9RXD+d7HqR1K+KwA8uW7nzaRUifLPTwcxIejMNEjzNE5IvrvAW9BvZQdVXBPqKwCrCyKjjeKaaTYrDhfVgeaugNBwQuhyfwE2R7PG4f1bA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR07MB6248.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(376002)(346002)(396003)(366004)(136003)(66946007)(26005)(66476007)(66446008)(64756008)(316002)(66556008)(86362001)(52536014)(2906002)(5660300002)(71200400001)(7696005)(6916009)(186003)(9686003)(478600001)(91956017)(8936002)(8676002)(6506007)(76116006)(55016002)(966005)(33656002)(83380400001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: lgrYnBVyjKqJ0AsBdxZm/wu3PtXZlVgn0ebV85v5RpkL9IcrO4Uj+YiJo/dVCe1MEWoKcl0ZNH0B4OBX1s2ImymwgD40is7R7qeYVrq3x9OxusK+Yc/1sdp+8fbBjg3dfEUCHq+nt8/0cq+jyMfvxDJHxYNnNG3N+AOfkqf8EsH2Zpb70uHjnHHYnIdBCDJCmYPNMdfXQlBm2g6PR0957vIhMne5amNEoXTgkd5AGF1fssimCC+z4Vsl8TLq/P2T2D67NpSgYZ1Q+ZNM7ftbybghktXy5Qq7YoSjWivug1IuieGqpjifcjESXsB3FMsuZeniQUmhDV6dhQm3MzDFF1KjV5FVC1xiEUmTAhYR6Ryar4SHkaSBfJvszKXVnzdb0UQwBQXCWcXPWwEKMSD8FmhjDgSx862c7QaKrhYAWgL8XeOlYaLgHdK6FOJRkkaw3+2LoJ7vD/1YxqIV8P3164fjcB/sCuum/ZWdfbcouh7/zjk9o46XP7UbDCq/QTpqOH9smzHOXjMxMyyem8zgHpgtO7+iBPc6GmQV8xdWk//0fXsc8jmDdqqCHJe7Jh7DUcgMipHkM+k2VDN8y7z2RstG+12OD5NemBMx2DDPuu1l1QcXAOiB2+kuvk9EqLKhtqhf3kPZ7mVOAa4bVS8kPOp5Pynegcmlp5uDQF+IKz1TZsXlPfKSnbrqCqxlptRstPROxsUpDMWvLGUeW7y4vg15IEJYaHVufbq4EQk2e4ylt7fmYcCHhw3t0lMDh7h8Nf69nNpO449TtB/Y65EomPO0IX57uXDzEEgktWvEm2QenfGCNtBGkB52z+nuczAUAR7hBpns9nPM89GXuG5l7AmMHS9Leu/c1Vxq1KLKhzzsjf7Ca+WK3bZOGWGLvINKGEZHTdxVO0miymwoYSfLpqvia03kJykkibDokjvOrQQcOncc7WlQpps59KFZovG+BRYvW53JM9Dd9Cpu6LrVRxc0uKahCReFhzDIY549juM=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: btconnect.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM7PR07MB6248.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a2de1787-4b44-467b-91aa-08d8ad8a22d5
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Dec 2020 12:46:47.3413 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cf8853ed-96e5-465b-9185-806bfe185e30
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: DzzPfeYl8N3F8dR4DY3JkP5BNgUf3OrJTQK2xkA219cCZtct18esT1jQgC1a0nN/R+AoscBR0wzLHd3HAvBcxw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR07MB4134
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lZJ9gIxm6Ss0ZbjW914xMcY1oT4>
Subject: Re: [netmod] Fw: grouping when
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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, 31 Dec 2020 12:46:52 -0000

From: netmod <netmod-bounces@ietf.org> on behalf of tom petch <ietfc@btconnect.com>
Sent: 24 December 2020 12:38

I have answered my own question.  I had a thought as I dropped off to sleep on December 24th, resisted the temptation to follow it up until this week and have now seen how and where grid-type is defined.  I had to look at the YANG modules in five I-D/RFC and pursue grouping/uses nested to a depth of eight.  Complex.  It reminds me of when I used to maintain system code and developed a  clear sense of code that was easy to maintain and code that was hard to maintain, where mistakes were more likely.  I would put this as beyond hard, that tracking down 'grid-type' is a good exercise for anyone wondering how good there YANG skills are (with a time limit of an hour:-)

Martin recently identified a flaw in one of those five I-D/RFC and while the flaw is not germane to my challenge, yet I see the underlying complexity as a common thread.

Tom Petch


Try again
________________________________________
From: tom petch
Sent: 24 December 2020 12:34

I wonder if you can help me with a when in a grouping; where does grid-type in when come from below?

ccamp-wson-27 has (slightly edited)
  augment "/nw:networks/nw:network/nw:node/tet:te/"
+ "tet:te-node-attributes/tet:connectivity-matrices/tet:label-restrictions/"
           + "tet:label-restriction/tet:label-step/tet:technology" {
       when "../../../../../../../nw:network-types/tet:te-topology/"
          + "wson:wson-topology" {
         description ...";
       }
       description ...";
       case wson {
         uses l0-types:wson-label-step;
       }
     }

with a tree diagram
    augment /nw:networks/nw:network/nw:node/tet:te
 /tet:te-node-attributes/tet:connectivity-matrices/tet:connectivity-matrix/tet:from/tet:label-restrictions
               /tet:label-restriction/tet:label-step/tet:technology:
       +--:(wson)
          +--rw (l0-grid-type)?
             +--:(dwdm)
             |  +--rw wson-dwdm-channel-spacing?   identityref
             +--:(cwdm)
                +--rw wson-cwdm-channel-spacing?   identityref


while l0-types has
    grouping wson-label-step {
       description "Label step information for WSON";
       choice l0-grid-type {
         description    "Grid type: DWDM, CWDM, etc.";
         case dwdm {
           leaf wson-dwdm-channel-spacing {
             when 'derived-from-or-self(../../grid-type,
             "wson-grid-dwdm")'
             {
              description "Valid only when grid type is DWDM.";
             }
             type identityref {
               base dwdm-ch-spc-type;
             }
             description ...";
             reference ... ";
           }
         }
         case cwdm {
.......

Tom Petch

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod