Re: [netmod] YANG action not allowed at root?

Martin Björklund <mbj+ietf@4668.se> Tue, 05 May 2020 11:28 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 007A43A079E for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 04:28:59 -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=iXg9S1IR; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=gWE5D5B+
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 ZWiGDkk2BVYl for <netmod@ietfa.amsl.com>; Tue, 5 May 2020 04:28:57 -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 65D0E3A0795 for <netmod@ietf.org>; Tue, 5 May 2020 04:28:57 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id A53C55C0068; Tue, 5 May 2020 07:28:56 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 05 May 2020 07:28:56 -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= ZqSIlCLlLv+l1QQj/v6VC5I1RBMgWx6jHSVTQWmLRsM=; b=iXg9S1IRSzxg2/q0 6M2N3e1u/qIInN9dtDvzCMictbQ+YQHXs7F0tegVrMYLkZsZdOwIU4F4jeml7RZJ yVAyCqxi9XFKF6IfPQhemmC2yNSrKKbo3jOxWSU7bdNhld86999kG3YWImWSpdif DQL6Y3TGYkDggrLfunK+aUdwSpdzTSfQ86IkJGpJYpe7xH25h55zhnlerjjJztwn Ck9OgGnXzauuU8jInU9EIf27VSX0NpZG1wHy/Qjav2Y3Iqgay5krzwymz0RSjttO WOpwVXlcHKHsytCFajfn4w9sY/l9jRimohasxHiHlQif2YzqQwn+gCWZ++59KQhJ A5yyYA==
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=ZqSIlCLlLv+l1QQj/v6VC5I1RBMgWx6jHSVTQWmLR sM=; b=gWE5D5B+za5NaIGSn6D0Fc8L/DAzW2jbgHW9f6Cb+vhGxKu2F2s7BC7wk PUnPJV+xqvBHFPx5DhBUe4fUcRZXGlFI4qt88BNPyC/ujt1JfprGff8apBmLITg6 o6jiUV9hbzqtMu0gFqgTjI6NCm4V/5U1RjjJxNplRj+c50N/cH1Cpuzn3H9C80BZ CkroGkZkD8Poms4KgmLcKcrEQ9/Kp9L4jKLvKJ3h3DU+2OBhgRLo5avBcZ9u0oc7 jS6ZL2+cC1Jpi5qxGpcl9TAHtL84r7aZG3r3Kf3osy+RmZ6/QV6O59xiGujgmMh3 f/QntTsvixk4NDT+0aLH1nSsbuhCg==
X-ME-Sender: <xms:902xXiETY8sY3tECmeiwXmERysvRlO_IWpeAff5SaoTSqk3sDUPJfA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeigdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthhqre dtredtudenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpeeikeehtdfhjeduveekgfdvke duudehvddvffevgffgtdevudeijefgtdevfeeludenucffohhmrghinhepihgvthhfrdho rhhgnecukfhppeduheekrddujeegrdegrdeggeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmsghjodhivghtfhesgeeiieekrdhsvg
X-ME-Proxy: <xmx:902xXovetWR-FL1oV_abeXCVB7ZRuDqHgxO3VzroFYXu-khp24lcBw> <xmx:902xXsWJsRTo3t6MiYGZyEYA7mGKs1sAmm6uel06bOuNKWEmg8eKbA> <xmx:902xXsE5Dcx3jTp8Ga6YJAlW3d_zSnklmtbsR901N5Mw4Tr46xjlGw> <xmx:-E2xXqv2o9Fhy-G6Dwy2Hb8MD9EBSTPad8eY20Hde2NnPL7Lm9T90w>
Received: from localhost (unknown [158.174.4.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 69FC8328005D; Tue, 5 May 2020 07:28:55 -0400 (EDT)
Date: Tue, 05 May 2020 13:28:54 +0200
Message-Id: <20200505.132854.1832500873842668567.id@4668.se>
To: rwilton@cisco.com
Cc: per@hedeland.org, netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <MN2PR11MB4366AE68FBE84A768B8B7165B5A70@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <7554d71a-256f-9b29-02e3-e2e7a3e0e474@hedeland.org> <20200505.123013.1305793718479337992.id@4668.se> <MN2PR11MB4366AE68FBE84A768B8B7165B5A70@MN2PR11MB4366.namprd11.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/rEijCgWQmtPC9yiRuh2-ozNBcTo>
Subject: Re: [netmod] YANG action not allowed at root?
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:28:59 -0000

"Rob Wilton (rwilton)" <rwilton@cisco.com> wrote:
> 
> 
> > -----Original Message-----
> > From: netmod <netmod-bounces@ietf.org> On Behalf Of Martin Björklund
> > Sent: 05 May 2020 11:30
> > To: per@hedeland.org
> > Cc: netmod@ietf.org
> > Subject: Re: [netmod] YANG action not allowed at root?
> > 
> > Per Hedeland <per@hedeland.org> wrote:
> > > On 2020-05-05 11:55, Juergen Schoenwaelder wrote:
> > > > On Tue, May 05, 2020 at 11:45:41AM +0200, Per Hedeland wrote:
> > > >> On 2020-05-05 11:00, Martin Björklund wrote:
> > > >>> Hi,
> > > >>>
> > > >>> If we were to redo YANG, I would prefer to have a single statement
> > > >>> "operation", either on the top-level, or tied to a node.
> > > >>
> > > >> So, no rpc statement, and thereby no possibility to extend NETCONF
> > > >> with new RPCs? (Or to be precise, YANG would extend NETCONF with
> > > >> exactly one RPC, called "operation"?)
> > > >>
> > > >
> > > > OLD
> > > >
> > > >   rpc foo {}
> > > >   list something { action bar {} }
> > > >
> > > > NEW
> > > >
> > > >   operation foo {}
> > > >   list something { operation bar {} }
> > >
> > > Yes, that much is obvious, my question was really about the NETCONF
> > > encoding.
> > >
> > > > Syntactic sugar if you will.
> > >
> > > So you're saying that the NETCONF encoding of "operation foo" at the
> > > top level would be an RPC called "foo"
> > 
> > Yes.
> > 
> > > while the NETCONF encoding of
> > > "operation foo" elsewhere would be an RPC called "action"?
> > 
> > Yes; or called something else.
> [RW] 
> 
> What is your reasoning for not wanting to unify the encoding?

I don't want to change the protocol.

> E.g. always treat the encoding like action, but with the <action> node removed.

This would violate RFC 6241 which says:

   The name of the RPC is an element directly inside the
   <rpc> element, and any parameters are encoded inside this element.



/martin


> 
> Regards,
> Rob
> 
> [As an individual contributor]
> 
> > 
> > 
> > /martin
> > 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod