Re: [netmod] Action and RPC statements

Robert Wilton <rwilton@cisco.com> Tue, 31 October 2017 15:57 UTC

Return-Path: <rwilton@cisco.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 ED12B13F88C for <netmod@ietfa.amsl.com>; Tue, 31 Oct 2017 08:57:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
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: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 KQHrizwpZsxO for <netmod@ietfa.amsl.com>; Tue, 31 Oct 2017 08:57:07 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 80CEA13F82C for <netmod@ietf.org>; Tue, 31 Oct 2017 08:56:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2897; q=dns/txt; s=iport; t=1509465414; x=1510675014; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=TOwz1q+MSnZWbRprNwUKTP+63q9lItDP6fdO7H6nhxc=; b=enLECYGISchXhyCP5CUjyXtRmjAniO24QCpfdSgoHrdjI0GaryTWIYz/ jgGwqNWTfIGGTTdL1PxPewgef8fNx33YNUO/Qmzy+nOQnKr2YawM9S86Q ow4m+N6MXX7yj5Of5jD2Ho8D4gWNZgVS/34zK15+DqKBghQArNiDHTN3l Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0COAACcmPhZ/xbLJq1dDgsBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYUxhCOKH3SQH5ZCEIIBCoU7AoUwGAECAQEBAQEBAWsohR0BAQE?= =?us-ascii?q?DASMPAQVRCw4KAgImAgJXBgEMCAEBihcIqF6CJ4QVAYZ6AQEBAQEBAQMBAQEBA?= =?us-ascii?q?QEigQ+CH4NaghKDAYR5AoMrgmEFogaUfIt0hzqOJodsgTkfOIFrNCEIHRWDLoQ?= =?us-ascii?q?fBAE6QYwMAQEB?=
X-IronPort-AV: E=Sophos;i="5.44,324,1505779200"; d="scan'208";a="698351204"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2017 15:56:52 +0000
Received: from [10.63.23.63] (dhcp-ensft1-uk-vla370-10-63-23-63.cisco.com [10.63.23.63]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v9VFuqOQ006037; Tue, 31 Oct 2017 15:56:52 GMT
To: Kent Watsen <kwatsen@juniper.net>, Martin Bjorklund <mbj@tail-f.com>, "andy@yumaworks.com" <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>
References: <4d2030ca-3d75-72db-1afd-76a8597b615c@cisco.com> <c544a19e-2534-9355-002e-18affd12ea5a@alumni.stanford.edu> <CABCOCHQdmMYObMBCxP=qWuH3RdCRi9q7Y6G0VsSnDeyg2qLc4w@mail.gmail.com> <20171027.103341.1048835221774842137.mbj@tail-f.com> <9645422a-05a2-9d24-e50e-799d964f021f@cisco.com> <BA876AD7-A506-4D11-8F41-72D362BDB033@juniper.net>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <d93512fd-0fd7-3ea0-7bee-b855acb42ce7@cisco.com>
Date: Tue, 31 Oct 2017 15:56:51 +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: <BA876AD7-A506-4D11-8F41-72D362BDB033@juniper.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/--M_rWc9ezcFnorVNX1YLpeIEhA>
Subject: Re: [netmod] Action and RPC statements
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 31 Oct 2017 15:57:18 -0000


On 31/10/2017 15:35, Kent Watsen wrote:
> Hi Robert,
>
>> 6.2 Invocation of RPC Operations
>>
>> This section updates section 7.14 of RFC 7950.
>>
>> RPCs MAY be defined as affecting the contents of a specific datastore,
>> any configuration datastore (e.g., <edit-config>), or any datastore
>> (e.g., <get-data>).  The RPC definition specifies how the RPC input
>> data is interpreted by the server.
> s/MAY/may/? - is this draft providing for this, or should it come from
> e.g., RFC 7950?
I think that I prefer MAY because we are stating what RPCs are allowed 
to do, but don't feel strongly on this ...

>
>> RPCs definitions that do not explicitly state an affected
>> datastore(s) modify the general operational state of the server.
>> Hence, if any RPC input data relates to data node instances then
>> those would generally resolve to data node instances in the
>> <operational> data tree.
> I reordered first sentence, and added a comma to the second:
>
> RPCs modify the general operational state of the server, unless
> explicitly defined to affect other datastores. Hence, if any RPC
> input data relates to data node instances, then those would
> generally resolve to data node instances in the <operational>
> data tree.
Also OK with me.


>
>
>> 6.3 Invocation of Actions
>>
>> This section updates section 7.15 of RFC 7950.
>>
>> In YANG data models, the "action" statement may appear under "config
>> true" and "config false" schema nodes.  While instances of both
>> schema nodes may appear in <operational>, instances of "config true"
>> schema nodes may also appear in other datastores.
> okay
>
>> Actions are always invoked on a data node instance that exist in the
>> <operational> data tree.  The behavior defined by an action statement
>> is generally expected to affect the operational state of the server
>> rather than directly modifying the contents of any configuration
>> datastore.
> fixed plurality issue in first sentence, and removed wishy-washy
> language from the rest:
>
> Actions are always invoked on a data node instance that exists in the
> <operational> data tree.  Action statements affect the operational
> state of the server.
This wishy-washy language is the tricky bit:

i) Actions are allowed to have any operational impact on the device 
(just as RPCs are), their behavior is not constrained in any way.

ii) However, as far as I can see, it doesn't make sense for an action to 
directly affect the contents of any configuration datastore, that should 
be done via a purpose built rpc (like edit-config).

My text was aimed to allow (i) but not encourage (ii)  ...  If your text 
is sufficient for this then it is fine with me - I agree that it is 
simpler, and simpler is preferable.

Thanks,
Rob


>
>
> What do you think?
>
> Kent // contributor
>
>
>
>