Re: [yang-doctors] XPath question

Martin Björklund <mbj+ietf@4668.se> Tue, 07 June 2022 06:34 UTC

Return-Path: <mbj+ietf@4668.se>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DD849C15AADF for <yang-doctors@ietfa.amsl.com>; Mon, 6 Jun 2022 23:34:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.11
X-Spam-Level:
X-Spam-Status: No, score=-7.11 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, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=0CxoQom3; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ImxMNnrT
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W8XejmrHmJpX for <yang-doctors@ietfa.amsl.com>; Mon, 6 Jun 2022 23:34:40 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 39723C15AADE for <yang-doctors@ietf.org>; Mon, 6 Jun 2022 23:34:35 -0700 (PDT)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BCEB45C006D; Tue, 7 Jun 2022 02:34:33 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 07 Jun 2022 02:34:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1654583673; x= 1654670073; bh=etE1D1lHNf76/OWyUCQ9YTZlc9PgRn1AWUnN5Ux6SH4=; b=0 CxoQom3U+VHcLry7isAVb8ZKdo3d7e1UZoF9bgwtXH2mu/AMcPHMVGfDobX+lNdY ZPRJpK/XC+lbaKT7vmHQCz9n5MfDk+XOKZGZ8Q0nC0l6IXhTwR0xr7mkUAAxBNyt om6+DO9r79F5itRQNd55K5niGxlxBHFEZNXkuvfCZpycjGALrh18GkaNwFPgrxi+ MTeJPrRkupLvw0XGFzaNywG5pOutxJuhYVp2Mkh8oq+g7A+XFsRQtijaYh116q59 x+fsrXhNfGZAZgNCzAFY7VcFa83pq5MMsV4UmMokE3paCQZSmm5j00kdowdSG78E WbTy4/H/yiU4T20WvRDEw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1654583673; x= 1654670073; bh=etE1D1lHNf76/OWyUCQ9YTZlc9PgRn1AWUnN5Ux6SH4=; b=I mxMNnrTqNUFcUoKqPJKAER1tVsYDlns+1wdZG+5tHFtYD9uCqRi6IQiC2fJf5OvD 5SB5dn1tF4ZTjrv1CEJAClbPEa78l8OHSG8nroHCwcxbeSl/ZNg+69wq9J/VcIwF +t5MQjrlTdb6kgq989UQ/367TNGvLV7vZZf+qhwoGcuDL/GoePl8ueJSdCB6QSUw v/uNZu6npCuI8GEbSI5LqMPmuJ2r0PWthuzRhjhcfovv44iGSRaXKXsgQCY9zY/Q JrDZnKYnUxC5RjDAGo3UnivjC1m733DnsPQXSMScZilhfM+eMaBv9pGRtusKo5nw yhjN3+l7/VD07NSuevehw==
X-ME-Sender: <xms:efGeYkR2JXFeS1joBJbF--d4dEMWRTQrwxfJI8oxXobJk-Gat_37Bg> <xme:efGeYhyP2huuJ5GrouajA44egpcAmsy4_jAAumL2b-jIYITwD1whUJSipbBiDLZhd fP7CHi4QIsopcvguIQ>
X-ME-Received: <xmr:efGeYh1v0mVnhaY-5y1rl4btp0EWhjjyiGFXPaau-je8m3Og55J8hUhCdVg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtgedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffkvfevuffhjghfofggtgfgse htjeertdertddvnecuhfhrohhmpeforghrthhinhcuuehjnphrkhhluhhnugcuoehmsghj odhivghtfhesgeeiieekrdhsvgeqnecuggftrfgrthhtvghrnhepheehhefhteeuueevgf fhfeeiheduvdetleevtdfglefgjeeiieeukeduvdetgeetnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgsjhdoihgvthhfseegieeikedrsh gv
X-ME-Proxy: <xmx:efGeYoDJDESK5iSmKqiXtIxrDF15yBP-jzECvbOwT1oIoNpCICEK2g> <xmx:efGeYtiPvnR5TYH5iMf8mOOlBFeTOaNReo_E1vLX-FDzhpwldvOYUg> <xmx:efGeYkrrZVbe_a52ReqmRjrdUW4XsynlOOxiWjyAJRxoTV7hjYvFcg> <xmx:efGeYtJyoQ3jwBuGTceAb9Olg6jgbfRIG0Hp1uaLLhj9xuEesRCicg>
Feedback-ID: icc614784:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jun 2022 02:34:32 -0400 (EDT)
Date: Tue, 07 Jun 2022 08:34:34 +0200
Message-Id: <20220607.083434.636080514128977187.id@4668.se>
To: andy@yumaworks.com
Cc: yang-doctors@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <CABCOCHQuBzG=e=VM+sxj9ACmar=DVeKDD=JYCP86LAXAvjBZyQ@mail.gmail.com>
References: <CABCOCHQuBzG=e=VM+sxj9ACmar=DVeKDD=JYCP86LAXAvjBZyQ@mail.gmail.com>
X-Mailer: Mew version 6.8 on Emacs 27.1
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/4ZC5oXEGhwGN3PAyjwrbP4V6tlw>
Subject: Re: [yang-doctors] XPath question
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Jun 2022 06:34:46 -0000

Andy Bierman <andy@yumaworks.com> wrote:
> Hi,
> 
> RFC 7950 does not say whether unselected case-stmts are visible in XPath.
> The bbf-qos-enhanced-scheduling module has a default leaf in 1 case
> and a nested node with a must-stmt in a sibling case that references it.

This will not work, since the XPath context in this case is the
datastore, and the datastore will never contain nodes from two
different cases.  But see below.

> The issue is whether the XPath context includes the default leaf.
> Case 'queue' and 'child-schedular-queues' are siblings.
> I suspect our code is wrong and the defaults from all cases are visible
> to XPath evaluation.
> 
> 
>           case queue {
>             description
>               "The children are a list of queues.";
>             leaf contains-queues {
>               type boolean;
>               *default "true";*
>               description
>                 "Indicates the scheduler contains queues.";
>             }
>             uses bbf-qos-tm:queues;
>           }
>           case child-scheduler-queues {
>             if-feature "child-scheduler-queue-references";
>             container child-scheduler-queues {
>               description
>                 "Configuration to reference one or more queues within
>                  one or more child schedulers.";
>               list child-scheduler {
> 
>                  // ....
> 
>                 container queues {
> 
> 
> * must "../../../../bbf-qos-sched:scheduler-node"                     +
> "[bbf-qos-sched:name=current()/../name]/"                     +
> "bbf-qos-sched:contains-queues = 'true'" *{
>                     error-message
>                       "The referenced scheduler must contain queues.";
>                     description
>                       "The referenced scheduler must contain queues
>                        in order for queues to be referenced.";
>                   }

I don't have the full model in front of me, but does this really refer
to a node in a sibling case?  It looks as if it might refer to another
instance of the "scheduler-node" list (I assume it is a list).


/martin