Re: [netmod] netmod-revised-datastores: templates, interactions with RFC6243 'report-all'

Ladislav Lhotka <lhotka@nic.cz> Wed, 22 February 2017 07:42 UTC

Return-Path: <lhotka@nic.cz>
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 3670C129480 for <netmod@ietfa.amsl.com>; Tue, 21 Feb 2017 23:42:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.001
X-Spam-Level:
X-Spam-Status: No, score=-7.001 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, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 mP3doMQ1xdka for <netmod@ietfa.amsl.com>; Tue, 21 Feb 2017 23:41:59 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B623C129444 for <netmod@ietf.org>; Tue, 21 Feb 2017 23:41:58 -0800 (PST)
Received: from [IPv6:2001:718:1a02:1:9c79:a626:b15c:e422] (unknown [IPv6:2001:718:1a02:1:9c79:a626:b15c:e422]) by mail.nic.cz (Postfix) with ESMTPSA id CAB0F60180; Wed, 22 Feb 2017 08:41:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1487749315; bh=F223aru5+hAIWMRdt+f9W+PHBAPXxCD861jmBy8OGW0=; h=From:Date:To; b=jDkBXP2APUISplTwwnxcCB6hKHvz3wApKwoeemYA1/nq1+NUhj/SphVJUldVVv4dd 2enms1P77PZ2vwxIhBz5sWMm2zYuFhpNjGgd09u6/wxyZDjSA3nNmpwGAhtEEtuKXU /rfdLO+Nv5sqX7NcvjItS1EpMHLzmgTshzwHCyxc=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20170222065942.GA43615@elstar.local>
Date: Wed, 22 Feb 2017 08:41:55 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <4415860C-AC4B-418B-B1FB-9E14F7E710B2@nic.cz>
References: <43B527B5-3C59-452E-9C2D-6A4CF681607E@juniper.net> <m21suthwtk.fsf@birdie.labs.nic.cz> <77633AB4-F300-4036-8255-BCF909FBF0EB@juniper.net> <858A1C84-1A66-4926-B8BD-80B07DDB43DE@nic.cz> <HE1PR07MB0843BAFFC40FEEB6FA9D01059B500@HE1PR07MB0843.eurprd07.prod.outlook.com> <20170222065942.GA43615@elstar.local>
To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3259)
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/sYcuR3oNiJh2LjM8bsQSiyB59BA>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] netmod-revised-datastores: templates, interactions with RFC6243 'report-all'
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 22 Feb 2017 07:42:01 -0000

> On 22 Feb 2017, at 07:59, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> On Wed, Feb 22, 2017 at 03:02:08AM +0000, Sterne, Jason (Nokia - CA) wrote:
>> I think that an implementation that supports templates can indeed have the situation where the running is not valid.  The template (when expanded) may provide data that completes the data in a way that makes it valid.
>> 
>> I can see how it is intuitive to consider that validation happens after template expansion.  But it does break the letter of the RFC.
>> 
> 
> Templates are interesting since (a) template data should be valid and
> (b) the expanded config should be valid. My understanding is that both
> are desirable.

Agreed, but either may then need a different data model. For example, where "yang-identifier" leaf is permitted in expanded data, a template may use globs or regular expressions (that's one way of templating I know from CLIs).  

> 
> The RFCs do not talk about templates and hence people seem to have
> different interpretations and I do not think it valid to say that
> interpretations break the letter of the RFC. (And I think it would
> help if you point to the RFC statements that you think clarify
> template behaviour.)

So far the idea has been that a data model (i.e. YANG Library and modules listed therein) encompasses basically all data that a server deals with. So, for example, RFC 7950 says that all data trees must satisfy certain conditions. This will no more be the case with templates, at least not with the same data model.   

> 
> The WG needs to decide what the expectations are for templates and
> whether validity of templated config means just (a), just (b) or both
> (a) and (b). I actually think it should be (a) and (b) but there might
> be implementations that only do (a) or only do (b).

We now have:

1. YANG as a language for specifying schema, datatypes and constraints.

2. YANG library as a means for composing YANG modules into data models.

What's IMO needed is

3. a formalism for binding data models to specific checkpoints in a network management workflow (such as intended or ephemeral datastore). Different use cases may have different datastores and workflows, and that's why I believe this has to be "parametrised".

RFC 6020/7950 does #3 in a relatively rigid way that really works only for the NETCONF protocol (which was of course the original aim).

Lada

> 
> /js
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67