[netmod] Reset tags RPC [was Re: Action and RPC statements]

Robert Wilton <rwilton@cisco.com> Mon, 06 November 2017 17:08 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 52C9013FBEF for <netmod@ietfa.amsl.com>; Mon, 6 Nov 2017 09:08:24 -0800 (PST)
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 X3nDKuAT8TmF for <netmod@ietfa.amsl.com>; Mon, 6 Nov 2017 09:08:22 -0800 (PST)
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 247A913FB6E for <netmod@ietf.org>; Mon, 6 Nov 2017 09:08:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3879; q=dns/txt; s=iport; t=1509988102; x=1511197702; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=8rkoJH8+44orwRi7Ppt3CkAv4gStxX1A8C4tNHWl6po=; b=Ff7bvfX8QuL5zEjbTWq88OlB8g9iBiS/ZBpx896eHH/desLybxNiWpYI NjabIh5WJTPsOsWHSevLNykhOz/Y3GdJUv3Mcl5RSw8xZt0bFwdKM3B/E M48KJ/J3kwGZR4MEkJfEfVIvZkWCVOJ0kQi17aWQDcS/HeNHuWzhCwR5s s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0COAABAlgBa/xbLJq1cGQEBAQEBAQEBAQEBBwEBAQEBhQYng32KH3SQJZZGEIIBCoU7AoUnGAEBAQEBAQEBAWsohR4BAQQBIw8BBVEZCgICJgICVwYBDAYCAQEXigAIqyOCJ4sMAQEBAQEBAQECAQEBAQEBIoEPgh+DWoISgwGEeoMsgmIFog6Bb5MNi3iHPI4ph22BOR84gWw0IQgdFUmCZIRfQTaLdgEBAQ
X-IronPort-AV: E=Sophos;i="5.44,353,1505779200"; d="scan'208";a="102218"
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; 06 Nov 2017 17:08:19 +0000
Received: from [10.63.23.76] (dhcp-ensft1-uk-vla370-10-63-23-76.cisco.com [10.63.23.76]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id vA6H8JBY020030; Mon, 6 Nov 2017 17:08:19 GMT
To: Lou Berger <lberger@labn.net>, netmod@ietf.org
References: <CABCOCHS+g45H7P8nZ7tUQeW5Q=xXQRm7kQJWwsfG8PrR-DERSQ@mail.gmail.com> <20171106.141924.996087392255055625.mbj@tail-f.com> <15f9188b728.27d3.9b4188e636579690ba6c69f2c8a0f1fd@labn.net> <20171106.154913.1683303692062360930.mbj@tail-f.com> <15f91db9dd0.27d3.9b4188e636579690ba6c69f2c8a0f1fd@labn.net> <5c1d29df-4cdf-4972-5a11-0a111177bf93@cisco.com> <15f92077478.27d3.9b4188e636579690ba6c69f2c8a0f1fd@labn.net> <f4cf2723-af37-c0ba-be28-ccb635ee9b4a@cisco.com> <a6eac745-0784-daa2-103a-1c4b28990f51@labn.net>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <d770cd03-a62c-02d5-cfbc-647dad28c8f7@cisco.com>
Date: Mon, 06 Nov 2017 17:08:19 +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: <a6eac745-0784-daa2-103a-1c4b28990f51@labn.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/64MTJoQbt2pfslbXTbUZmpnXJns>
Subject: [netmod] Reset tags RPC [was Re: 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: Mon, 06 Nov 2017 17:08:24 -0000

Renaming this sub thread to avoid confusing the main discussion.


On 06/11/2017 16:48, Lou Berger wrote:
> On 11/06/2017 11:41 AM, Robert Wilton wrote:
>>
>> On 06/11/2017 15:51, Lou Berger wrote:
>>>
>>> On November 6, 2017 10:21:19 AM Robert Wilton <rwilton@cisco.com> wrote:
>>>
>>>> Hi Lou,
>>>>
>>>> All of proposed solutions (A through D) allow the action or the RPC to
>>>> perform whatever behaviour that it wants.
>>>>
>>>> This issue is only about which datastore is used to evaluate and check
>>>> that the parameters for the action/rpc are valid.  E.g. if the
>>>> parameters use when, must, leaf-ref, or instance-identifier.
>>>>
>>>> So, to take option "A" for example: "A.  Always use <operational> for 1
>>>> and 2."
>>>>
>>>> One can still define a RPC that modifies another datastore ("edit-data"
>>>> in the NETCONF NMDA  draft is one such example).  But to check whether
>>>> the edit-data request can be performed, any input parameter constraints
>>>> would be evaluated against <operational>.  However, given that the input
>>>> parameters to edit-data don't contain any when, must, leaf-ref, or
>>>> instance-identifier statements then it makes absolutely no functional
>>>> difference which the datastore the parameters are evaluated in, since
>>>> the result will always be the same regardless.  But perhaps it just
>>>> feels a little odd that they are conceptually evaluated against
>>>> operational, even though the RPC only even affects one of the editable
>>>> configurable datastores.
>>>>
>>>
>>> Yes, which is why I've been assuming we'd end up with c.
>> But I think that to do C properly also requires a new optional statement
>> in YANG to indicate where the Action/RPC parameters are evaluated (with
>> the default being <operational> if the new statement isn't specified).
>>
>> Most RPCs/Action statements seem to naturally apply to <operational>.
>>
>> For the RPCs/Action statements that don't naturally apply to
>> <operational>, it seems that it mostly doesn't matter where the
>> parameters are evaluated.
>>
>> At the moment, the set of remaining RPCs/Actions (don't apply to
>> <operational> but do care about parameter evaluation) seems quite small:
>>   (i) RFC7517, if it defined a YANG model for the <partial-lock> RPC
>>   (ii) A partial datastore diff from a subtree in <intended> to
>> <operational> might be another - it would want an instance-identifier
>> path to the subtree in <intended>.
>>   (iii) Perhaps I2RS and dynamic datastores may also throw up some new
>> examples.
> The tags draft has an RPC to 'reset to default state'.  I could see
> wanting the reset to be persistent or not depending on actual usage...
OK, I don't understand why this RPC is needed at all.

If the tags are managed through config (which I think that they are), 
then calling the "reset to default state" RPC should be equivalent to a 
normal list entry delete for that module anyway.

Why do you need two methods to achieve the same thing?  Or does this RPC 
do something slightly different?

Personally, I think that it would be better if the only way of editing 
configuration is through an <edit-config/edit-data> RPC.

A couple of other nits on the tags draft:
  - the tree diagram in 6.1 doesn't cover the config, perhaps it is out 
of date.
  - I would put list module-tags into a container (e.g. to make it 
easier to delete, or replace, all tag information).
  - do the configured tags replace the devices list or merge with them 
(perhaps this could be clarified)?  If merge, then presumably you also 
need a way to delete existing entries.  E.g. perhaps "grouping 
module-tags" also needs a separate leaf-list of tags to delete (really 
hide) from the implementation?

Thanks,
Rob


>
> Lou
>> Thanks,
>> Rob
>>
>>
> .
>