Re: [netmod] YANG action not allowed at root?
Balázs Lengyel <balazs.lengyel@ericsson.com> Mon, 04 May 2020 13:20 UTC
Return-Path: <balazs.lengyel@ericsson.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 BA9DA3A087D for <netmod@ietfa.amsl.com>; Mon, 4 May 2020 06:20:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, 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=ericsson.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 6JTigbELRBvT for <netmod@ietfa.amsl.com>; Mon, 4 May 2020 06:20:45 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2089.outbound.protection.outlook.com [40.107.21.89]) (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 5DCAE3A087C for <netmod@ietf.org>; Mon, 4 May 2020 06:20:45 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dK8PQyA75vXHohqaxU5u5CXqS/7TKZENKIB3vBYlbVyYLXALjziJdi5H+47PYXpFwg6Cq+mNSfzUvupYb2fgMjA7hrI08upTU+oKXghL3SzXlk8rHktxlueRLgSqpB48TS3pdKzQGqbVh/8+7eL+pBkbyMvC7pFKRepmcblklkJ+EG/umvx8CDv0aAFYLlReN/dHP1hyNWnbYUMqDhpW6axbxlMbbIR2Cvw5ywF53yInWX2EbzzMZemodrQXEr5U9JNPBIV+MjSaCJg4BccOQjCKBDnCqvJfY0DMRHwWVMDLULPdw2Ffz9IUP2PZtiOUTbuu8hwyILeTfnMVMT+wBA==
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=V697WQA32d9QFFcRrNMR0pvstYdkoH/XLP0uyG7kUig=; b=oU1x+pbpNNDM5Pzw0DPc9tneiQTSF92sgJAK+1Cif6VlpOT6v+AYiBQHMfsgotCDWkUMIpLvWHeP0vKtQrUTPZuDtCulYH99MIBUzngEpesw22z7TNy4+SIsEED54Ae1Aee7OgpA0RX2o0TW93x8H104cvu2IAFlgWZI/iEu5SSz0qJ0GY6KcWbsJG845RmTjKQERtJMXZk3hBSnc0JqgDqAzX0aoSN02wIGBqBjORTWkWA4OMNKymlxqG4EkRpOzDA39WlPHLgTFMzKdkW/nlTn9P57ORuv3hA1KmBuO02klg7oJTSXYd7A6I2+M/GY3cKq/dR/Zcd8ttG2MY55Vw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V697WQA32d9QFFcRrNMR0pvstYdkoH/XLP0uyG7kUig=; b=Yc30QBSu/JLaDJgjdRTsSyo/Icn3S5mfLuVy3lyZlxDmttDBLWAuCS/C6tgHByTqBkPLLHmdqEm3BB44DqVG4GNYu3Hwk+8m5X7cAR1rLnImAGEHQCjr9I/Yblj4HVP8CknzeVPzOdIbEYQ9BEQGh8CxT6fPHDfQ11gwrK66hP0=
Received: from AM0PR07MB4004.eurprd07.prod.outlook.com (2603:10a6:208:47::12) by AM0PR07MB3971.eurprd07.prod.outlook.com (2603:10a6:208:46::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.16; Mon, 4 May 2020 13:20:42 +0000
Received: from AM0PR07MB4004.eurprd07.prod.outlook.com ([fe80::9462:5522:7e24:40e4]) by AM0PR07MB4004.eurprd07.prod.outlook.com ([fe80::9462:5522:7e24:40e4%6]) with mapi id 15.20.2979.024; Mon, 4 May 2020 13:20:42 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>, "Reshad Rahman (rrahman)" <rrahman@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] YANG action not allowed at root?
Thread-Index: AQHWHwRZTrnmeHaqAkuESYf3B2vfKqiRzWBggAYhD5A=
Date: Mon, 04 May 2020 13:20:41 +0000
Message-ID: <AM0PR07MB4004281B89D26BC714C79A66F0A60@AM0PR07MB4004.eurprd07.prod.outlook.com>
References: <AE95765B-0561-45DC-A4A8-E8B3BCE4BB12@cisco.com> <DM5PR08MB263359FB2993EC569444A4539BAA0@DM5PR08MB2633.namprd08.prod.outlook.com>
In-Reply-To: <DM5PR08MB263359FB2993EC569444A4539BAA0@DM5PR08MB2633.namprd08.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: nokia.com; dkim=none (message not signed) header.d=none;nokia.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [129.192.75.24]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 8bcec6c9-3bbc-47ec-57d3-08d7f02df20b
x-ms-traffictypediagnostic: AM0PR07MB3971:
x-microsoft-antispam-prvs: <AM0PR07MB3971206EABF6C79B8178C3EDF0A60@AM0PR07MB3971.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 03932714EB
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: eXWa33dLCi4fTTbiL6fZBG5bLt5CVcutXwprCo3fGhzO/JZG9bXPHr1CtjXJ8FidDGaGaivY3nXcyCYhLg6vUsueGxhfb+BU0SRv1fMiaq/0WhMrPrcT5rKxyL0rnXmlZmjk5daXIEcs2BKKrjuLi45FFgT5YZfcae/1sMe/xcepLcq9Rj9z9mkLm3iK/3VXHbhHX7T909eCAvo0bbZRPvZLdS3o9PQxNe0AuZFMw94tvyEjcVdiAN6A8KSQ2joFwSCAw2r90CpRqf/INKsPJ2DGJcP0K7xNgnDNqTssYuiF5wDOwPR1oxfnwm+L+UIr8C+rD9uPzw6Q7Ug5GT/jM+nlEoKbQvL4GUMqu/eRBFRGqYv4FHdI4EVrR4B+AXKgvrP2bZ+6Iawu32Y6CQEPDWbszDr8zYinAeV2pakOWz+ibGWjsqjqzf3MO2+hazibOu/uAFxW5kWm7B/Y9xy42qy0TZCvGxUFmD2yBLn4YRn2ys1oK5t88O8ICIcfcUk9s89Lb98qexSyCfsXYJqso+vD5FJ3oa9c1iGJq3vw5EbmGQZLZ4T3344INzYG2jhL
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR07MB4004.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(39860400002)(346002)(136003)(366004)(396003)(53546011)(2906002)(26005)(66574012)(296002)(110136005)(55016002)(186003)(316002)(85202003)(8936002)(66946007)(86362001)(478600001)(9686003)(9326002)(966005)(33656002)(5660300002)(8676002)(7696005)(85182001)(66556008)(64756008)(66476007)(71200400001)(76116006)(6506007)(99936003)(66446008)(66616009)(52536014)(21314003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: zZ3s5pabsI5b1OzHoqwdpGuGjZiqCdC0ubEfDUMIkl294NRxslQlx4Mvm2iZFQVE1EclC/4iOWYxZZS2pu/I4Ixco5HfWBE0JkAWyDqdnGu3TDGSmsVsiElR357mcAKaOGtRwu2ijGyPA+h/TMFneW75dvzX3bf0Ankjo1Uz8OUsZPNcGbMEW6d0LwxTDlYKlXi9tuQYHu0CJV6atgtNaPss49U7j17EG7Z4QUL4FGiFObpQbYwRCfrNwxzhWkDP10V2SnmHLIyTzz/olNO09P8rYsdFAnb0K8ghPjeMvsTgw05GLZ0VrOstT+7iz2oRlISaZTi4BZJxLgrXEoWRDL45wI+OJOzL8VQsg2SWdFMighf++9ETm1XTeiXtkabMZ4CRNB+1K0hfnLF+TSvX0I0Dx+c2FRSkXR5plj1nYjB1NC+WoUnTQkgkSyUIoIzBXgxlzGym30oIz9+6+xMvjFeOcqJhXMSxqXQyl2yUrVcsh21MqG8oXXCYi65hG1uDhIyabkzKtWNerEdDABqP8EFWRBN/vmjVE0zvZeUJOWwjTi2PudBwKQYYc+y7TVVDGGRH5stNEAgZOxsKPH/SxK+HxIDzu3mfkIgdL4l+zgPlV5BRWozsJ6f+Ssi1M1kFbDVrVmnkT2y9/cWUeNWkNsOw9emrNDYvd1kIQmWb1vLpIh1/6b0/jJYnLwkXA0vI/ZATHKrTse6uFSc7QpT8iDpZ2ubIKxNNyx7bDJTwiSUqR8fOmqy6D4SDsB15ikrZhVJtNsyRo5DuBF9zC/5pH7Re6vhhrOol7ZlawtPz1x4=
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0072_01D62227.915516F0"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8bcec6c9-3bbc-47ec-57d3-08d7f02df20b
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2020 13:20:41.8620 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 2Fo+KluNOBiWLK6HpeKZLNx5tBIpDPcX2SNq7vkRoKLhwnsdfM2Lbo/Xz5kKQpJ3RphbFBL4Mk7UJyaXnOgJ1a5N3Qwiq1yEMKHtIyoj5Ck=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB3971
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/AshncSCsBlPh4aUfA_THEFBmESc>
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: Mon, 04 May 2020 13:20:48 -0000
Hello Jason, I was the original advocate of actions. At that point I had to fight to get actions into YANG at all. So I had to emphasize why they are different, why they are better. Replacing rpcs would have been a no go from the start. Also some people might have an aversion towards having 2 ways to do the same thing. In my world we avoid top level actions/rpcs altogether, so it was not important for me. But truly, these are not really strong arguments against top level actions. Regards Balazs From: netmod <netmod-bounces@ietf.org> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa) Sent: 2020. április 30., csütörtök 17:51 To: Reshad Rahman (rrahman) <rrahman@cisco.com>; netmod@ietf.org Subject: Re: [netmod] YANG action not allowed at root? Yes - the intent was to address the limitation that an RPC can only be at root. Actions can be out in a tree & nicely associated with something (e.g. instead of having a pile of flat RPCs with long names that encode containers like reset-www-xxx-yyy-zzz-entity). But I don't really understand why we limited actions from being at the root. It prevents a strategy of implementing all operations in a server (some of which may be desirable at root for various reasons, some of which may be desirable in the tree) as actions. Why not allow this? module bar { action do-stuff { input { leaf iterations { type uint8; } } } } } Which could be called from NETCONF like this: <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1..0"> <action xmlns="urn:ietf:params:xml:ns:yang:1"> <do-stuff xmlns="urn:example:bar"> <iterations>5</iterations> </do-stuff> </action> </rpc> Jason From: Reshad Rahman (rrahman) <rrahman@cisco.com <mailto:rrahman@cisco.com> > Sent: Thursday, April 30, 2020 11:31 AM To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com <mailto:jason.sterne@nokia.com> >; netmod@ietf.org <mailto:netmod@ietf.org> Subject: Re: [netmod] YANG action not allowed at root? I don’t know the history on this but the intent is to have action tied to a data node. https://tools.ietf.org/html/rfc7950#section-7.15 The difference between an action and an rpc is that an action is tied to a node in the datastore, whereas an rpc is not. When an action is invoked, the node in the datastore is specified along with the name of the action and the input parameters. Regards, Reshad. From: netmod < <mailto:netmod-bounces@ietf.org> netmod-bounces@ietf.org> on behalf of "Sterne, Jason (Nokia - CA/Ottawa)" < <mailto:jason.sterne@nokia.com> jason.sterne@nokia.com> Date: Thursday, April 30, 2020 at 11:08 AM To: " <mailto:netmod@ietf.org> netmod@ietf.org" < <mailto:netmod@ietf.org> netmod@ietf.org> Subject: [netmod] YANG action not allowed at root? Hi all, I was a bit surprised to find this in section 7.15 of 7950 recently: Since an action cannot be defined at the top level of a module or in a "case" statement, it is an error if a grouping that contains an action at the top of its node hierarchy is used at the top level of a module or in a case definition. I realize that actions can be placed down in a schema tree (i.e. sit in the context of a container or list), but why is it phrased that they *must* be in a container? RPCs are limited to being at the root. I would have thought actions could be anywhere (root or down in the tree). Jason
- [netmod] YANG action not allowed at root? Sterne, Jason (Nokia - CA/Ottawa)
- Re: [netmod] YANG action not allowed at root? Reshad Rahman (rrahman)
- Re: [netmod] YANG action not allowed at root? Sterne, Jason (Nokia - CA/Ottawa)
- Re: [netmod] YANG action not allowed at root? Balázs Lengyel
- Re: [netmod] YANG action not allowed at root? Christian Hopps
- Re: [netmod] YANG action not allowed at root? Martin Björklund
- Re: [netmod] YANG action not allowed at root? Juergen Schoenwaelder
- Re: [netmod] YANG action not allowed at root? Robert Varga
- Re: [netmod] YANG action not allowed at root? Per Hedeland
- Re: [netmod] YANG action not allowed at root? Rob Wilton (rwilton)
- Re: [netmod] YANG action not allowed at root? Juergen Schoenwaelder
- Re: [netmod] YANG action not allowed at root? Per Hedeland
- Re: [netmod] YANG action not allowed at root? Martin Björklund
- Re: [netmod] YANG action not allowed at root? Martin Björklund
- Re: [netmod] YANG action not allowed at root? Rob Wilton (rwilton)
- Re: [netmod] YANG action not allowed at root? Martin Björklund
- Re: [netmod] YANG action not allowed at root? Juergen Schoenwaelder