Re: [netmod] js review of draft-ietf-netmod-schema-mount-09

Martin Bjorklund <mbj@tail-f.com> Thu, 05 April 2018 12:33 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 2208C12D883 for <netmod@ietfa.amsl.com>; Thu, 5 Apr 2018 05:33:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=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 mYTlO1gou-ed for <netmod@ietfa.amsl.com>; Thu, 5 Apr 2018 05:33:44 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 0A78D12751F for <netmod@ietf.org>; Thu, 5 Apr 2018 05:33:43 -0700 (PDT)
Received: from localhost (unknown [173.38.220.45]) by mail.tail-f.com (Postfix) with ESMTPSA id A22E11AE047B; Thu, 5 Apr 2018 14:33:41 +0200 (CEST)
Date: Thu, 05 Apr 2018 14:33:40 +0200
Message-Id: <20180405.143340.1930670144610383537.mbj@tail-f.com>
To: j.schoenwaelder@jacobs-university.de
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <20180329090305.eqshcqvqo33r5bsf@elstar.local>
References: <20180329090305.eqshcqvqo33r5bsf@elstar.local>
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/Yh02zM6vuJhplBwaqwOnuFAAKEo>
Subject: Re: [netmod] js review of draft-ietf-netmod-schema-mount-09
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 05 Apr 2018 12:33:46 -0000

Hi,

Thank you for this review!  Comments inline.

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> Here is my review of draft-ietf-netmod-schema-mount-09.
> 
> * Abstract
> 
>    This document defines a mechanism to combine YANG modules into the
>    schema defined in other YANG modules.
> 
>   I do not know what this says - I think this text is confusing. What
>   does it mean to 'combine' YANG modules? What is the notion of
>   'schema' used here?

Howabout:

  This document defines a mechanism to add the schema trees defined by
  a set of YANG modules into the schema tree defined in another YANG
  module.

(see more below on terminology)

