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

"Eric Voit (evoit)" <evoit@cisco.com> Fri, 26 May 2017 20:15 UTC

Return-Path: <evoit@cisco.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 2A095129B4C for <netconf@ietfa.amsl.com>; Fri, 26 May 2017 13:15:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 rjB-E3VyfRua for <netconf@ietfa.amsl.com>; Fri, 26 May 2017 13:15:33 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0487A1287A5 for <netconf@ietf.org>; Fri, 26 May 2017 13:15:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8883; q=dns/txt; s=iport; t=1495829732; x=1497039332; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=MvUdayoV9tajxNI4R75liVQyJYp6x/U7WvBiqodclQA=; b=lwX2c6DH8v/xXFo9IQ4lBUu61lPnZc4Lb38S6TPvvYTl9kvHSLD6ETdh 4YCme9ZX7dAm9SLhrhfaZLGFllF+GXi3rLOGwZ+f1CM8M1+/XbA+vVzQ/ i11xZCiKP3fbkm0cdsLX9/NN8VT2geyC3oyvBELrrdAwMTUq0nCrXUL94 E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CYAAA7jChZ/5ldJa1TCRkBAQEBAQEBAQEBAQcBAQEBAYNVYoENB44AkWVylQeCDyELhS5KAoMKPxgBAgEBAQEBAQFrKIUYAQEBAQIBAQEMLCsJCwULAgEIDgcDDREQJwslAgQOBQiKGggQrSeLUgEBAQEBAQEBAQEBAQEBAQEBAQEBAR2GYYFfAYJrNIRCTYVMBZ4jAYcfi3+CD49xiQGLTAEfOIEKdBVGhwJ2hk4rgQOBDQEBAQ
X-IronPort-AV: E=Sophos;i="5.38,399,1491264000"; d="scan'208";a="248517531"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2017 20:15:31 +0000
Received: from XCH-RTP-012.cisco.com (xch-rtp-012.cisco.com [64.101.220.152]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id v4QKFVLj010843 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 26 May 2017 20:15:31 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-012.cisco.com (64.101.220.152) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 26 May 2017 16:15:30 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1210.000; Fri, 26 May 2017 16:15:30 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>, "alexander.clemm@huawei.com" <alexander.clemm@huawei.com>
Thread-Topic: [Netconf] In an update, when is a delete a delete?
Thread-Index: AdLPVDqN5ppCqKOrQVCrK5qvBNQM2AAiVy4AANCNThAADN/oAAAg/5SAAA4QmwAAAGPesAAcMVmAAB8SZAAAFoFiAAAA+6UAAC9AgYAAAM0O4AAMLNwAAAJX7AAAAeCXIA==
Date: Fri, 26 May 2017 20:15:30 +0000
Message-ID: <7618ac2330394709ac9a9389e1f933cc@XCH-RTP-013.cisco.com>
References: <20170526.101057.754042735295345457.mbj@tail-f.com> <876eb733a0c8419da4dfc0dfb6858371@XCH-RTP-013.cisco.com> <20170526.162230.279705680178245042.mbj@tail-f.com> <20170526.172936.41395960352343450.mbj@tail-f.com>
In-Reply-To: <20170526.172936.41395960352343450.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.228]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/5GX0FU2nSCZyHkc_Uqzo6kYyf64>
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: Fri, 26 May 2017 20:15:37 -0000

Hi Martin,

Good discussion.  Some thoughts in-line...

