Re: [netmod] Design-Time schema mount

Andy Bierman <andy@yumaworks.com> Fri, 26 August 2016 17:53 UTC

Return-Path: <andy@yumaworks.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 EEF1512D505 for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 10:53:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 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_NONE=-0.0001, SPF_PASS=-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 YJHCA4ZpE373 for <netmod@ietfa.amsl.com>; Fri, 26 Aug 2016 10:53:23 -0700 (PDT)
Received: from mail-ua0-x22d.google.com (mail-ua0-x22d.google.com [IPv6:2607:f8b0:400c:c08::22d]) (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 38C6312D14F for <netmod@ietf.org>; Fri, 26 Aug 2016 10:53:23 -0700 (PDT)
Received: by mail-ua0-x22d.google.com with SMTP id l94so87328419ual.0 for <netmod@ietf.org>; Fri, 26 Aug 2016 10:53:23 -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=ERF2ho7SY/6hCcTuUgb/HKWvXsg0jSQ287zm0RoZnYY=; b=N+9iKN+PneR2TkvTN7/7tIyYanYp4uwvOzcXPbgVbDGQ/+GggQon4Q5EUPQdgRKmPm QuwLLWvSrIDUloVWtiLZ/fT4OEv9c9RB30ue9Ga9Mo86/a6s0N26FdpmgTqfcDVWetlj nPfFH5CpzW9KNsJtmfxw8gjm42MfkkTrODF625lVPRte90cQSh6P/yZMfj86RNi1tVJi FRpgdgHvtXB3it/Ji+Q7PXiGafZjMZY9XYxGJyNAbhOa+auy6pQj/L05ivyEanKRss7G JNYOTWWeoKqDCUa+2JenuK8ioUXPOttz32HXC4pkiJ2d86TNSp+uskDC06xrKk66Zqyb WmvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ERF2ho7SY/6hCcTuUgb/HKWvXsg0jSQ287zm0RoZnYY=; b=iQGQTo4jqzfm91pwHP/nmUfBHnyZSY6TA97SO7A45oEeZxJXN3BFv3LMwmVUbfv/XA OWlfMxvAo2ODmrVTBmyNvif22pEdujMDd8jT8qSMlqOdLaEOViWS/Q27EwUbTQhR+u7T qahLz4iHhezhXC/bIyOVN6F1S23YUW2HwMpaZsm95ZtSyxxJuf+fnWHp5rbWlivW3CQo /pNS/tJCLMPruek5ZobzYbJ1/H5OItC+9L5k5zYeChSGe/WKK8xQzPb3WzWNG9zRg5Ef iWq0gSSokgkVHtet2F/pChKyD+ZSqNBccLoSPaoOLgx1yc4IxHgxXzyGuK8SF0HmqfVe K+zg==
X-Gm-Message-State: AE9vXwOjzYlrZkN53cLKznm5sqOuXaAHzmt2tiO//2BaPuUgEegUxFT1a2z62utcvBwcByxNzdY8IIchd1NJNA==
X-Received: by 10.31.192.2 with SMTP id q2mr2531907vkf.44.1472234002234; Fri, 26 Aug 2016 10:53:22 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.4.134 with HTTP; Fri, 26 Aug 2016 10:53:21 -0700 (PDT)
In-Reply-To: <20160826.143830.937655299426629223.mbj@tail-f.com>
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>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 26 Aug 2016 10:53:21 -0700
Message-ID: <CABCOCHSyHVmgJyMmj8KS=aiH7R9_qYYRB2Acq1nBMtMRj5p80Q@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Content-Type: multipart/alternative; boundary="001a113bf06cbae4cc053afd30f9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Ptm3FR-koQ2Dt80PPTxeEkpyTJE>
Cc: "netmod@ietf.org" <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 17:53:26 -0000

Hi,

I agree with Martin about not specifying which YANG modules
can be mounted under some mount point, in the YANG module.

The mount point needs some basic properties (like "config root", "opstate
root", whatever).
Then data nodes are classified somehow (e.g. config=true/false) and that
determines
what content can be mounted under that mount-point.

The combination of modules on the server needs to be a deployment decision
to
prevent issues like Martin describes below.


Andy


On Fri, Aug 26, 2016 at 5:38 AM, 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.
>
> > 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.
>
>
> > 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.
>
>
> /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
> >
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>