>   Does the text help someone to decide whether
>   this mechanisms is something worth to study in order to solve a
>   given modeling problem?  (A good abstract would IMHO do that.)
> 
>   Note that the mount mechanisms has serious limitations as well that
>   perhaps need to spelled out right up-front, i.e., it only works with
>   pre-defined mount-points (augments are much more flexible in this
>   regard, the schema mount defined here is by its very design not
>   very flexible.

I don't agree that this is a "serious limitation", and I don't think
an abstract should list things that the document doesn't do.

> * Introduction
> 
>   s/Furthermore,//

Fixed.

>   'In some cases' ... 'often' - hm is this something that is required
>   occasionally or often? There are more uses of fill words like
>   'often' that do not really seem to be needed.

Fixed.

>   s/new generic mechanism/new mechanism/

Fixed.

>   While I think I understand the difference made between
>   implementation-time and run-time, the description is somewhat
>   confusing since the run-time mount will also be exposed via YANG
>   library and hence defining implementation-time by 'defined by a
>   server implementor and is as stable as YANG library information of
>   the server' is somewhat fuzzy. I assume what you mean is that in the
>   case 2. the mounted schema is fixed at implementation time while in
>   the case 3. the mounted schema may vary and be discovered at
>   run-time. However, you do not define things this way but rather talk
>   about properties that do however not define things.

Howabout:

OLD:

+ Run-time: the mounted schema is defined by instance data that is
  part of the mounted data model. If there are multiple instances of
  the same mount point (e.g., in multiple entries of a list), the
  mounted data model may be different for each instance.

NEW:

+ Run-time: the mounted schema can vary at run time and is defined by
  instance data that is part of the mounted data model. If there are
  multiple instances of the same mount point (e.g., in multiple
  entries of a list), the mounted data model may be different for each
  instance.


> * Glossary of New Terms
> 
>      o  top-level schema: a schema according to [RFC7950] in which schema
>       trees of each module (except augments) start at the root node.
> 
>   You do not import 'schema' from RFC 7950 since, well, it is not
>   defined in RFC 7950. I think you often mean a schema tree (as
>   defined in RFC 7950) when you use 'schema'. Well, even this is not
>   true since a 'schema tree' according to RFC 7950 is scoped to a
>   module. RFC 8342 defines a 'datastore schema' but then I am not sure
>   this corresponds to 'schema' as used in this draft. In fact, the
>   mounted schema may be considered part of the 'datastore schema'.  I
>   think we are handwaving with our terminology here but then perhaps I
>   am the only one who cares...

I have imported "schema tree" from 7950, and changed teh definition of
top-level schema to:

- top-level schema: a set of modules in which the schema
  trees of each module (except augments) start at the root node.

>   What we actually have are schema tree (of a module per RFC 7950) and
>   a collection of schema trees sharing a common root (this is likely
>   what is meant with "schema" in this document). And then schema mount
>   simply provides a mechanism to have additional (statically defined)
>   roots in a schema.
> 
> * Specification of the Mounted Schema
> 
>   I still struggle with the term 'inline' (and to a lesser extend with
>   'shared'). I am likely in the minority.

These terms are not perfect, but hopefully well-defined.

> * Multiple Levels of Schema Mount
> 
>   What is a 'subschema'? What is a 'schema level'? Is a subschema the
>   same as a schema, i.e. a collection of schema trees with a common
>   root? If we need terms such as 'subschema' or 'schema level', then
>   we should define them. But perhaps just some tweaking the text to
>   avoid new terms can solve the issue.

I have changed "subschema" to "schema", and removed "schema level":

NEW:

  YANG modules in a mounted schema MAY again contain mount points
  under which other schemas can be mounted.  Consequently, it is
  possible to construct data models with an arbitrary number of
  mounted schemas.  A schema for a mount point contained in a mounted
  module can be specified by implementing "ietf-yang-library" and
  "ietf-yang-schema-mount" modules in the mounted schema, and
  specifying the schemas exactly as it is done in the top-level
  schema.



> * Referring to Data Nodes in the Parent Schema
> 
>   I stumbled across this here but in general is 'data model' the same
>   as 'schema'? Note that the text in section 4 talks about 'mounted
>   data model' and 'top-level data model' and 'mounted data model' but
>   elsewhere you talk about * schemas. Perhaps using just one term is
>   better and more consistent?

Yes, done.  Now using "schema" only.

>   Why are parent-references only useful for the 'shared-schema' case?
>   An 'inline' mount can't refer to stuff outside the mount jail?

Correct.  We have debated if this makes sense for inline or not.  As
it is, the model is designed so that this can be added in the future,
if it turns out that this is needed.

>   Looking at the YANG definition of 'parent-reference', I am left
>   somewhat clueless in which situations these xpath expressions are
>   evaluations and when the nodesets are merged with other xpath
>   expression evaluation results.

The YANG module says:

             When XPath expressions in the mounted schema
             are evaluated, the 'parent-reference' leaf-list is taken
             into account.

and

               For the purposes of evaluating XPath
               expressions whose context nodes are defined in the
               mounted schema, the union of all these nodesets
               together with ancestor nodes are added to the
               accessible data tree.


>   It seems that these parent references
>   are the only actual difference between 'inline' and 'shared-schema'
>   mounts.
> 
> * Data Model
> 
>   I have not really understood what the difference between 'inline'
>   and 'shared-schema' is. I understand that the later can have
>   'parent-references' but it is unclear why the other can't and if
>   there is not strong architectural reason why there have to be two
>   choices. It also seems that the 'namespace' list is only meaningful
>   if there are parent references, no? So why is this then global, i.e.
>   also provided for 'inline' mounts?

As you note, the 'namespace' list is global, so there is just one list
that covers all mount-points.  It's not really correct to state that
the 'namespace' list is "provided for 'inline' mounts".

>   I guess I do not really
>   understand the distinction. If there are no parent-references, what
>   is the difference between 'shared-schema' and 'inline'?

The difference is that shared-schema can have parent-references, and
that all instances of such a mount point have exactly the same
schema.

> * Security Considerations
> 
>   I agree with others that something needs to be said how NACM applies
>   to mounted schemas.

I have added the following (short) section:

7.  Interaction with the Network Configuration Access Control Model
    (NACM)

   If NACM [RFC8341] is implemented on a server, it can be used to
   control access to nodes defined by the mounted schema in the same way
   as for nodes defined by the top-level schema.

   For example, suppose the module "ietf-interfaces" is mounted in the
   "root" container in the "logical-network-element" list defined in
   [I-D.ietf-rtgwg-lne-model].  Then the following NACM path can be used
   to control access to the "interfaces" container (where the character
   '\' is used where a line break has been inserted for formatting
   reasons):

     <path xmlns:lne=
             "urn:ietf:params:xml:ns:yang:ietf-logical-network-element"
           xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
       /lne:logical-network-elements\
         /lne:logical-network-element/lne:root/if:interfaces
     </path>


/martin