Re: [netmod] Interplay between YANG network instances and schema mount

Martin Bjorklund <mbj@tail-f.com> Thu, 10 November 2016 15:30 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 067491294F4; Thu, 10 Nov 2016 07:30:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.398
X-Spam-Level:
X-Spam-Status: No, score=-3.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-1.497, 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 tirKDmStRPa8; Thu, 10 Nov 2016 07:30:31 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 999211297AB; Thu, 10 Nov 2016 07:30:31 -0800 (PST)
Received: from localhost (h-13-76.a165.priv.bahnhof.se [155.4.13.76]) by mail.tail-f.com (Postfix) with ESMTPSA id 682B01AE0388; Thu, 10 Nov 2016 16:30:30 +0100 (CET)
Date: Thu, 10 Nov 2016 16:30:30 +0100
Message-Id: <20161110.163030.1104048283216651692.mbj@tail-f.com>
To: rwilton@cisco.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <8c1590b7-6131-7495-f7c9-bb133010f4a7@cisco.com>
References: <8c1590b7-6131-7495-f7c9-bb133010f4a7@cisco.com>
X-Mailer: Mew version 6.5 on Emacs 24.3 / 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/t2gYSdAdg2rsmB7FZ5Ogjt7HXno>
Cc: draft-ietf-rtgwg-ni-model@ietf.org, netmod@ietf.org, draft-ietf-netmod-schema-mount@ietf.org
Subject: Re: [netmod] Interplay between YANG network instances and 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: Thu, 10 Nov 2016 15:30:33 -0000

Robert Wilton <rwilton@cisco.com> wrote:
> Hi,
> 
> The network-instances draft (draft-ietf-rtgwg-ni-model) uses YANG
> mount to allow relevant parts of the YANG schema to be made
> available under a particular network instance (e.g. as per the
> diagram on section 3.2), reproduced inline here:
> 
>       +--rw yanglib:modules-state           [RFC7895]
>       +--rw if:interfaces                   [RFC7223]
>       |  +--rw bind-network-instance-name="green" string
>       +--rw network-instances
>          +--rw network-instance* [name]
>             +--rw name="green"    string
>             +--rw type?                           identityref
>             +--rw enabled=true                    boolean
>             +--rw description="The Green VRF"     string
>             +--rw network-instance-policy
>             |  ... (RT=1000:1, RD=1.2.3.4)
>             +--rw root?                           yang-schema-mount
>                +--rw yanglib:modules-state  [RFC7895]
>                +--rw if:intefaces           [RFC7223]
>                +--rw mm:network-services
>                +--rw nn:oam-protocols
>                +--rw oo:routing
>                +--rw pp:mpls
> 
> 
> My assumption is that the mounted YANG modules are just providing
> alternative paths in the schema for the same underlying data nodes
> that are also available without going via the schema-mount path.

Schema mount in itself does not specify (by design) anything about the
underlying instrumentation of mounted data models.

In the case of a network orchestrator that uses schema mount for
network devices, the mounted paths are obviously not providing
alternative paths.

But I think it is fine if some usage of schema mount wants this
semantics.  It needs to be defined in the module that uses schema
mount.

> I
> further presume that datanodes could be read/written in both places
> (of course subject to NACM), and that any changes to data nodes made
> in one place must be immediately reflected in both places.

> 
> To give a concrete example, assuming that "eth0" was bound to
> network-instance "foo" then:

>  network-instances/network-instance[name="foo"]/root/interfaces/interface[name="eth0"]
>  would be pointing to the same actual data node as
>  /interfaces/interface[name="eth0"].
> 
> Is my interpretation of how schema mount is anticipated to work in
> this scenario correct?
> 
> If my understanding is correct then this would seem to imply:
>  - semantic validation of the the datatree can be performed by
>    ignoring schema mounted nodes altogether. 
>  - leafrefs logically exist independently of the schema mounted nodes.
>  - leafrefs viewed under a schema mount can, in some cases, be
>    simplified to look like the reference is local within the mounted
>    schema tree, but in the case that I'm considering here, it isn't
>    obvious to me that all such leafrefs must necessarily never
>    reference nodes outside of this subtree.

The last bullet might be a problem...


/martin