Re: [netmod] RFC 8349 action input augment

tom petch <ietfc@btconnect.com> Tue, 05 May 2020 15:44 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 0A8E23A0948 for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 08:44:05 -0700 (PDT)
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 3i8I7AWefOOH for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 08:44:03 -0700 (PDT)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150119.outbound.protection.outlook.com [40.107.15.119]) (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 2E7B43A0923 for <netmod@ietf.org>; Tue, 5 May 2020 08:44:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+aP3KvRNPgNdxRvpL83t/Arp67YBeBFdmz81Px9J4/bniObFZvVlLsLQkhfvaQYz8qQS5mr8kM8RSBd0ExD0Gs3iFedCyH+dEjBHvOgS0ufo37UWMrV6Oqwfbix3bHd7s3zoqEDkp7rmHepPD7YVgJUTd5JdUx+nSH92I5aqpaeRX7R6vkxp7zoGoVe3VGitF4GT+vFKnJ1450GCy5mlcCCRNJpToS4uKvrXiQuuY9vzbq62MtcOrz+Q3toDT8xHSkFAt8KNefLrcY5usp5T5+oxAfSx9bukRp69XM2MM8Ej3NNHxvsgu23ECsbwZu9cMNSnS1UxLjBospf+g0Arg==
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=VFzcvRFguxP2UCFdFsnAzZAzLJIm6jVv8D1jJVla2Mg=; b=O3du30b+wk0O7rQhOnoZznpr2u4+N4+6C8N+MnIpxlLLP6IvPUrAzhzjWM2TMhi9MXwuIFYgW6KTPw9nBpIeqqcBmpwFCmVRdL43iK1jUPHk6bWYV15pGY1b9FsfB9q7FlpH0JUHa7EK1CGCvKrVDnmTKoF9lrL/5EtoykL92JFYbcUrAopG/DD4Tts0JOsxGDZDY553FCjTkSrFSZZG8jC+Q4L7xfoqQN/09CfwQ2TOPpUrogeCd+PY9q4vE5He8objU1LbTiu8SWzj9TGaFqCZ9HsFAGPYH3nYEy5PvB/5KrZruLik/ftak+CP8CTexCcCRY64kWF3z13f9dJH9w==
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=VFzcvRFguxP2UCFdFsnAzZAzLJIm6jVv8D1jJVla2Mg=; b=CMcDuXMvSfZBkEWpCClmykrbrC5RvJ9lDfBJ2lG2AJ3sR9+smZTXshko9CdwK4zYyFymfUJ0zyERVbwk2R0n2/KddbOO3mx9MXkPBuvQu1AdpoojJCyb/EHlj6unZmxDZEUo4l5gtLoMMI8LJduFB0+D2zCf83gH4IGQJ2UxX+I=
Received: from DB7PR07MB4522.eurprd07.prod.outlook.com (2603:10a6:5:34::23) by DB7PR07MB4059.eurprd07.prod.outlook.com (2603:10a6:5:1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.23; Tue, 5 May 2020 15:44:01 +0000
Received: from DB7PR07MB4522.eurprd07.prod.outlook.com ([fe80::1980:df3f:5436:3e6d]) by DB7PR07MB4522.eurprd07.prod.outlook.com ([fe80::1980:df3f:5436:3e6d%5]) with mapi id 15.20.2979.025; Tue, 5 May 2020 15:44:00 +0000
From: tom petch <ietfc@btconnect.com>
To: =?iso-8859-1?Q?Martin_Bj=F6rklund?= <mbj+ietf@4668.se>
CC: "lhotka@nic.cz" <lhotka@nic.cz>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] RFC 8349 action input augment
Thread-Index: AQHWIs+5/zWayN37pUuprqDPj7hzqKiZXf0AgABDq7Y=
Date: Tue, 5 May 2020 15:44:00 +0000
Message-ID: <DB7PR07MB452200F7FFA45361F8A8DF02A0A70@DB7PR07MB4522.eurprd07.prod.outlook.com>
References: <158859819282.16144.11762511824828734226@ietfa.amsl.com> <DB7PR07MB45224A311C4FBBAA4A58506CA0A70@DB7PR07MB4522.eurprd07.prod.outlook.com>, <20200505.133916.703258076078896929.id@4668.se>
In-Reply-To: <20200505.133916.703258076078896929.id@4668.se>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: 4668.se; dkim=none (message not signed) header.d=none;4668.se; dmarc=none action=none header.from=btconnect.com;
x-originating-ip: [81.131.229.19]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 62148d38-59a4-45fe-ae13-08d7f10b21c2
x-ms-traffictypediagnostic: DB7PR07MB4059:
x-microsoft-antispam-prvs: <DB7PR07MB40595A1112F81D6CAA7BE010A0A70@DB7PR07MB4059.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0394259C80
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: MLWr20id4MBxqvqgTS0wF6UxbY4gwZ1TNBMce5rG/S+6xsjc6nyXuZ7++bO4oDoNXEfdaBEdmH1Eun9nAQBzNoUyCxmZNVQcXQaMcZuQyp7aQuTwuK4JDOVIjvj7PVscOKZm8gi8R+egAjeVFMEse/Dxc3v0u8R9SCmT4sl97dlusy0E7mDvx4iqCmtcUWVi3IyimO924ESV6ruiA63pKpgmhYgGbSn3iNO6PAz2tun1mnX4eY7E+9jSHcjo2pwbtmTkQ4o0QOTgHqKQCE/r7uklRlcz3mt3DTCv4GvVddXkmZuZ4SqR8V7KhDLxzQdkbtmWdnJ58WEUHxoFNa8U/I61nWn0kTqnSG22umRHfI4kmFbHrgJGhO2iLINfsS2O0b5uHDMZjfUZeGyjJcj8s9sKVeS7RsRdXHZohqG93Sepicpu2VUnvcEf05lC3a5Ezm1M3cgNxNtLbaoWol7AHxD4w9Di0LVw2P6K1RCGAUVSuC5ZyzoYiIbE/c6OWBK3kdrmjDCwgI04rS7ZCTNDHlrxKBN1xW0GqrYdl7N80hmM1qMKNpOaty/HcH6tZvGY9KwPBCk+sNznCRW8gNUVPsoW106dEyDEPLU0/VCBgeI=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR07MB4522.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39860400002)(366004)(346002)(376002)(396003)(136003)(33430700001)(66946007)(86362001)(33656002)(8676002)(8936002)(2906002)(91956017)(76116006)(54906003)(5660300002)(66446008)(66476007)(66556008)(316002)(64756008)(9686003)(966005)(55016002)(52536014)(7696005)(4326008)(6506007)(66574012)(478600001)(71200400001)(33440700001)(26005)(186003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: jNIpnDi4133sm03jGgQWTCqFpxFDnD9u5fpwc2WYJicgGdAzhRb4xc5ofj6MdqHlIM3DyU/tREeXfbQoPTne2bCirVZ7lYmhkPX2CTpbsXGeRP7Y5Hy2Unjb0c07f3AnR+fvLamqL3e7dRMgsNIBlNzegZlDa0BK74AI7INwYH4U0GhCjyKf/GIYt1p4fxSlMl8l942MIE0Vb8fqAsQ8HuIc82Zv2RnLNwn6w4eQBMCIs3pl7fpSMe+jHy+AoyMTg/O8gD6ponf0QuXjnqmqIY3bAv4wontvsVYDo2wocHM559dZcCIGqEGu/JPQbfb//kbjTDtJCC12MaswYyNpLBAgYmwZlrMg2Xx/3RD3zviE42Mr2cWL152muj9k/JZH70mq8gmX2RV039iMAebsrvNFhw/QkMV0Q2s2wpNEewCKp1+9ZMhHViw0YLh9vcPnz7x2FfeqfY4/Bamv7/hqzrDwLtGKP0eUZErty5cJbd1fmK8b4WDW30IX6kPL7G+rD7iqKo25Rhk84GrMGhvbYOGUNl3WQGqBDxiU/eyUlzMi3/IOFSnLO15J1XGaMkWuwsZTeQVmXtB44zvZWP50ZC4QrDslIA268BRwaqVc1GcEyKjA+A1RV9rAMNqGdMfMAQvMWR4AG/eUdvbTfolD8eewrOW8UkGaG7hKSg9KFCz2HMEISJr0dl5wrT2rEv9jBABP2yQUIcuEvMF2f8OWEACHFxVKIZTzaNeTtG75wegHRaNY1t8yLiOQP+8qD/8Dn/B1okb8OGtd15BOSByoL1/wxNZWQgsUPfOYWgmqJ9g=
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-Network-Message-Id: 62148d38-59a4-45fe-ae13-08d7f10b21c2
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2020 15:44:00.8076 (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: VwGLzTtAsCvZOLQ9nrk/GefcvJok5mF/EiqmWeCsXtS2j0mjm4Yiz8j/f3G6eg8+20zKcUYKZTBeor7XtFQm3g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4059
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5spu3ywfY6p3lRGNZt40d7yPwKs>
Subject: Re: [netmod] RFC 8349 action input augment
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: Tue, 05 May 2020 15:44:11 -0000

From: Martin Björklund <mbj+ietf@4668.se>
Sent: 05 May 2020 12:39
Cc: lhotka@nic.cz; netmod@ietf.org

tom petch <ietfc@btconnect.com> wrote:
> RFC8349 specifies an action with no input and says that modules that
> use this MUST augment the input with a leaf and that the leaf must
> be named destination-address.
>
> Is there any way that YANG can enforce either constraint?

This may look correct:

  action activate-route {
    input {
      must '*[local-name(.) = "destination-address"]';
    }
    ...
  }


... but unfortunatly we have a CLR in the definition of "input":

   input-stmt          = input-keyword optsep
                         "{" stmtsep
                             ;; these stmts can appear in any order
                             *must-stmt
                             *(typedef-stmt / grouping-stmt)
 HERE--------------->        1*data-def-stmt
                         "}" stmtsep


We require "input" to have at least one data-def-stmt, which doens't
make any sense, since we allow an action/rpc to not define "input" at
all.

<tp>
Thanks for that.  I thought there was a reason but did not think to look there.

As you may have guessed, I just looked at a YANG module which broke the rules, added  a leaf but of the wrong name.

Tom Petch



/martin


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