Re: [Teas] [netmod] Issue with path statements in RPC

tom petch <ietfc@btconnect.com> Mon, 10 August 2020 09:39 UTC

Return-Path: <ietfc@btconnect.com>
X-Original-To: teas@ietfa.amsl.com
Delivered-To: teas@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F0D973A1474; Mon, 10 Aug 2020 02:39: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 MorjecZDQZ67; Mon, 10 Aug 2020 02:39:03 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2126.outbound.protection.outlook.com [40.107.21.126]) (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 9E6693A0BC9; Mon, 10 Aug 2020 02:38:51 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kVBpwfccC5WD9Nu961lgQ7EPzspt3OYAMj66UkuquhG695zp0y4WvlcXaNZ+BU9mSU2VmIwT+tiAQ4lt446slqhrRUtRm6/B7mdNkmdHJyRhchC2ArkqBPL/Jm7ZH+2BF2+Q3L2di83KGSZW0tFv7wwr3ouX5LRyhA+jVnEDhybyeFIKPvKCsqOV8d1Pcfon/73TWVqOhu4NXKDvIaRwnkD+1rNA4l+xRE7Cp3e7F3aQ3/9am+qmLpfsWPUIcI/3TOzZ7cA4LJoKqPkws3ysyd8xN75ZZtQu+v9ztoOYlxyh9ElzAxbE6WlfYjpnyIyT85my2InAFd7IaCjUqEQPVA==
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=XSAv+ExgeI2Y7G9Dt6acdltQwkm/SHWZLr9sTeKxSrw=; b=Tcvo3cu5Fbbyw/EB7hMpXPVXjDwCwPZ7OsHmN3WDJ7pghBdPy1ptmyyhdpjTOShPQd+b7hqKCkQQdqiciwby11tW6bfepBVciD4X1jn26TIAvZCwl5y8fYrojXp2/a+6BsFO7r/UUGGVUmZbTG6imJJrKrcNY5xM0zKX325/NY2wJvZcFcNTSEFiNbtp5ePHOEGh5vz/22q8bOIY+viiPwTN0LosX5IJC9HZsNqoqkh+VKJtwBnR4SxfME6srVGcdyrV/Z6yFvMc/JWY5j2cnKTLV5lVIyxFNlqQDe6bQOKxcUIfNUWkP4XcpFU5JNyBn9WTbR99KDt2nxHpFvlMsw==
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=XSAv+ExgeI2Y7G9Dt6acdltQwkm/SHWZLr9sTeKxSrw=; b=PNghpVeW4XhR1We6WBWePW0jv97czDU9vsWVFItUtbBmvkstGcuArDOxaotSyh3jNtiDBrQFCricvDx0QHI5ifS85tN1WPfnEIdWokFy2RYegq0JcOXTf68eiLK4VunCBJs6VcWACCuq1q8eshwYGP1VWrZJ9ow47TtuVKyHxws=
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com (2603:10a6:20b:134::11) by AM7PR07MB6627.eurprd07.prod.outlook.com (2603:10a6:20b:1ac::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.10; Mon, 10 Aug 2020 09:38:48 +0000
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::b570:437a:db46:400a]) by AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::b570:437a:db46:400a%9]) with mapi id 15.20.3283.014; Mon, 10 Aug 2020 09:38:48 +0000
From: tom petch <ietfc@btconnect.com>
To: =?Windows-1252?Q?Martin_Bj=F6rklund?= <mbj+ietf@4668.se>, "Italo.Busi@huawei.com" <Italo.Busi@huawei.com>
CC: "teas@ietf.org" <teas@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Issue with path statements in RPC
Thread-Index: AdZqMvZLkjbLs0OkQ3ec1fn/B/O1LQExRJaAAABcItA=
Date: Mon, 10 Aug 2020 09:38:48 +0000
Message-ID: <AM7PR07MB62482A5ECDECE168A9335545A0440@AM7PR07MB6248.eurprd07.prod.outlook.com>
References: <9c365f0d89ae4f9c9054eed5c4730d59@huawei.com>, <20200810.112423.1011687310446809904.id@4668.se>
In-Reply-To: <20200810.112423.1011687310446809904.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.35]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 48d4db36-a485-47fb-72cc-08d83d112f1a
x-ms-traffictypediagnostic: AM7PR07MB6627:
x-microsoft-antispam-prvs: <AM7PR07MB6627D7861636F8507E623A0AA0440@AM7PR07MB6627.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Gqo3j36TfrA045Gzbn/sBq0+509lDW/FKkQXGkVZkqoQa8qBcPlb42Te4Uw52pSNjnPJPQu2PggKZMdnInOa0EPduGr/vXqQ31pmbpzvP8+6p3w/Ng9dpBe4yVjNr/WJRQQAq/mAK1gOxqoB96Z55uKt7tG2xf4CGqSI7jB4vV/LHcEbPaQGJ+gCP2BR79VvA32qUPNB9ZYnDmSV7hHojupUs4EtlmAtMa4SJt02uscN47L8nH6TVWhhjJbzK9RXgnsoJfDVyKVSuhDoP0NEINY4yRUBqv3zUsBgY30UZW7wFex+6I+aHDxYgIIJ+PXGDa9JDd+GfhQr8NRQE5MmDObQivs7lfjqhHCAZ0iECA8CL2KVvhG/e2DCpwtZ8M9zV3IMdxMTH4KJGREbis9Afg==
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:(136003)(39860400002)(376002)(366004)(346002)(396003)(54906003)(4326008)(2906002)(8676002)(52536014)(55016002)(83380400001)(26005)(6506007)(7696005)(9686003)(71200400001)(66574015)(186003)(110136005)(966005)(33656002)(316002)(76116006)(91956017)(66946007)(8936002)(5660300002)(64756008)(15974865002)(478600001)(86362001)(66476007)(66556008)(66446008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: uDnhKcGZjQJmPKVHaVuatnM6QSc4ujYxi41zq5aJeZPIPsY8jWmOVFJHFzRLB5HQ/oD2MMu0Gi872na8JdR2khT7qtq0YQLQENLeym8/GpYfk5/0AqGqDT3D15F4CZpCpt3QjT6YlCO+YSMS+nEOhArT2WqMlcaHR8TQqoyvH7lTxpd5e8rV7/g4EWp+SVS1WVkAN/OJy8PEmbcAA6Sd0dkHLNBp42w2IEz0frJmYViAClP/RUEjSGYkX9PPubcy5JdGz2MgM4WG66AWAsy/Isr2PrhnrKxtmxCgIvKY5bJqBCLeSnxyM6JH+TUP9QsCt7/RtUrGhY3TNp1ykZpiDPVqKRnk81yp8EXH8T2OJDPIiT/NrebAPYp+H0NI7DKyEE3DGBS38jxPkzidyUfdyw1cS0FgsVYPKQSpJnKA8y4x7xE346l5Y0wOaObXGaI/so0Ywc5MphPrrNzXHFaMdp5Vw6TwFxRpRLqtRW3c1oJ5dVapojXK7b+hb/uJVltLh9VdR0pWDVM7gKHoUVzr3Up6HT7tpRTmUdZDhab/u362fn0GNRJ2LD1pEhMgRDH7bdUOEAf/VYOAVO6TKCqOkoZBAItbgvdIwCoXK3v2wnFZln+ecqsm/JvK6Ck1hBJAWj1LvJcsYLH/UFkjXqi0bg==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="Windows-1252"
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: 48d4db36-a485-47fb-72cc-08d83d112f1a
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2020 09:38:48.5661 (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: /t517VzRpON06L38NCD8+KXOLoK8s/DfVNgakkyvSJGm4uEKhCIb3KC4j05NXojAu3QD9C3NhanNk22YzFVGUw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6627
Archived-At: <https://mailarchive.ietf.org/arch/msg/teas/FKWG1z1M4m-zWGiFUhJdf8n5QvI>
Subject: Re: [Teas] [netmod] Issue with path statements in RPC
X-BeenThere: teas@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Traffic Engineering Architecture and Signaling working group discussion list <teas.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/teas>, <mailto:teas-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/teas/>
List-Post: <mailto:teas@ietf.org>
List-Help: <mailto:teas-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/teas>, <mailto:teas-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2020 09:39:06 -0000

From: netmod <netmod-bounces@ietf.org> on behalf of Martin Björklund <mbj+ietf@4668.se>
Sent: 10 August 2020 10:24

Italo Busi <Italo.Busi@huawei.com> wrote:
> We have found some issues with RPC XPaths when developing the YANG
> code for
> https://tools.ietf.org/html/draft-ietf-teas-yang-path-computation
>
> As discussed during the TEAS WG session in IETF 108, this issue has
> been raised on pyang github:
> https://github.com/mbj4668/pyang/issues/662
>
> It was also suggested to check with Netmod WG what should be the
> correct behavior according to RFC7950.
>
> The following code is accepted by pyang 1.75 but not by pyang 2.1:
>
>     type leafref {
>       path "/te:tunnels-path-compute/te:input/"
>          + "te:path-compute-info/"
>         + "te-pc:tunnel-attributes/te-pc:tunnel-name";
>     }
>
> The following code instead is accepted by pyang 2.1 but not by pyang
> 1.7.5:
>
>     type leafref {
>       path "/te:tunnels-path-compute/"
>          + "te:path-compute-info/"
>         + "te-pc:tunnel-attributes/te-pc:tunnel-name";
>     }

The leafref path is an XPath expression, which operates on the data
tree (instance data).  The "input" node is not present in the instance
data / data tree.  See section 6.4.1 of RFC 7950.

So the latter path (as verfied by pyang 2.1) is correct.

<tp>
Martin,

Thank you for the clarifications.  Just looking at the first issue, what gave me pause was section 9.9; the path statement is used to identify the referred leaf in the schema tree and 'input' is in the schema tree.  But I can see that 6.4.1 overrides that implication.

Tom Petch



> Moreover the following when statement, which is quite useful to
> constraint which information is provided by the RPC output based on
> some attributes in the RPC input, is accepted by pyang 1.7.5 but not
> accepted by pyang 2.1;
>
>   augment "/te:tunnels-actions/te:output" {
>     description
>       "Augment Tunnels Action RPC input with path delete result";
>
>     container path-computed-delete-result {
>       when "derived-from-or-self(../../te:input/te:action-info/"
>          + "te:action, 'tunnel-action-path-compute-delete')";
>       description "Path Delete RPC output";
>       leaf-list path-compute-transaction-id {
>         type string;
>         description
>           "The list of the transaction-id values of the
>            transient states that have been successfully deleted";
>       }
>     }   // container path-computed-delete-result
>   }   // path-delete rpc output
>
>
> Could you please help us to understand what is the correct behavior?
>
> In case the correct behavior is the one of pyang 2.1, our
> understanding is that it would not be possible to provide in YANG when
> constraints for the data nodes in the RPC output depending on specific
> values of the data nodes used in the RPC input. Therefore these
> constraints should be specified as behavior and implemented in the
> back-end.
>
> Is our understanding correct?

Yes, this is correct.  It is not possible to refer to the
corresponding "input" instance data in the XPath expressions for the
"output".


/martin


>
> Thanks for your help
>
> Sergio and Italo (on behalf of co-authors/contributors)
>
> Italo Busi
> Principal Optical Transport Network Research Engineer
>
> [cid:image001.jpg@01D5AC11.9575BB40]
> ____________________________________________________________________
>
> Huawei Technologies Italia S.r.l.
> Address: Centro Direzionale Milano 2, Palazzo Verrocchio, 20090
> Segrate (MI)
> Tel: +39 345 4721946 - Mobile:
> Italo.busi@huawei.com<mailto:Italo.busi@huawei.com>
>
> __________________________________________________________________________________
> Huawei Technologies Italia S.r.l. is a company registered in Italy at
> the Company Registration Office of Milan, with registered number
> 04501190963 and equity capital €3,000,000 fully paid up, whose
> registered office is in Milan, Via Lorenteggio 240, Tower A, 20147
> Milan, Italy. Huawei Technologies Italia S.r.l. is 100% owned by
> Huawei Technologies Cooperatief U.A.
> CONAI Reg. No. cc 12639454 - A.E.E. Registry No. IT10010000006521 -
> Batteries and Accumulators Registry No. IT12050P00002839.
> ________________________________________________________________________________________________________________________
> This e-mail and its attachments contain confidential information from
> HUAWEI, which is intended only for the person or entity whose address
> is listed above. Any use of the information contained herein in any
> way (including, but not limited to, total or partial disclosure,
> reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error,
> please notify the sender by phone or email immediately and delete it!
> Thank you.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> PRIVACY NOTICE: Pursuant to Art. 13 of the General Data Protection
> Regulation 2016/679 (GDPR), Huawei Technologies Italia S.r.l. informs
> you that the personal data contained in this email will be collected
> and treated for the acquisition of information preliminary to the
> conclusion of contracts, for the definition of the contractual
> relationship, as well as for the fulfillment of legal requirements
> related to civil, tax and accounting law or any other legal obligation
> to which Huawei may be subject. Personal data will not be subject to
> disclosure and spread unless otherwise required by law. Huawei will
> take appropriate security measures to protect personal data against
> loss, misuse disclosure or destruction of the information. Personal
> Data held may be transferred to countries outside the European Union,
> however Huawei Italia has put in place appropriate safeguards for the
> transfer of personal data to third countries by adopting the standard
> data protection clauses of the EU Commission. Personal Data are kept
> for a period necessary for the fulfillment of contract obligations
> unless otherwise required by law. You can exercise your rights under
> Art. 15 and following of the GDPR (i.e. right of access,
> rectification, erasure, restriction, portability, object) by
> contacting Huawei at this email address:
> dataprotection@huawei.com<mailto:dataprotection@huawei.com> or through
> the following channel:
> www.huawei.com/en/personal-data-request<http://www.huawei.com/en/personal-data-request>st>. You
> have also the right to lodge a complaint with the competent
> supervisory authorities. If you need any further information or have
> any queries on how Huawei process your personal data, please send an
> email to our Data Protection Officer at
> dpo@huawei.com<mailto:dpo@huawei.com>.The Data Controller is Huawei
> Technologies Italia S.r.l. with registered office in Milan, Via
> Lorenteggio 240 Tower A, 20147.
>
>
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod