Re: [netmod] Action and RPC statements

Robert Wilton <> Tue, 31 October 2017 17:13 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9416013F9E3 for <>; Tue, 31 Oct 2017 10:13:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id nE6Qk--SOW9S for <>; Tue, 31 Oct 2017 10:13:00 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BFF8E13F9E5 for <>; Tue, 31 Oct 2017 10:12:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;;; l=2013; q=dns/txt; s=iport; t=1509469979; x=1510679579; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=fd8rDaDMYeSnD1vTZ0E5B7z1RsK9F5rv18+2w6qgKRI=; b=dRPuPBAUNMk2OhG4OJUai+oXM+7A6VqlxpqXbfPhxH7AZ0LBkHOEHD/n EEBlZ2AFbVs0HLVrmmPvxRc0n2SkNI6Fe1leA8CvBog6eoZz4ZTjAPTBS 4YgNiLid2feof0+RiWC3KQ5GWnAcTBP0JssUUTZwf8zForZi01zgLYUQK A=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.44,324,1505779200"; d="scan'208";a="698352356"
Received: from (HELO ([]) by with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2017 17:12:57 +0000
Received: from [] ( []) by (8.14.5/8.14.5) with ESMTP id v9VHCv7c021791; Tue, 31 Oct 2017 17:12:57 GMT
To: Martin Bjorklund <>,,, Randy Presuhn <>
References: <> <> <> <> <> <20171031151415.o45uexttym2eqp6n@elstar.local>
From: Robert Wilton <>
Message-ID: <>
Date: Tue, 31 Oct 2017 17:12:57 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <20171031151415.o45uexttym2eqp6n@elstar.local>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <>
Subject: Re: [netmod] Action and RPC statements
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 31 Oct 2017 17:13:03 -0000

On 31/10/2017 15:14, Juergen Schoenwaelder wrote:
> On Tue, Oct 31, 2017 at 02:14:20PM +0000, Robert Wilton wrote:
>> Is <operational> always the right datastore to evaluate RPC input/output
>> data relative to?  For most RPCs this seems to be the right choice by
>> default but it also seems plausible that someone may wish to define an RPC
>> that wants to validate its input parameters against the contents of another
>> datastore.
> Yes.
>> An example could be an "is-applied" RPC that takes a path to a subtree in
>> <running> or <intended> and checks whether the configuration for that
>> subtree is fully represented in <operational>.
> How is this different from say partial locks (RFC 5717)? Note that in
> your example, you carry an xpath value as part of the RPC invocation
> to the server and the RPC code on the server then is interpreting the
> xpath value; this is not the same has having an xpath expression in
> the definition of the RPC itself (e.g., as part of a constraint).
OK, thanks for the explanation, I get the distinction.

But what about if the input parameter was an instance-identifier (that 
you want to be resolved against the configuration datastore)? Wouldn't 
RFC 7950 section 9.13 + NMDA Sec 6.1 force that leaf in the input data 
to be resolved against <operational> instead?

> I believe we previously concluded that xpath expressions that are part
> of the schema definition of an RPC / action are evaluated against
> <operational>. I think this is a reasonable interpretation and we
> can't affort a vaguely defined xpath context here.
I don't think that it would necessarily be vaguely defined, instead it 
would be the description that defines the XPath context to use, 
defaulting to operational if not specified otherwise.

However, having said that, I can't think of a realistic example of when 
a must/when statement for an RPC against a configuration datastore would 
be useful ...


> /js