Re: [netmod] Interplay between YANG network instances and schema mount
Robert Wilton <rwilton@cisco.com> Thu, 10 November 2016 16:24 UTC
Return-Path: <rwilton@cisco.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 B8339129888; Thu, 10 Nov 2016 08:24:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -16.019
X-Spam-Level:
X-Spam-Status: No, score=-16.019 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 M4sn0nDP44Wf; Thu, 10 Nov 2016 08:24:13 -0800 (PST)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 47780129883; Thu, 10 Nov 2016 08:24:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5370; q=dns/txt; s=iport; t=1478795052; x=1480004652; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=WdgZOWX9G7l6ht1NGV3JjKcB7bRvZ6O5g/nSYc2Bk2M=; b=ZQVobc+YSVbirXrwJDUcNfwDzGXuqesy4CCDmN0ek81qK3UchtdO5zN1 NRM6XTswXYognjlh/9uA6UaPbn4CVHKgBoMnWWP1HBPLEaF1NRF2bGAZi RcAkD+sk2uFgUlCPuknYmYJwSLgHuxuy4IGCbZSegEPbBTcYfxzJjacUO k=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CQAgCEniRY/xbLJq1dGgEBAQECAQEBAQgBAQEBgzABAQEBAYEjU409lwqSSYIPggeGJAKCVBQBAgEBAQEBAQFiKIRhAQEBAwE4OgcQCw4KLlcGDQYCAQGIUwizCItBAQEBAQEBAQEBAQEBAQEBAQEghj6BfQiCVYopAQSOX4tYkFOBboR0gxkjhX6JXYNfhAceN2UQC4U0PjSFXSuCDwEBAQ
X-IronPort-AV: E=Sophos;i="5.31,619,1473120000"; d="scan'208";a="647003788"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2016 16:24:10 +0000
Received: from [10.63.23.88] (dhcp-ensft1-uk-vla370-10-63-23-88.cisco.com [10.63.23.88]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id uAAGO9WM018772; Thu, 10 Nov 2016 16:24:09 GMT
To: Martin Bjorklund <mbj@tail-f.com>
References: <8c1590b7-6131-7495-f7c9-bb133010f4a7@cisco.com> <20161110.163030.1104048283216651692.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <7641b69a-49a1-0fc8-9889-053083cd69b1@cisco.com>
Date: Thu, 10 Nov 2016 16:24:10 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <20161110.163030.1104048283216651692.mbj@tail-f.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/0kUSSR2snZxRb4yyKr0XnbYwDNA>
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 16:24:14 -0000
Hi Martin, Thanks for the comments, please see inline ... On 10/11/2016 15:30, Martin Bjorklund wrote: > 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. OK, I think that was sort of the answer that I was expecting. But perhaps the text in the schema-mount draft could be clearer on this point. To me, instrumentation seems like it is referring to implementation, where as my question is not about implementation at all, but about the logical relationship between the data nodes in the tree. > > In the case of a network orchestrator that uses schema mount for > network devices, the mounted paths are obviously not providing > alternative paths. I agree. There is something quite different between mounting a single copy of remote data, vs mounting a second "view" of some locally available data that is already available on a different path. It also feels like the use of mount in the LNE case is somewhat different from the use of mount in the NI draft. > > 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 actually think that we probably need some schema mount extensions to further refine how it can be used and the semantic meaning of the mounted data. In particular, this makes it easier for tooling to use modules that contain mounted data without requiring hard-coded logic. Such extensions could include: 1) Indicating that is it an entire "device" data model that is being mounted, and hence no leafrefs outside of the mount root are allowed. (LNE mount case) 2) Indicating that the mount point only represents an alternative "view" on to data that is available in the schema via other paths (NI mount case?). I think that this could potentially also allow sub-trees to be mounted, and also leafrefs to reference nodes outside the mounted tree. 3) A way of indicating that a mount point is remote, and details about which system the data is being mounted from (probably via extensions to the ietf-yang-schema-mount YANG module). 4) Statically specifying a set of modules that will always be available at the mount point (but allowing later revisions, augmentations, and addition modules to also be mounted at the same place). > >> 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... Is it a problem is all use cases of schema-mount, or just some of them? If we were to standardize some extensions at the same time, then could this restriction move into one/some of those extensions? Thanks, Rob > > > /martin > . >
- [netmod] Interplay between YANG network instances… Robert Wilton
- Re: [netmod] Interplay between YANG network insta… Robert Wilton
- Re: [netmod] Interplay between YANG network insta… Martin Bjorklund