Re: [Netconf] In an update, when is a delete a delete?

Andy Bierman <andy@yumaworks.com> Thu, 18 May 2017 21:58 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E49E112E76A for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 14:58:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 Sxzw3wxZrK7H for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 14:58:22 -0700 (PDT)
Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 07FEB12E85E for <netconf@ietf.org>; Thu, 18 May 2017 14:52:54 -0700 (PDT)
Received: by mail-wm0-x22b.google.com with SMTP id d127so67166825wmf.0 for <netconf@ietf.org>; Thu, 18 May 2017 14:52:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=X0WDuyuJ9Hs1e9POdcx03ez/SomeZoWhK+w6SDsDAw4=; b=uot+Rw68T2lXRLZRK3t/qxvfhfE3nIoOpyS4rkfGP/Jq7shgcdA0tCCxH3VPFiR3jC pSZULb2T7PCPQo8wtGWZK4Af2VOQhag++UduGzztjLL/EouS9ZPw7MFa6j+RPveyI8KW WP3g1bMDVt56h3DBHag3xbNq1KNtK7LEyDm+UqgtEVqsjphrD+ecwEV8NyJmivQ5yPWV Brm831POGBoK3oM8v/u8Z+bkqVOdSJ0kEHxPktrRKGU0NiX8kILgXQWYHUwns20rbQBs 4xABGzNC8UKZzAtYoEIccdiFo3HJOLqgPSTfwSE+DBQTmSMQjFiHOWrWnGjD5F2aYzhw LmvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=X0WDuyuJ9Hs1e9POdcx03ez/SomeZoWhK+w6SDsDAw4=; b=eGabdPZpyRKoVxz7my0X9M5jkAXtlknCIuwZcdVisP55JMb6PV+fJGBWbQbqI8f//4 k8OfcZsTMZm3CgtmeLoOy8FWfTZBe6zY9xJhRMoGE67WxckWzKQs0g1B+Nx1tL0+ifpH mXTvSlxPt78kAGlWQDxvHmQp6JM5GALZaHLB+PzTRxdvRhU1K/ZwPj6mht0CBcRmGXS5 bLrEPaKT5iAJKbNty0K+U0iAB7do2H92V4Vu4ZwP4gGBXJFjdy/CxejvQIADELTwcIcR yGf1Q4GQkJULUom0UzJICMuy42V5ft0m+CvEAvReaLDlaSEOQveM1UuE85KJ6JJvOmhC s0Uw==
X-Gm-Message-State: AODbwcANOJ4TMYILHarkGwZjekhnPYIwvDOl3DjfK3No/ixtQZXiKGEG pL309S2lJnnQV2LWlkzETsuf+50E/nHg
X-Received: by 10.28.145.138 with SMTP id t132mr14708847wmd.136.1495144372567; Thu, 18 May 2017 14:52:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.155.2 with HTTP; Thu, 18 May 2017 14:52:51 -0700 (PDT)
In-Reply-To: <8340AFB7-350A-4641-A130-4114E39C73E1@juniper.net>
References: <8340AFB7-350A-4641-A130-4114E39C73E1@juniper.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 18 May 2017 14:52:51 -0700
Message-ID: <CABCOCHS-qYRJuvrDNj+CbL6p+cdt84Mc+a-P-MiqU4x=V814aQ@mail.gmail.com>
To: Kent Watsen <kwatsen@juniper.net>
Cc: Alexander Clemm <alexander.clemm@huawei.com>, Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="001a1145b1643721e6054fd36dfb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/7AdRHaSUU9Dh5LB1vfBnjc_aRmk>
Subject: Re: [Netconf] In an update, when is a delete a delete?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 May 2017 21:58:26 -0000

On Thu, May 18, 2017 at 2:15 PM, Kent Watsen <kwatsen@juniper.net> wrote:

