Re: [netmod] Schema-mount question: Augmentation to the Mounted Module

"Xufeng Liu" <xufeng.liu.ietf@gmail.com> Wed, 14 June 2017 18:15 UTC

Return-Path: <xufeng.liu.ietf@gmail.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 21D46129413; Wed, 14 Jun 2017 11:15:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 v07XMspH5wXv; Wed, 14 Jun 2017 11:15:52 -0700 (PDT)
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 7EEDB1292FD; Wed, 14 Jun 2017 11:15:52 -0700 (PDT)
Received: by mail-lf0-x22c.google.com with SMTP id o83so6778701lff.3; Wed, 14 Jun 2017 11:15:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=MJcmGx47lMxiO0avLVl1EntABLsDvfmXDhzJvt02Vvc=; b=kugkl8rh0bWSr1XXoGTzQM4sRHNRflsvDUdXCZIvMqL7HxVs4qYY1Qbpgxzcp58G/f Y/xHreaSDniwyJFMpC0nszIMITvkZCZ3qGVvSqosGTBL5AmTuLjjhqDpY8Z7c1jPp56V v2FRgyveq41BqPr7lVmVUplZRdKIf5U4dO+sv6DGa/tHssQ4ycErSKZmKwc2tKjiDq/c w1INjFk43FxM6fNOve35Ku0NUzduS1EvZBC83RBoYMFeht6znBzt9Zv7E/lQ3nmaCQBA anhYCx8SAmOGGMww4qb2gYAC6bmrDgXfsgN5+kutwghnftWQmT6aQ8jhFST/lBLOp/PQ Tf3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=MJcmGx47lMxiO0avLVl1EntABLsDvfmXDhzJvt02Vvc=; b=t9maLdJR1LwHl/e5+gUiE3FO6vbbza1/cCZi+qYBFvxQadWzqLZ01FnULLOKWW6l0B 7q+kCp7bqI+ZUf0Ym7uEeNZQyQDTdl5ChfG/Otng1YTOZEKJ1m5PRag0yjfWb1r8bVDJ LWqPnuE4RXc2tpdTLBE4tfTNsrRgpNpxJIYtHa+r1a5fH0SqO6p/bq7aZ7VdWUKwnBxt sMqKmzcBcbrXqPeLyz5ginmCxaYlmYWbqCh77bnrGMQCdEVeba8O4+P1v07miWvDouOE B2fvS/3SB008TaRBYWfry/YHDkrMNZD82OjvkVcrvPZVy1LZGK5k2lWHff7rXoS/fcZb i6Sw==
X-Gm-Message-State: AKS2vOzJ8fQBqvhEyx+GgCGj/gEUO2jntJPY7b6YVnH9WZ6jXZkWQb3K hHgEQiwGkEP4ZF76s8o=
X-Received: by 10.25.167.19 with SMTP id q19mr466695lfe.138.1497464150419; Wed, 14 Jun 2017 11:15:50 -0700 (PDT)
Received: from xliuus (wsip-98-191-72-170.dc.dc.cox.net. [98.191.72.170]) by smtp.gmail.com with ESMTPSA id g13sm171168ljg.33.2017.06.14.11.15.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 11:15:49 -0700 (PDT)
From: Xufeng Liu <xufeng.liu.ietf@gmail.com>
To: 'Martin Bjorklund' <mbj@tail-f.com>, lhotka@nic.cz
Cc: lberger@labn.net, draft-ietf-netmod-schema-mount@ietf.org, netmod@ietf.org
References: <m2wp8ehl81.fsf@nic.cz> <bfed97ed-e5b5-2f20-a15d-d8761eda8d36@labn.net> <CC3B662E-1018-45DD-95A8-9AC07848C6F9@nic.cz> <20170614.190714.1094691660981968653.mbj@tail-f.com>
In-Reply-To: <20170614.190714.1094691660981968653.mbj@tail-f.com>
Date: Wed, 14 Jun 2017 14:15:46 -0400
Message-ID: <025301d2e53a$40576960$c1063c20$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIBaZOnae1JDJuoGLg5MaKPun0h7wI4bDntAVxxot4DPNYZCaGRDCMQ
Content-Language: en-us
x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNceGxpdVxhcHBkYXRhXHJvYW1pbmdcMDlkODQ5YjYtMzJkMy00YTQwLTg1ZWUtNmI4NGJhMjllMzViXG1zZ3NcbXNnLTdhZTQ2MTExLTUxMmQtMTFlNy05YzE0LTE4NWUwZmUzYzQ1Y1xhbWUtdGVzdFw3YWU0NjExMi01MTJkLTExZTctOWMxNC0xODVlMGZlM2M0NWNib2R5LnR4dCIgc3o9IjU3MjYiIHQ9IjEzMTQxOTM3NzQ2MTM4NjQ2MiIgaD0iMFQ2OVd5R0NjRXRFZE1VbWJ2aFoveXl2Um80PSIgaWQ9IiIgYmw9IjAiIGJvPSIxIi8+PC9tZXRhPg==
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/4-mO389Z7fUGbm1esR2-69nnDWU>
Subject: Re: [netmod] Schema-mount question: Augmentation to the Mounted Module
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: Wed, 14 Jun 2017 18:15:55 -0000

Hi Martin,

