Re: [netmod] xpath for must statements

"Ivory, William" <william.ivory@intl.att.com> Wed, 08 August 2018 08:41 UTC

Return-Path: <william.ivory@intl.att.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 E260D130DD6 for <netmod@ietfa.amsl.com>; Wed, 8 Aug 2018 01:41:05 -0700 (PDT)
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, RCVD_IN_DNSWL_LOW=-0.7] autolearn=unavailable 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 Yub8hLVVpycR for <netmod@ietfa.amsl.com>; Wed, 8 Aug 2018 01:41:04 -0700 (PDT)
Received: from mx0a-00191d01.pphosted.com (mx0a-00191d01.pphosted.com [67.231.149.140]) (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 A5D1B12F1AB for <netmod@ietf.org>; Wed, 8 Aug 2018 01:41:04 -0700 (PDT)
Received: from pps.filterd (m0053301.ppops.net [127.0.0.1]) by mx0a-00191d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7874qGQ025310; Wed, 8 Aug 2018 03:14:43 -0400
Received: from alpi155.enaf.aldc.att.com (sbcsmtp7.sbc.com [144.160.229.24]) by mx0a-00191d01.pphosted.com with ESMTP id 2kqntedyns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Aug 2018 03:14:42 -0400
Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w787EfVE026688; Wed, 8 Aug 2018 03:14:41 -0400
Received: from zlp27127.vci.att.com (zlp27127.vci.att.com [135.66.87.31]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id w787EcDm026675; Wed, 8 Aug 2018 03:14:38 -0400
Received: from zlp27127.vci.att.com (zlp27127.vci.att.com [127.0.0.1]) by zlp27127.vci.att.com (Service) with ESMTP id 0D24F4048B4D; Wed, 8 Aug 2018 07:14:38 +0000 (GMT)
Received: from gbcdccas03.intl.att.com (unknown [135.76.180.11]) by zlp27127.vci.att.com (Service) with ESMTPS id B822D40002B8; Wed, 8 Aug 2018 07:14:37 +0000 (GMT)
Received: from GBCDCMBX03.intl.att.com ([135.76.31.134]) by gbcdccas03.intl.att.com ([135.76.180.11]) with mapi id 14.03.0399.000; Wed, 8 Aug 2018 08:14:36 +0100
From: "Ivory, William" <william.ivory@intl.att.com>
To: "Acee Lindem (acee)" <acee=40cisco.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] xpath for must statements
Thread-Index: AQHULpoKt9x7V9xDM0K8KDBrtthF9Q==
Date: Wed, 08 Aug 2018 07:14:35 +0000
Message-ID: <E3378E0605547F4E854DEE0CB1116AB03A8B6D@gbcdcmbx03.intl.att.com>
References: <3FBE6E06-3C42-4CFE-9A4C-FAC55572901C@cisco.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [135.76.180.249]
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-08_02:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=1 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=1 clxscore=1015 lowpriorityscore=0 mlxscore=1 impostorscore=0 mlxlogscore=229 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808080075
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9TRlSloZXN8554rlu4y7I_kgxuM>
Subject: Re: [netmod] xpath for must statements
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.27
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: Wed, 08 Aug 2018 08:41:06 -0000

On 07/08/18 23:01, Acee Lindem (acee) wrote:
Is it possible to indicate that choice statement must be specified in a YANG 1.1 “must” clause w/o specifying every case? Similarly, it is there a way specify that a container cannot be empty in “must” clause?
Thanks,
Acee

[to list this time ...]

For the second, just check the container has children:

    must "<path_to_container>/*";

Regards,

William