> I'm unsure if this is a good example, but assuming you have data model
> snippet:
>
>
>
>   list foo {
>
>     key name;
>
>     leaf name { type string;}
>
>   }
>
>
>
> and the on-change subscription snippet:
>
>
>
>    /foo[name="x]
>
>
>
> and the following occurs in time:
>
>
>
>   T0: there are no 'foo' entries
>
>   T1: foo entry w/ name=="y" is created
>
>   T2: foo entry w/ name=="x" is created
>
>   T3: foo entry "x" is renamed to "z"
>
>   T4: foo entry "y" is renamed to "x"
>


Do you mean some proprietary non-standard rename operation?
Because NETCONF and RESTCONF have only delete(x) and create(y)


>   T5: foo entry "x" is deleted
>
>
>
> I'd expect:
>
>
>
>   T0: nothing
>
>   T1: nothing
>
>   T2: "x" created notification
>
>   T3: "x" modified-out notification
>
>   T4: "x" modified-in notification
>


T3 and T4 events are not possible in NETCONF or RESTCONF.
There is no way to rename a data node. These protocols will
produce delete(x) and a create(y) events


  T5: "x" deleted notification
>
>
>
> I think that this is your #2.
>
>
>
> Kent  // as a contributor
>
>
>
>
>


Andy


>
>
> On 5/17/17, 5:29 PM, "Netconf on behalf of Alexander Clemm" <
> netconf-bounces@ietf.org on behalf of alexander.clemm@huawei.com> wrote:
>
>
>
> Hello all,
>
>
>
> In updating the YANG-Push document (draft-ietf-netconf-yang-push), we
> have come across one issue that we wanted to raise with the working group.
>
>
>
> As part of an on-change subscription, update records reflect the type of
> change (e.g. whether the value of an object has changed, or whether an
> object was created or deleted); a subscription allows also to specify
> whether interested only in specific types of changes (for example, only
> creates and deleted but no value changes).
>
>
>
> At the same time, a subscription filter specifies which objects to include
> as part of a subscription and which not.  (Really, it is not so much of a
> “filter” on a stream that is generated independently of the filter, than it
> is a policy of which objects to include as part of subscribed update
> records.)   However, a subscription filter (such as XPath) can be used to
> also specify a value filter, which will include or exclude objects based on
> their current value. This makes it possible to e.g. subscribe to an object
> “foo” but only if its value is 5.
>
>
>
> Now, this means that the same object could be included in one update, but
> excluded in another update, due to its value no longer meeting the filter
> criteria.  For example, if foo’s value changes from 5 to 3 in one cycle, a
> periodic subscription will no longer include foo in its next update.  The
> question now concerns how to properly handle this in the case of an
> on-change subscription.
>
>
>
> One possibility concerns reporting the fact that “foo” no longer meets the
> subscription criteria and is no longer included in the update record as a
> “delete” event.  If foo’s value again becomes “5” at a later point in time,
> that would be reported as a “create” event.  If foo’s value changes again
> from 5 at a later point in time and then changes back to 3  before the time
> of the update (perhaps because the value changed during the dampening
> interval), it would be reported as another “delete” event (without ever
> reporting a create event).  On the other hand, if foo’s value changed from
> 3 to 6 and back again, nothing would be reported because it did not meet
> the filter criteria at any point in time.
>
>
>
> From the perspective of the receiver this may make sense if it is synching
> its copy of the state.  However, from the perspective of the publisher, the
> object was never created or deleted – only its value changed, and the case
> when the object was truly created or deleted can no longer be distinguished
> from the case when its value changed.  A “create” simply means “an object
> now meets a filter criteria, that was not reported in the previous cycle”
> (which does not mean that the object was actually created – it may have
> been created, or it may have simply undergone a value change).
>
>
>
> An alternative (let’s call it alternative 2) is therefore to make a
> distinction between whether an object was created or deleted, or whether
> its value fell in or out of a filter range.  This appears semantically
> cleaner.  However, it will require modifying the encoding to allow for
> distinction between those cases (currently, just plain patch encoding is
> used).
>
>
>
> A third alternative is to let filters select only data nodes to subscribe
> to, and separate out the value filter (or disallow it as a feature
> altogether).  This alternative has the drawback of being less conceptually
> powerful, even if it may be easier to implement.
>
>
>
> Thoughts?  Any preferences between 1, 2, and 3?
>
> --- Alex
>
>
>
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>
>