Re: [netmod] Schema mount and Network Instance model

Martin Bjorklund <> Wed, 22 January 2020 07:39 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B010C120052; Tue, 21 Jan 2020 23:39:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id plQXnc7jJEWG; Tue, 21 Jan 2020 23:39:52 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 180D2120013; Tue, 21 Jan 2020 23:39:51 -0800 (PST)
Received: from localhost (unknown []) by (Postfix) with ESMTPSA id D49301AE02F0; Wed, 22 Jan 2020 08:39:50 +0100 (CET)
Date: Wed, 22 Jan 2020 08:39:13 +0100 (CET)
Message-Id: <>
From: Martin Bjorklund <>
In-Reply-To: <>
References: <>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [netmod] Schema mount and Network Instance model
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 22 Jan 2020 07:39:54 -0000


Mahesh Jethanandani <> wrote:
> The network-instances YANG model [RFC8529] gives an example in
> Appendix A.1 <> of how
> to use schema mount to mount the routing protocol. An example modeled
> along those lines for the BGP YANG model, and enclosed herewith fails
> validation using yanglint with the following error. What am I doing
> wrong?
> Validating yang/example-bgp-configuration-a.1.3.xml
> err : Unknown element
> "routing". (/ietf-network-instance:network-instances/network-instance[name='vrf-red']/vrf-root)
> failed (error code: 0)
> With confdc it fails as follows:
> Loading Data for example a.1.3
> confd_load: 666: maapi_load_config(sock, tid, flags, abspath(argv[0]))
> failed: external error (19): Error on line 9: unknown element: routing
> in
> /ni:network-instances/ni:network-instance[ni:name='vrf-red']/ni:vrf-root/rt:routing
> If what I have is not an error, it raises two questions. Is schema
> mount supported? Supported from a validation perspective. I can
> imagine that not everyone (or anyone) may have actually implemented
> schema mount.

Schema mount is (i) a generic mechanism for composing models at
specific mount points and (ii) a way for a server to report to clients
how this composition is done in the specific server (this may vary
dynamically over time).

The network-instance model is generic; it just defines a mount point
in the data model.  A specific server might be implemented to mount
the "ietf-routing" model under the mount point, and in that case it
will be able to validate the instance document you provided.

However, a generic YANG validator tool does not know (*) which models
are supposed to be mounted under any given mount point, and thus it
will probably raise an error (as you saw).

(*) unless you also pass it additional information about this in some
way (this could e.g. in the form of an instance document that contains
the /schema-mounts subtree and the ietf-yang-library contents for the
mount point)

As for implmentation support, we have implemented YANG schema mount in

> And the second and more important question is how are routing
> protocols supposed to support VRF if the two models, network instance
> and routing protocol, do not work together? What needs to change to
> get them to work?

I think they do work together!