Re: [netmod] RFC 8349 action input augment

Martin Björklund <mbj+ietf@4668.se> Tue, 05 May 2020 11:39 UTC

Return-Path: <mbj+ietf@4668.se>
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 605093A07A0 for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 04:39:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Level:
X-Spam-Status: No, score=-0.921 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, PDS_NAKED_TO_NUMERO=1.177, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=1X/qwGDe; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=mfO4mCvp
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 Wv9WcoHlSHHw for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 04:39:20 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 834783A05A4 for <netmod@ietf.org>; Tue, 5 May 2020 04:39:20 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8DAE05C008E; Tue, 5 May 2020 07:39:19 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 05 May 2020 07:39:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= HFaFvkgtdcVTFRQ8J4NRSfOuWN6p7Du8Kq5QiEBsJP4=; b=1X/qwGDeHSQK0Ofq HiZIRwrkFmivc85LJ1gOXLSZi+h5yRKrTyFhdjZiJP8XDS6uIFznCFr77dEpyrvY jcFUeFbcdI1vSEv2H3CrsyBRzSamVCTSiotqOxUXFS709EfWR0uS+GC+b/0HJLtk 2y4fuSd6ZU10XXDGwphgZ2LBunZKil4kdMv6Fv0cWhyVfbLh7nKtzzQsWHXYWqXD NRh/pahadf/AVcuBCPUtZ8vOt11x5O8z16teNqmHYSC/B5tEUmcwx0PvpaKGx9Ba CVHWisbCJ0DMZ5UcPEGMyA6b2cZqHzSHGqfi1NdrYbpbOgGdEvyHNmQh5w3jw/te fiXX8w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=HFaFvkgtdcVTFRQ8J4NRSfOuWN6p7Du8Kq5QiEBsJ P4=; b=mfO4mCvpPRrOgo2rcT3eTXxgKzled2raTQm4szv9yN91MjxWbaIiyeAqR jnWdbfY3ZhJt9hOIdxW25g2faBudfQRuzQ5Lj/No4Zgo/q+0t9mBUQoJMxD0SrFC LLF8KD+RMff/ftuoFfNF0FXqgB6CfSsKxPjhuGlg6crI7zIP9d5Ya/HUFTwgSw0z pYkSNNuTSEB4utQ+ANAaYzDGpadPJywQWnGP+IQf2COsvkHlV9yyhjYQigEmxBBY yCaHiVxFW26jpvDDWU2gFSelfWQyTHBFKIERfjBZ4HBXIWue4N2HK7pjRx5ZC5Vv Y3DXc25Hchqh1uryzgf5TiYkysdrw==
X-ME-Sender: <xms:ZlCxXimT_WMOus2XGYd-FPTlz7vrscdPpeSHmc6zpEMEqW3RfnWjrA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeigdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthejre dtredtvdenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpeejteegvdeuleefudduueelge efgfevvefgveeujeehhfelgefhleeiheeffffhkeenucffohhmrghinhepihgvthhfrdho rhhgnecukfhppeduheekrddujeegrdegrdeggeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmsghjodhivghtfhesgeeiieekrdhsvg
X-ME-Proxy: <xmx:ZlCxXuFzHz76sv0f4Jm_5vwlP084GDa7jPRKf_iPlIVjP6d1v9AOIQ> <xmx:ZlCxXrppl2hMN5OfK1cVeBUTUZ5GTSur7suJ5ueisG30xzd3LesdkA> <xmx:ZlCxXq4p7GN1l6YZNqHw9OcvD4Ehlci9wdyERj5CTKmSpToYYJ_yRQ> <xmx:Z1CxXq7v74Iu90f1_mSVwQ90dIXVLpy8LBybYTt31ZXpfOkMvsTneg>
Received: from localhost (unknown [158.174.4.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 6B034306602B; Tue, 5 May 2020 07:39:18 -0400 (EDT)
Date: Tue, 05 May 2020 13:39:16 +0200 (CEST)
Message-Id: <20200505.133916.703258076078896929.id@4668.se>
To: ietfc@btconnect.com
Cc: lhotka@nic.cz, netmod@ietf.org
From: Martin =?iso-8859-1?Q?Bj=F6rklund?= <mbj+ietf@4668.se>
In-Reply-To: <DB7PR07MB45224A311C4FBBAA4A58506CA0A70@DB7PR07MB4522.eurprd07.prod.outlook.com>
References: <158859819282.16144.11762511824828734226@ietfa.amsl.com> <DB7PR07MB45224A311C4FBBAA4A58506CA0A70@DB7PR07MB4522.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/h8GNi1oYcxFHeVZlpHkITrZzifM>
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 11:39:23 -0000

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.




/martin


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