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

"Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com> Thu, 09 March 2017 11:46 UTC

Return-Path: <bart.bogaert@nokia.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 599B0129562 for <netmod@ietfa.amsl.com>; Thu, 9 Mar 2017 03:46:45 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 KZdaEyjXUfsA for <netmod@ietfa.amsl.com>; Thu, 9 Mar 2017 03:46:43 -0800 (PST)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0124.outbound.protection.outlook.com [104.47.0.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C60FF12954C for <netmod@ietf.org>; Thu, 9 Mar 2017 03:46:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yxcAtYFr5P2Iu1zAUTtxLOyrOFl1F+pJe3lNtGhO0nc=; b=k8+giSx5EL0UA7pI9mgN2Toi30ZoA+o/GoIf9nanUCoqjCEBt1HJiKkoHlxwX713vSXgqhyJ7Q3SsNRHaoHM5f06FQEgwJdcfYjUZc/dgcwA44l0luzolF0AD6wY/tprKOK+PlNpD9H1EBajrZqU3zysdwLz/9egY+80JJSlZDI=
Received: from AM2PR07MB0627.eurprd07.prod.outlook.com (10.160.54.154) by AM2PR07MB0627.eurprd07.prod.outlook.com (10.160.54.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Thu, 9 Mar 2017 11:46:40 +0000
Received: from AM2PR07MB0627.eurprd07.prod.outlook.com ([10.160.54.154]) by AM2PR07MB0627.eurprd07.prod.outlook.com ([10.160.54.154]) with mapi id 15.01.0947.022; Thu, 9 Mar 2017 11:46:40 +0000
From: "Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com>
To: Martin Bjorklund <mbj@tail-f.com>, "j.schoenwaelder@jacobs-university.de" <j.schoenwaelder@jacobs-university.de>
Thread-Topic: [netmod] I-D Action: draft-ietf-netmod-entity-02.txt
Thread-Index: AQHSl6caLbof61hN1kCkZer1IzW2RaGKudKAgAAwwgCAAAUDYIAAIaRggAFUqMA=
Date: Thu, 09 Mar 2017 11:46:40 +0000
Message-ID: <AM2PR07MB0627DAA0B0816C94B5E275E894210@AM2PR07MB0627.eurprd07.prod.outlook.com>
References: <20170308.140730.165843214949076575.mbj@tail-f.com> <AM2PR07MB06274901D9A0765AA847E026942E0@AM2PR07MB0627.eurprd07.prod.outlook.com> <20170308145133.GC9814@elstar.local> <20170308.162542.2034349701486649544.mbj@tail-f.com>
In-Reply-To: <20170308.162542.2034349701486649544.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: tail-f.com; dkim=none (message not signed) header.d=none;tail-f.com; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [135.245.240.248]
x-microsoft-exchange-diagnostics: 1; AM2PR07MB0627; 7:rupj9JsSwQsGUdgJaC77+ubRRvBfrlUqDu5hjW9C3povhR3qM1u8VKbkA2BoJKTW8acQ/c4an7bIuux39/1MClpBgSAi82ikfVZc1RSSO3r1W+keNcUhaBEzj8JCM81dUDMZ0YhVB5xZxHhHfM7AIRePewLVMMGNqaAnZpiBOkzDpXZmYgUdAdio94BsNQlRkiwqGpzWaB7o8LeQ3fadrSXrLiGaGtab29T5ksg+U53EqLEvKGyLK7zk0IqgrkBwWt84ODygDNMtL5Ev+JaRDYdp+J4nYHGwepRFmQgyV5j8huHuleCNG8fO4mW4A1pfKA7hLVunZK9wG664CuRzWA==
x-ms-office365-filtering-correlation-id: 8c228c1a-97c9-41d6-1fe3-08d466e1f354
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:AM2PR07MB0627;
x-microsoft-antispam-prvs: <AM2PR07MB06270B64BA80AC56D3F9116194210@AM2PR07MB0627.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:AM2PR07MB0627; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB0627;
x-forefront-prvs: 0241D5F98C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39410400002)(39850400002)(39840400002)(39450400003)(24454002)(5660300001)(7696004)(2950100002)(77096006)(2900100001)(106116001)(229853002)(189998001)(6246003)(102836003)(3846002)(3280700002)(6116002)(53936002)(2906002)(3660700001)(305945005)(7736002)(38730400002)(74316002)(4326008)(93886004)(230783001)(8676002)(9686003)(6506006)(25786008)(50986999)(76176999)(54356999)(55016002)(81166006)(99936001)(99286003)(8936002)(6436002)(122556002)(2501003)(33656002)(66066001)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR07MB0627; H:AM2PR07MB0627.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_04F7_01D298D3.315A0430"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2017 11:46:40.1040 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB0627
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/hLVDnsKa31ExT-ax_On618EogSc>
Cc: "netmod@ietf.org" <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: Thu, 09 Mar 2017 11:46:45 -0000

So; to make this work the YANG property of the parent leaf in the config
data tree should be set to false to allow a reference to hardware-state,
correct?

Regards, Bart
 
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> On Wed, Mar 08, 2017 at 02:48:15PM +0000, Bogaert, Bart (Nokia - BE)
wrote:
> > Hi,
> > 
> > > 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.
> > 
> > [Bart Bogaert] Ok, so you are looking for a solution that refers to 
> > an entry in the state tree.  I always thought that one could not 
> > refer from config to state but it seems I misunderstood this since 
> > this is exactly what you are proposing.
> > 
> > > 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?
> > 
> > [Bart Bogaert] Since that seems possible this would solve the 
> > problem.  I'm checking this with our people.
> 
> Are you discussing leafref to a config false node with require 
> instance false?

Yes.

> I am not sure this is valid YANG.

It is valid,  section 9.9 on leafref says:

   If the referring node represents configuration data and the
   "require-instance" property (Section 9.9.3) is "true", the referred
   node MUST also represent configuration.



/martin