> -----Original Message-----
> From: Martin Bjorklund [mailto:mbj@tail-f.com]
> Sent: Wednesday, June 14, 2017 1:07 PM
> To: lhotka@nic.cz
> Cc: lberger@labn.net; xufeng.liu.ietf@gmail.com; draft-ietf-netmod-schema-
> mount@ietf.org; netmod@ietf.org
> Subject: Re: [netmod] Schema-mount question: Augmentation to the Mounted
> Module
> 
> Ladislav Lhotka <lhotka@nic.cz> wrote:
> >
> > > On 14 Jun 2017, at 13:43, Lou Berger <lberger@labn.net> wrote:
> > >
> > > Hi,
> > >
> > > (speaking as contributor...)
> > >
> > >
> > > On 6/14/2017 7:17 AM, Ladislav Lhotka wrote:
> > >> Hi Xufeng,
> > >>
> > >> please see my answers inline.
> > >>
> > >> Xufeng Liu <xufeng.liu.ietf@gmail.com> writes:
> > >>
> > >>> Hi Lada,
> > >>>
> > >>>
> > >>>
> > >>> We have got two questions on how to specify the module entries in
> > >>> a
> > >>> schema:
> > >>>
> > >>>
> > >>>
> > >>> 1. Are augmentations of parent modules inherited when augmented
> > >>> module is listed in schema-mounts schema?
> > >>>
> > >>> For example, ietf-ospf module augments ietf-routing. When we
> > >>> include ietf-routing to the schema entry, is ietf-ospf automatically
> included?
> > >> No, you also have to include "ietf-ospf" in the "module" list
> > >> inside the corresponding "schema" entry, exactly as you do in the
> > >> top level YANG library, otherwise ietf-ospf won't be mounted.
> > >
> > > I agree.  The draft should have text that makes this explicit.
> >
> > Why? It should be sufficiently clear that modules that are not listed
> > in "schema" are not present in the mounted schema. An augment is just
> > a special mechanism of contributing schema nodes.
> 
> Yes I agree.  But let's see if we can clarify the text.  Xufeng, what in
the current
> text led you to believe that a module in the parent schema would be
> automatically present in the mounted schema?
> 
[Xufeng] Thanks for looking at this. The confusion is because of the lack of
text, I would say. The term "mount" has an analogy to the Unix file system
"mount", where what we only specify the parent directory and child file
system (the connecting relationship at the connection point). Also, similar
is the command for the Unix soft/hard links, where we don't need to check if
there are other links under the child. 

> > >>> 2.	When we have ietf-yang-library mounted under a parent (LNE),
does
> > >>> ietf-yang-library have to contain exactly the same list of Yang
> > >>> modules as the list contained in the "schema" entry under
> > >>> "schema-mount"?
> > >> I am not sure I understand but do you mean an LNE mounted schema
> > >> defined via the "use-schema" case that also includes
> > >> ietf-yang-library? This is a corner case we probably haven't
> > >> thought about but it IMO doesn't make any sense to do so because
> > >> the applicable YANG library that counts is inside the "schema"
> > >> entry. Martin, should we address this anomaly?
> > >
> > > I think this is a very real scenario for LNE.  Consider a 'host'
> > > system
> > > that allows read only views of the LNE and wants the benefit of
> > > "use-schema".  In this case, library under the mount point is still
> > > needed for client access within the mounted LNE.
> >
> > In this case it would IMO be much better if the server inside the LNE
> > provide YANG library data separately for its clients. The client of
> > the host system needn't see it because it is just redundant.
> >
> > >
> > >
> > > It seems to me that in this case the mounted library module data
> > > must exactly match what is listed in the corresponding "schema"
> > > entry under "schema-mount" in order to ensure deterministic client
> views/behavior.
> > > Again, I think this should be made explicit in the draft.
> >
> > Another option is to ban ietf-yang-library in schemas mounted via
> > "use-schema".
> 
> This won't help.  The question is still the same - if you use
"use-schema", and
> one of the mounted modules is "ietf-yang-library", does the contents of
the
> yang library in both places have to be the same?
> 
> Anyway, I think the answer is that from the current specification, it
follows that
> the contents *will* be the same.
> 
> 
> /martin
> 
> 
> 
> > I still think it is wrong to tout "inline" and "use-schema" as the
> > same "schema mount" concept. If we clearly separated the two concepts,
> > "inline" would become an absolute no-brainer requiring just a single
> > YANG extension statement, and "use-schema" would also be easier to
> > explain with no confusing exceptions and qualifications. It's just
> > simple divide-and-conquer in terms of the spec, with no limitations
> > compared to the current options.
> >
> > Lada
> >
> > >
> > >> BTW, I think that normally LNE schema is supposed to be mounted
> > >> using the "inline" case, and then of course ietf-yang-library is
> > >> required but there is no "schema" entry under "schema-mounts" to
> > >> worry about.
> > > Both inline and non-inline LNE usage is expected in real systems...
> > >
> > > Lou
> > >> Lada
> > >>
> > >>> For example, ietf-ospf module augments ietf-routing. When we mount
> > >>> ietf-routing ietf-yang-library to LNE, should we list ietf-ospf in
> > >>> the mount module list? And also in ietf-yang-library?
> > >>>
> > >>>
> > >>>
> > >>> It would be great if these can be clarified.
> > >>>
> > >>>
> > >>>
> > >>> Thanks,
> > >>>
> > >>> - Xufeng
> >
> > --
> > Ladislav Lhotka, CZ.NIC Labs
> > PGP Key ID: 0xB8F92B08A9F76C67
> >
> >
> >
> >
> >