Re: [netmod] Design-Time schema mount
Ladislav Lhotka <lhotka@nic.cz> Fri, 26 August 2016 13:19 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 6D4C112D8A0 for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 06:19:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.548
X-Spam-Level:
X-Spam-Status: No, score=-7.548 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.548] 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 I-VVm5mOB-Eq for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 06:19:12 -0700 (PDT)
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 5988D12D8E8 for <netmod@ietf.org>; Fri, 26 Aug 2016 06:12:04 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:d83f:ce1e:8e18:81a0] (unknown [IPv6:2001:718:1a02:1:d83f:ce1e:8e18:81a0]) by mail.nic.cz (Postfix) with ESMTPSA id 9FB6061DA2; Fri, 26 Aug 2016 15:12:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1472217122; bh=x9W2OcFRIyTurl7/dKLZpRMuymfnAPLDXrZkGo2+4xA=; h=From:Date:To; b=utln51pH6btOjfak2uf0IQ2QZo6I1rPlu4r0sQfWGGVL3BVwdaZYueSPow2ZiGLi4 RjTmJJ1noGVICFCwppeGmsObNS9ev9ehIO7O7q7GL9pjExzhmIP6meOVsIyRDx7B0r gqugnxSXR+azoUU/vV0Wyo7hLK187orBxXxFT3oY=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20160826.143830.937655299426629223.mbj@tail-f.com>
Date: Fri, 26 Aug 2016 15:12:06 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <CCB52F1F-2C8D-4458-A3F6-C59276031922@nic.cz>
References: <6d87e060-3c52-38f6-e499-da3d7c20a783@ericsson.com> <20160826.102122.372934259558220723.mbj@tail-f.com> <m27fb3af4p.fsf@birdie.labs.nic.cz> <20160826.143830.937655299426629223.mbj@tail-f.com>
To: Martin Björklund <mbj@tail-f.com>
X-Mailer: Apple Mail (2.3124)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/4hi8lRlyZuuyNjaG1AlvPmDdR3Y>
Cc: netmod@ietf.org
Subject: Re: [netmod] Design-Time schema mount
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: Fri, 26 Aug 2016 13:19:16 -0000
> On 26 Aug 2016, at 14:38, Martin Bjorklund <mbj@tail-f.com> wrote: > > Ladislav Lhotka <lhotka@nic.cz> wrote: >> Martin Bjorklund <mbj@tail-f.com> writes: >> >>> Hi, >>> >>> [replying to the first post in this (old) thread; the thread got a bit >>> off-topic] >>> >>> Balazs Lengyel <balazs.lengyel@ericsson.com> wrote: >>>> Hello, >>>> >>>> As I understand it, Schema-mount today does not support an important >>>> use-case which we definitely need, but others also indicated they >>>> want. >>>> >>>> I want to specify off-line in design time which models will be mounted >>>> where. Many of my nodes know in design-time what their model structure >>>> will be, so I want a way to be able to document this in YANG. >>> >>> I'd like to understand this use case in more detail. You say that >>> that a "node knows in design-time" that YANG models it will use. Thus >>> it seems natural to be able to specify which other modules to mount in >>> the YANG module itself. >> >> Did you have a chance to look into my slides from Berlin? I sketched some >> solutions there. > > Well, that's a *solution*. I'd like to understand the *problem* first ;) > >>> The problem I see with this is that it is very limited to the use case >>> where each implementation defines its own YANG modules. Suppose you >>> have such a model, for example: >>> >>> module A { >>> ... >>> mount ... { >>> mount-module B; >>> mount-module C; >>> } >>> } >>> >>> [pseudo-code for module A that specifies that it mounts B and C] >>> >>> Now, suppose you take this module A to another implementation, and it >>> needs to augment something into module C; essentially this means that >>> it would like to mount B, C and new module D. This will not be >>> possible unless it modifies module A. >> >> Not necessarily, D could contain an augment with a target specified by a >> schema node identifier that uses nodes from both A and C. > > Not if B and D are defined as standalone modules, e.g. if B is > ietf-interfaces and D is ietf-ip. Right, we cannot have everything. > >> Imagine that instead of "ietf-ip" augmenting "ietf-interfaces" it would >> be the other way around: "ietf-interfaces" mounts "ietf-ip". Then the >> augment in ietf-ipv6-router-advertisements >> >> augment "/if:interfaces-state/if:interface/ip:ipv6" { ... } >> >> needn't be changed. > > This would be an entirely different kind of mount! The current mount > doesn't work like that; it doesn't give you visibility into the > combined models - by design. Of course this is a different kind of mount. > > >> The major problem with this IMO is that it needs a new YANG statement. >> >>> >>>> In >>>> today's proposal the only way to find the Yang-Mounts is to read it >>>> from the live node. >>>> >>>> * OAM integrators or operators want to be able to write CLI scripts >>>> and Netconf messages without accessing (expensive) real nodes. For >>>> this they need to know the mounts >>>> * We want to generate some fancy documentation from YANG automatically >>>> in design-time. >>> >>> In a way this is no different from the situation today - in order to >>> learn what YANG modules a device supports you need to connect and >>> parse the <hello> message (or ietf-yang-library data in the near >>> future). This info could also be made available off-line in a file. >> >> Yup. So we just need some machine-readable description of the structure >> of mounted schemas. >> >>> >>> It should certainly be possible to define a file format that a device >>> somehow could "publish" off-line that contained all the info that is >>> available at run-time. This file format could be exactly the same as >>> you would get if you did a NETCONF <get/> operation with some filter >>> to only retreive the ietf-yang-library data at the mount points. >> >> Well, if you have multiple levels of mounts, it will get messy: you >> wouldn't know which yang-library data belongs to which mount point. > > Why not - imagine that you do a full <get/> on such a device, it will > return the nested yang library data just fine. Well, yes, if you are prepared to parse and process arbitrary data for which you don't know the schema. I think the schema and instance data (= <get/> reply) are different things and we should treat them so: the complete schema description should IMO have a well-known (meta-)schema, even if we express it with YANG. Lada > > > /martin > > >> I believe some variation on YSDL could work, and as I wrote in another >> thread, we could also incorporate datastores: after defining the >> (multilevel) schemas, each datastore will get one assigned - and they >> can also share them where needed. >> >> Lada >> >>> >>> >>> >>> /martin >>> >>> >>>> >>>> * Many use cases need the possibility to mount schemas, but do not >>>> need the added complexity of schema changes in run-time. >>>> Notwithstanding the case of "YANG Features", for me the model schema >>>> is a mostly static description of a nodes capabilities. Most of the >>>> time I do not want to worry about the node changing its schema on >>>> the fly. >>>> >>>> >>>> For this I propose 2 YANG extensions >>>> >>>> extension schema-mount { >>>> description "Indicates that a YANG Module is to be mounted into >>>> another module. >>>> The argument specifies the name of the module to be mounted."; >>>> argument mounted-module; >>>> } >>>> >>>> extension schema-mount-target { >>>> description "Specifies the target node under which a YANG module is to >>>> be mounted. >>>> The statement can only be used inside a schema-mount statement. >>>> The argument follows the same rules as an augment statement's target. >>>> argument target-node; >>>> } >>>> >>>> The two extension statements can be placed in a separate module or the >>>> mounted module. >>>> >>>> I don't insist on the solution, but I need the off-line/design-time >>>> specification of yang-mount to be possible. IMHO the design-time mount >>>> use-case is more important than the dynamic-mount. >>>> >>>> regards Balazs >>>> -- >>>> Balazs Lengyel Ericsson Hungary Ltd. >>>> Senior Specialist >>>> Mobile: +36-70-330-7909 email: Balazs.Lengyel@ericsson.com >>> >>> _______________________________________________ >>> netmod mailing list >>> netmod@ietf.org >>> https://www.ietf.org/mailman/listinfo/netmod >> >> -- >> Ladislav Lhotka, CZ.NIC Labs >> PGP Key ID: E74E8C0C -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Andy Bierman
- Re: [netmod] Design-Time schema mount Juergen Schoenwaelder
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Andy Bierman
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Andy Bierman
- Re: [netmod] Design-Time schema mount Robert Wilton
- Re: [netmod] Design-Time schema mount Juergen Schoenwaelder
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Martin Bjorklund
- Re: [netmod] Design-Time schema mount Martin Bjorklund
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Ladislav Lhotka
- Re: [netmod] Design-Time schema mount Balazs Lengyel
- Re: [netmod] Design-Time schema mount Andy Bierman
- Re: [netmod] Design-Time schema mount Balazs Lengyel