[netmod] Query about invalid XPATH paths in YANG

William Ivory <wivory@Brocade.com> Mon, 23 January 2017 17:19 UTC

Return-Path: <wivory@Brocade.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 281FE129690 for <netmod@ietfa.amsl.com>; Mon, 23 Jan 2017 09:19:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 5Licz5Fxyq53 for <netmod@ietfa.amsl.com>; Mon, 23 Jan 2017 09:18:59 -0800 (PST)
Received: from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com [IPv6:2620:100:9001:7a::1]) (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 511361295A7 for <netmod@ietf.org>; Mon, 23 Jan 2017 09:18:59 -0800 (PST)
Received: from pps.filterd (m0000542.ppops.net [127.0.0.1]) by mx0a-000f0801.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v0NH7RBY001974 for <netmod@ietf.org>; Mon, 23 Jan 2017 09:18:59 -0800
Received: from brmwp-exmb12.corp.brocade.com ([208.47.132.227]) by mx0a-000f0801.pphosted.com with ESMTP id 285nmjr4jj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <netmod@ietf.org>; Mon, 23 Jan 2017 09:18:58 -0800
Received: from EMEAWP-EXMB12.corp.brocade.com (172.29.11.86) by BRMWP-EXMB12.corp.brocade.com (172.16.59.130) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 23 Jan 2017 10:18:57 -0700
Received: from EMEAWP-EXMB11.corp.brocade.com (172.29.11.85) by EMEAWP-EXMB12.corp.brocade.com (172.29.11.86) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 23 Jan 2017 18:18:56 +0100
Received: from EMEAWP-EXMB11.corp.brocade.com ([fe80::85ea:b7da:48dd:1640]) by EMEAWP-EXMB11.corp.brocade.com ([fe80::85ea:b7da:48dd:1640%21]) with mapi id 15.00.1210.000; Mon, 23 Jan 2017 18:18:55 +0100
From: William Ivory <wivory@Brocade.com>
To: "netmod@ietf. org netmod@ietf.org netmod@ietf. org (netmod@ietf.org)" <netmod@ietf.org>
Thread-Topic: Query about invalid XPATH paths in YANG
Thread-Index: AdJ1m9ZZTDt+X1fUS2y3zpVZg/3VlQ==
Date: Mon, 23 Jan 2017 17:18:31 +0000
Deferred-Delivery: Mon, 23 Jan 2017 17:18:09 +0000
Message-ID: <f92db8a7b45f4d15b3fa2800b3bb8c61@EMEAWP-EXMB11.corp.brocade.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.252.48.7]
Content-Type: multipart/alternative; boundary="_000_f92db8a7b45f4d15b3fa2800b3bb8c61EMEAWPEXMB11corpbrocade_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-23_15:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1031 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701230222
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ICIovcZ3NhlRWW5f6d_XeYFr-tM>
Subject: [netmod] Query about invalid XPATH paths in YANG
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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, 23 Jan 2017 17:19:00 -0000

Hi,

I'd appreciate clarification on whether a YANG path in an XPATH statement in a must or when statement must point to a valid YANG path or not.  You might wonder why we'd have an invalid path (as opposed to one that's simply not configured right now) but it is occasionally helpful when sharing groupings.  (Possibly we should remodel the YANG but that's another matter!).

As a simple example, is the following allowed?

Container foo {
        Leaf bar {
                Type string;
                Must "not(../nonExistentSiblingNode)";
        }
}

I don't see that this should be any different to a must statement path pointing to an unconfigured node, returning an empty nodeset in both cases.

The reason I ask is that we are seeing a NETCONF client differentiating between unconfigured (ok) and non-existent (error) cases.  It would be useful to know one way or the other, ideally with a pointer to the relevant part of the spec that makes this clear.

Thanks,

William