> From: Martin Bjorklund, May 26, 2017 11:30 AM
> 
> Hi,
> 
> See below for a correction.
> 
> Martin Bjorklund <mbj@tail-f.com> wrote:
> > Hi,
> >
> > "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> > > Hi Martin,
> > >
> > > There are two differences in what we are describing:
> > > (#1) Do we have a parent identity which spans both the test filter
> > > types and the selection filter types
> > > (#2) Should we expose additional filter parameters within the YANG
> > > model
> > >
> > > For (#1), I see no harm in providing a parent identity.
> >
> > I do, since there is no benefit in a common parent identity.  It just
> > adds complexity to what's really a simple model.

There are three options for traversing the filter criteria subtyping:
(a) filter sub-typing defined by a multi-tier identity hierarchy
(b) explicit subtyping for selection vs. test, with independent identity sets
(c) explicit subtyping for all current and future types of filters

If we ever use (a) in any form, there is value in a parent identity.  As the current working draft is based (b), I will pull it out.  We can always re-add in parallel with (b) if someone expresses a business need.

> > > Perhaps your
> > > concern is documentation compatibility with what was previously
> > > driven by 5277?
> >
> > No.
> >
> > > If that is the case, we could rename the top level filter to
> > > "evaluation-criteria".  This would free up "test-filter" to be
> > > renamed to "filter".  If this is ok, below is what is in the might
> > > be included in subscribed-notifications.  I believe matches to what
> > > you are suggesting, with the exception of the top level
> > > evaluation-criteria identity.
> > >
> > >   identity evaluation-criteria {
> > >     description
> > >       "Base identity for representing types of filtering or selection
> > >       syntaxes which may be applied against some target.";
> > >   }
> > >   identity filter {
> > >     base evaluation-criteria;
> > >     description
> > >       "Evaluation criteria used as a pass/fail test against events.  A
> > >       boolean true, or a non-null result of a node
> > >        selection will allow events to traverse the filter.";
> > >   }
> > >   identity subtree-filter {
> > >     base filter;
> > >     description
> > >       "A RFC-6241 based filter which attempts to select nodes within an
> > >       event.  A successful
> > >        selection of any nodes results in a positive test result.";
> > >     reference "RFC-6241, #5.1";
> > >   }
> > >   identity xpath-filter {
> > >     base filter;
> > >     description
> > >       "A filter applied to an event which follows the syntax specified in
> > >       yang:xpath1.0. Success
> > >        is indicated by either a positive boolean result, or a non-null node
> > >        selection.";
> > >     reference "XPATH: http://www.w3.org/TR/1999/REC-xpath-19991116";
> > >   }
> > >
> > >
> > > For (#2), within the YANG model we expose a target for the
> > > evaluation-criteria (i.e., a stream or datastore) and the anydata.
> > > I don't think we should try for more.  The subscription
> > > specifications are complex enough already.
> > >
> > > If we try to break out additional parameters from the opaque anydata
> > > (either selector or filter), there is going to be a desire to break
> > > out even more parameters.  And then there will be attempts to codify
> > > valid interplays with these parameters.
> >
> > I don't understand what this means.  Maybe you can provide an example
> > by using my proposal below?

Looking at your regexp example, I now see that by 'parameters', you also meant that you wanted a different yang object type for each type of supported filter.  I.e., you want (c).  My earlier interpretation was that you wanted (b) with additional parameters to break down the contents and interworkings of a common anydata event filter object.

The explicit subtyping with different object types that you have below close to what we had up through yang-push draft -v04 (minus your addition of the case regexp & dialect parameter).   Draft -v05 went the other way to (a) by minimizing the number and potential growth of filter object types via the addition of the filter-type.  Working draft -v06 is of (b), and is attempting to balance these needs.  The cost of both (a) and (b) is that we have a new object type, and the application must validate the filter-type syntax -- foregoing datatype enforcement by the model.  But as the application will need to do its own syntax checks for the enforcement for platform specific filtering capabilities anyway, this doesn't seem to be a bad tradeoff.

BTW: I also would have also leaned towards explicit subtyping of option (c) if it were definitively possible to know whether a platform could support a specific filter back at the subscriber.  But all filters will still need publisher validation, so yang data-type enforcement provides only minimal protections.   

So with (b) vs (c), it feels like we are coming a model style preference.  I have a preference for (b): the one with fewer object types, and the one where it is the identities which might grow over time.  If we remain with (b), the interface specification should be less verbose.

> > > There are many lifetimes of
> > > complexity here.  Your example of regexp is an excellent one, look at:
> > > https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engin
> > > es it is hard for even a wiki page to maintain links to the
> > > variations.
> >
> > This is completely missing my point, which has to do with how filter
> > parameters are specified for new filters; not that there are many
> > regexp dialects.
> >
> > > If someone has a proposal for how to parameterize these filtering
> > > criteria simply, I would love to listen.  Note: Such a proposal may
> > > not disrupt other vendor syntaxes which can be transparently
> > > supported via the anyxml.  Absent such a proposal, we should leave
> > > the specifics up to implementations for now.
> >
> > [...]
> >
> > > Vendors will have to specify valid examples of what will be
> > > formatted within their anyxml.
> >
> > Specification by example is not very appealing IMO.   Ok, here's a
> > proposal for how to do this:

This is helpful.  I now understand what you are proposing.

> >   leaf filter-type {
> >     mandatory true;
> >     type identityref {
> >       base filter;
> >     }
> >   }
> >   choice filter-parameters {
> >     mandatory true;
> >     case subtree-parameters {
> >       when 'derived-from-or-self(../filter-type,
> >                                  "sn:subtree-filter")';
> >       anydata subtree {
> >         description "<copy text from 5277>";
> >       }
> >     }
> >     case xpath-parameters {
> >       when 'derived-from-or-self(../filter-type,
> >                                  "sn:xpath-filter")';
> >       leaf xpath {
> >         type yang:xpath1.0;
> >         description
> >           "<explain the XPath context, copy text from 5277>";
> >       }
> >     }
> >   }
> >
> > Now, if a vendor/sdo wants to add a new filter type, it can be done
> > like this:
> >
> >   identity regexp-filter {
> >     base "sn:filter";
> >     description
> >       "...";
> >   }
> >   augment "/sn:filters/sn:filter/sn:filter-parameters" {
> >     when 'derived-from-or-self(../filter-type,
> >                                "rx:xpath-filter")';
> 
> Here there should be a case:
> 
>   case regexp-parameters {
> 
> >     leaf regexp-dialect {
> >       type enumeration {
> >         enum "xsd";
> >         enum "posix";
> >         ...
> >       }
> >     }
> >     leaf regexp-expression {
> >       type string;
> >     }
> 
>   }

I like this augmentation structure.  With this, it is possible for vendor specific augmented objects to be added the model, versus parameters being embedded in the anydata.  Augmentations like this can be done with (b) too should people agree on filter parameters needing to be exposed.  Hopefully type of augmentation this can hold us until the time someone picks up filters holistically.

Eric  

> >   }
> >
> 
> 
> /martin
> 
> 
> 
> >
> > Once we have this, we can simplify by removing the identity; it isn't
> > really necessary.  (IIRC this was suggested by Juergen earlier in this
> > thread.)
> >
> >
> >
> > /martin
> >
> >
> >
> >
> > _______________________________________________
> > Netconf mailing list
> > Netconf@ietf.org
> > https://www.ietf.org/mailman/listinfo/netconf
> >