Re: [netmod] YANG library structure

Andy Bierman <andy@yumaworks.com> Sat, 09 December 2017 17:44 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 C56D012726E for <netmod@ietfa.amsl.com>; Sat, 9 Dec 2017 09:44:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 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_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=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 mlNtqrORs7ep for <netmod@ietfa.amsl.com>; Sat, 9 Dec 2017 09:44:02 -0800 (PST)
Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com [IPv6:2a00:1450:4010:c07::22c]) (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 F1D331200FC for <netmod@ietf.org>; Sat, 9 Dec 2017 09:44:01 -0800 (PST)
Received: by mail-lf0-x22c.google.com with SMTP id x20so15013556lff.1 for <netmod@ietf.org>; Sat, 09 Dec 2017 09:44:01 -0800 (PST)
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=JazFw+k1T9cT1bmg608gM23L2nvDOKfWun5JsVeNjPE=; b=2FGkqr2ggdJDh3Q9Anl4lVOrMQf0PTcqzkjG4gtWrzpePIFzX91gwydcSt04M9G6zi utv0djB/iZMYmtZAwI8G4t2zGglITkBDlLQWVLbvT5Brc59fflttlxXgLuEpHV59wI3E ljPP6jS2AcjtJgvSIFrFjfglQlbdrN/gqEtCikmhVqWupeBvRsf+KaOvP9PCVJPxewZn rTv1YMdZnec1cPQrnL5shstdiXrUm9dRPn7PfP75lFxDZgKHRkptrCH6XiyH1fcmG8f7 s7PpyXk8oSp6OW8sl7t/wkEA781rNBTuKwajP72170x2aiKZ7re5VKJQ/ydI3fHEP2i9 h+Jg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JazFw+k1T9cT1bmg608gM23L2nvDOKfWun5JsVeNjPE=; b=AoUBGdc1ZC3aUMB6TM/RnDZA4g8epmP8esJk407+NEQ8aq1pqBnxezPfwKq6cvPoy8 Z+RJIKkQEnh+WO+HuEoDQhPA6RbPnmwiqkaediwkxhlMPw7OonX7kg7Vt07cl8NhW275 xD011lpzrHAoAi9Ioeqe6Vt2IXxdquQsFuL0RyRYfF+KNL45VKQHlVYx7qIQB+TTfu2L mMUTsl0kAGxmVpylbO6x1lhslFXMk1vl/YpRs72DuN9izDbtYfboY56Fthy/bu3xZg7g lyT/FriaaKZrNzd+sdN0kxgfTttKc87h9dsabFZ+w+QM6dMBGP1E2D+/AdUHZNZFjUyT IqSw==
X-Gm-Message-State: AJaThX6Epq6qD4clbqkJ1E3jVQAF/Eh+/ugc1+/4Tglfb7a216w041co bB41KXNPxfDHr5VKoFQyvToX7WxyY4bcyorOuIp/cKyz
X-Google-Smtp-Source: AGs4zMZjiEG/1B5RI9e0QLZ9yotgfRigW1CUOkB+Rx8KZXOo6NTp+iPyJZDowHNLl/ALlQU9EWNZn0WfR4ewgg+J0jY=
X-Received: by 10.46.70.18 with SMTP id t18mr17751227lja.190.1512841440071; Sat, 09 Dec 2017 09:44:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.33.81 with HTTP; Sat, 9 Dec 2017 09:43:59 -0800 (PST)
In-Reply-To: <20171208.104741.1957721911727198135.mbj@tail-f.com>
References: <20171208.104741.1957721911727198135.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sat, 09 Dec 2017 09:43:59 -0800
Message-ID: <CABCOCHRbnrJ8Fb1ArSGAFoDCQ9DhDUnjG_uz0wyVbmXXt4TrJA@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>, Netconf <netconf@ietf.org>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="f403045f771ea32625055febd813"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pj6E032i2C0Pcvx37Hth5HNFi9w>
Subject: Re: [netmod] YANG library structure
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: Sat, 09 Dec 2017 17:44:06 -0000

On Fri, Dec 8, 2017 at 1:47 AM, Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
> There has been quite a lot of discussion about the YANG library
> data model on the list.  The authors of draft-ietf-netconf-rfc7895bis
> have tried to understand all arguments in the discussion, and provide
> a solution.  Below are 3 solution proposals (we have discussed more,
> but they are basically just variations on the same themes).
>
> Absolute Requirements
> ---------------------
>
> o  RFC 7950, Section 5.6.5 says:
>
>      A server MUST NOT implement more than one revision of a module.
>
> o  draft-ietf-netmod-revised-datastores says:
>
>      The conventional configuration datastores [...] share exactly
>      the same datastore schema
>
> o  draft-ietf-netmod-revised-datastores says:
>
>      The datastore schema for <operational> MUST be a superset of the
>      combined datastore schema used in all configuration datastores
>      except that YANG nodes supported in a configuration datastore MAY
>      be omitted from <operational> if a server is not able to
>      accurately report them.
>
>
> These requirements (of course) still hold, and we think that the YANG
> library document should explain what they imply for the data reported
> as part of the library.  (For example, all conventional datastores
> MUST have a reference to the same "schema").
>
>
> Objectives (in no particular order)
> -----------------------------------
>
> 1. As efficient as possible for a client to consume.
>
>    Since the size of the yang library can be quite large, it should
>    be possible for clients to cache the yang library information.
>
>

Why do all of the alternatives ignore this objective?
All of them are 2X to 3X larger for message encoding than the IETF100
solution.

Why is the schema list needed at all?
Is this for schema-mount?
What does each schema list instance represent in an NMDA server?

The existing RFC 7895 library could be used, and each special feature
(NMDA, licensing, who-knows-what-else) can augment the module list
with additional data.  I guess YANG stability only matters to the people
who already ship code that does it the existing way.  Given that the new
NMDA
version (modules instead of modules-state) is read-only, I fail to see how
deprecating the modules-state subtree solves any real problem.

IMO, all of the new proposals are moving in the wrong direction and force
the client to potentially retrieve lots of conflicting schema information.
An existing client can easily be adapted to work with a single module list
/ schema
tree that now applies to a subset of datastores (instead of all datastores).
If the client now needs to retrieve and resolve potentially overlapping
module lists / schema trees, then deployment may be limited to new
2nd party client implementations only.


Andy


2. A dynamic datastore must be able to implement a module or feature
>    that is not implemented in the conventional datastores.
>
> 3. It must be possible to NOT implement a module or feature in
>    operational, even if it is implemented in some other datastore.
>
>    This is required for transition purposes; a server that wants to
>    implement <operational> should not have to implement all modules at
>    once.
>
> 4. A given module can only be implemented in one revision in all
>    datastores.  If a module is implemented in more than one
>    datastores, the same revision is implemented in all these
>    datastores.
>
> 5. Multiple revisions can be used for import, if import-by revision
>    is used.
>
> 6. Nice to have: make it possible to be used by schema mount
>
>
> It should be noted that because of 2 and 3 (and 6), the original data
> model in RFC 7895 cannot be used.
>
>
> Use Cases
> ---------
>
> Here's a set of use cases that must be supported.
>
>   C1. conventional + operational, all have the same schema
>
>   C2. conventional + operational, ietf-hardware is not implemented in
>       conventional
>
>   C3. conventional + operational, some modules not yet implemented in
>       operational, and some modules are partly implemented in
>       operational.
>
>   C4. conventional + operational + ephemeral, ephemeral has its own
>       set of modules
>
>
>
> Alt. A.
> -------
>
>   Each datastore refers to a schema, and each schema contains a flat
>   list of all modules, features, etc.
>
>     +--ro yang-library
>        +--ro schema* [name]
>        |  +--ro name                  string
>        |  +--ro checksum              string
>        |  +--ro module* [name]
>        |  |  +--ro name         yang:yang-identifier
>        |  |  +--ro revision?    revision-identifier
>        |  |  +--ro namespace    inet:uri
>        |  |  +--ro location*    inet:uri
>        |  |  +--ro submodule* [name]
>        |  |  |  +--ro name        yang:yang-identifier
>        |  |  |  +--ro revision?   revision-identifier
>        |  |  |  +--ro location*   inet:uri
>        |  |  +--ro feature* [name]
>        |  |  |  +--ro name    yang:yang-identifier
>        |  |  +--ro deviation* [module]
>        |  |     +--ro module    -> ../../name
>        |  +--ro import-only-module* [name revision]
>        |     +--ro name         yang:yang-identifier
>        |     +--ro revision     union
>        |     +--ro namespace    inet:uri
>        |     +--ro location*    inet:uri
>        |     +--ro submodule* [name]
>        |        +--ro name        yang:yang-identifier
>        |        +--ro revision?   revision-identifier
>        |        +--ro location*   inet:uri
>        +--ro datastore* [name]
>        |  +--ro name      identityref
>        |  +--ro schema    -> ../../schema/name
>        +--ro checksum     string
>
>
>   How does this solution handle the use cases above?
>
>   C1: One schema, all datastores refer to this schema.
>
>   C2: Two schemas, "conventional" and "operational".  They differ in
>       just one element (ietf-hardware).  All other module information
>       is entirely duplicated in both.
>
>   C3: Two schemas, "conventional" and "operational".  They differ in
>       the modules not implemented in operational, and operational also
>       has some deviation modules with "not-implemented".
>
>   C4: Three schemas, "conventional", "ephemeral", "operational".
>       "operational" contains the union of all modules in the other
>       two.
>
>
>   Pro: simple on the client, simple on the server
>
>   Con: verbose, since a single difference requires a complete, new,
>        schema.
>
>
> Alt. B.
> -------
>
>   Each datastore refers to a schema, and each schema contains a list
>   of references to module-sets, and each module-set contains a flat
>   list of all modules, features, etc.
>
>   When combining module-sets into a schema there MUST NOT be any
>   duplicate module definitions in the module-sets.
>
>
>     +--ro yang-library
>        +--ro module-set* [name]
>        |  +--ro name                  string
>        |  +--ro checksum              string
>        |  +--ro module* [name]
>        |  |  +--ro name         yang:yang-identifier
>        |  |  +--ro revision?    revision-identifier
>        |  |  +--ro namespace    inet:uri
>        |  |  +--ro location*    inet:uri
>        |  |  +--ro submodule* [name]
>        |  |  |  +--ro name        yang:yang-identifier
>        |  |  |  +--ro revision?   revision-identifier
>        |  |  |  +--ro location*   inet:uri
>        |  |  +--ro feature* [name]
>        |  |  |  +--ro name    yang:yang-identifier
>        |  |  +--ro deviation* [module]
>        |  |     +--ro module    -> ../../name
>        |  +--ro import-only-module* [name revision]
>        |     +--ro name         yang:yang-identifier
>        |     +--ro revision     union
>        |     +--ro namespace    inet:uri
>        |     +--ro location*    inet:uri
>        |     +--ro submodule* [name]
>        |        +--ro name        yang:yang-identifier
>        |        +--ro revision?   revision-identifier
>        |        +--ro location*   inet:uri
>        +--ro schema* [name]
>        |  +--ro name          string
>        |  +--ro checksum      string
>        |  +--ro module-set*   -> ../../module-set/name
>        +--ro datastore* [name]
>        |  +--ro name      identityref
>        |  +--ro schema    -> ../../schema/name
>        +--ro checksum      string
>
>   How does this solution handle the use cases above?
>
>   C1: One module-set, one schema, all datastores refer to this schema,
>       the schema refers to the single module-set.
>
>   C2: Two schemas, "conventional" and "operational", and two
>       module-sets.  One module-set contains just "ietf-hardware" and
>       the other everything else.  The "operational" schema refers to
>       both module-sets, and the "conventional" to just the one without
>       "ietf-hardware".
>
>   C3: Two schemas, "conventional" and "operational", and three
>       module-sets.  One module-set contains all modules fully
>       implemented in both conventional and operational, one contains
>       the modules implemented only in conventional, and one the
>       modules and deviations for the partly implemented modules in
>       operational.
>
>   C4: Three schemas, "conventional", "ephemeral", "operational", but
>       just two module-sets. "conventional" refers to one of the
>       module-sets, and "ephemeral" to the other.  "operational" refers
>       to both.
>
>   Pro: less verbose
>
>   Con: the client has to follow extra references and must combine the
>        result from the references into a single schema.
>
>
> Alt. C.
> -------
>
>   (This is the draft -02 version with just some name changes)
>
>   Each datastore refers to a schema, and each schema contains a list
>   of references to each module it includes.
>
>     +--ro yang-library
>        +--ro module* [id]
>        |  +--ro id                  string
>        |  +--ro name                yang:yang-identifier
>        |  +--ro revision?           revision-identifier
>        |  +--ro location*           inet:uri
>        |  +--ro namespace           inet:uri
>        |  +--ro feature*            yang:yang-identifier
>        |  +--ro deviation* [module]
>        |  |  +--ro module    -> ../../id
>        |  +--ro conformance-type    enumeration
>        |  +--ro submodule* [name]
>        |     +--ro name        yang:yang-identifier
>        |     +--ro revision?   revision-identifier
>        |     +--ro location*   inet:uri
>        +--ro schema* [name]
>        |  +--ro name      string
>        |  +--ro module*   -> ../../module/id
>        +--ro datastore* [name]
>        |  +--ro name          identityref
>        |  +--ro schema    -> ../../schema/name
>        +--ro checksum       string
>
>   How does this solution handle the use cases above?
>
>   C1: One schema, all datastores refer to this schema,
>       the schema refers to all modules.
>
>   C2: Two schemas, "conventional" and "operational", and the module
>       list contains all modules.  The "operational" schema refers to
>       all modules, and "conventional" to all modules except
>       "ietf-hardware".
>
>   C3: similar to C2, except there will be two entries in the module
>       list for evenry module that is partly implemented in
>       operational.
>
>   C4: Three schemas, "conventional", "ephemeral", "operational", and
>       the module list contains all modules.
>       Each schema refers to the modules it supports.
>
>   Pro: All modules available are listed in one place.
>
>   Con: the client has to follow extra references and must combine the
>        result from the references into a single schema.
>
>        the least "direct" solution due to the module "id".
>
>        probably a bit tricky to implement on the server.
>
>
>
> /martin
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>