Re: [netmod] I-D Action: draft-ietf-netmod-entity-02.txt

Martin Bjorklund <mbj@tail-f.com> Wed, 08 March 2017 13:07 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 E82C3129671 for <netmod@ietfa.amsl.com>; Wed, 8 Mar 2017 05:07:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, 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 VsMdr0IE-0PJ for <netmod@ietfa.amsl.com>; Wed, 8 Mar 2017 05:07:35 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 789D4129670 for <netmod@ietf.org>; Wed, 8 Mar 2017 05:07:35 -0800 (PST)
Received: from localhost (unknown [50.225.114.198]) by mail.tail-f.com (Postfix) with ESMTPSA id 121241AE030D; Wed, 8 Mar 2017 14:07:31 +0100 (CET)
Date: Wed, 08 Mar 2017 14:07:30 +0100
Message-Id: <20170308.140730.165843214949076575.mbj@tail-f.com>
To: bart.bogaert@nokia.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AM2PR07MB06279B5FF45770892B69273D942E0@AM2PR07MB0627.eurprd07.prod.outlook.com>
References: <D62E05768DBAFF42A72B9F4954476D65010EB1F736@FR712WXCHMBA09.zeu.alcatel-lucent.com> <20170307.194147.1826195488124124099.mbj@tail-f.com> <AM2PR07MB06279B5FF45770892B69273D942E0@AM2PR07MB0627.eurprd07.prod.outlook.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/Xxj996kgvkNJj3MurO-Iv9UN4OE>
Cc: netmod@ietf.org
Subject: Re: [netmod] I-D Action: draft-ietf-netmod-entity-02.txt
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: Wed, 08 Mar 2017 13:07:37 -0000

"Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com> wrote:
> Hi Martin,
> 
> > "Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com> wrote:
> > > One more comment: 
> > > 
> > > The BBF proposal defines 'contained-in' as a leafref, the current 
> > > version of the hardware model has defined 'parent' as a string.  In 
> > > the state container parent is defined as a leafref.  Parent type 
> > > should be the same in both config and state container.
> > 
> > The reason for the 'string' in the config tree is that when it is 
> > pre-configured, it doesn't really refer to a component in the state tree.
> > If it eventually matches a real component, the server will instantiate 
> > an entry in the state tree, and at this point the parent
> > *is* a proper reference to another component.
> > 
> > Note that the underlying type is the same in both cases.
> > [Bart Bogaert] Having it as leafref allows to verify that the parent 
> > being configured is actually existing in the entity model (or defined 
> > in the same transaction).  Why would we remove the modelling 
> > capability to check this consistency?
> 
> Do you mean a leafref to /hardware/component/name or
> /hardware-state/component/name?
> [Bart Bogaert] I was referring to /hardware/component, so parent is a
> leafref to /hardware/component/name.  In /hardware-state it is a leafref to
> /hardware-state/component/name

Ok.

> If we pick the former, it will not be possible to configure a component with
> a system controlled parent (unless you also add the system controlled parent
> to the configuration).
> [Bart Bogaert] Is there a reason to only have this parent in the state tree
> and not in the config tree?

I am not sure I understand the question.  Suppose the config tree is
empty, and the system boots and populates the state tree with all
detected harwdare.  Next, a client would like to pre-provision a
module in a chassis that exists in state.  If the leafref is to the
config tree, the client would have to create both the chassis and the
module in the config tree, since the leafef would otherwise fail to
validate.

> If we pick the latter you will not get any validation (since it has to be
> require-instance false).
> 
> It is fine w/ me to change the type string to a leafref of the former type.

Correction: I am fine with changing the string to a leafref to state.

> [Bart Bogaert] If we leave it as a string it would mean that an external
> application would have to check whether the value of the string actually
> corresponds to a component that should exist (in the case of a
> non-system-controlled parent)?

So are you ok with a leafref to state?


/martin