Re: [netmod] Design-Time schema mount

Martin Bjorklund <mbj@tail-f.com> Fri, 26 August 2016 08:22 UTC

Return-Path: <mbj@tail-f.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 EAABB12D0FA for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 01:22:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.449
X-Spam-Level:
X-Spam-Status: No, score=-2.449 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.548, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 AjdU5EcZCcOi for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 01:22:18 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id A0BC612D09C for <netmod@ietf.org>; Fri, 26 Aug 2016 01:22:18 -0700 (PDT)
Received: from localhost (unknown [173.38.220.42]) by mail.tail-f.com (Postfix) with ESMTPSA id B781F1AE018C; Fri, 26 Aug 2016 10:22:17 +0200 (CEST)
Date: Fri, 26 Aug 2016 10:21:22 +0200
Message-Id: <20160826.102122.372934259558220723.mbj@tail-f.com>
To: balazs.lengyel@ericsson.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <6d87e060-3c52-38f6-e499-da3d7c20a783@ericsson.com>
References: <6d87e060-3c52-38f6-e499-da3d7c20a783@ericsson.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/f_oParkSzrIDSv2mO2PtiNIBQcQ>
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 08:22:20 -0000

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.

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.

> 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.

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.



/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