[yang-doctors] Question on when statment and container presence
Christian Hopps <chopps@chopps.org> Fri, 22 January 2021 08:21 UTC
Return-Path: <chopps@chopps.org>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
by ietfa.amsl.com (Postfix) with ESMTP id 2F1613A0FC5
for <yang-doctors@ietfa.amsl.com>; Fri, 22 Jan 2021 00:21:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001,
SPF_NONE=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 S-L_nEFBMTZS for <yang-doctors@ietfa.amsl.com>;
Fri, 22 Jan 2021 00:21:13 -0800 (PST)
Received: from smtp.chopps.org (smtp.chopps.org [54.88.81.56])
by ietfa.amsl.com (Postfix) with ESMTP id B48473A0FC2
for <yang-doctors@ietf.org>; Fri, 22 Jan 2021 00:21:13 -0800 (PST)
Received: from stubbs.int.chopps.org (047-050-069-038.biz.spectrum.com
[47.50.69.38])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by smtp.chopps.org (Postfix) with ESMTPSA id 1448761668;
Fri, 22 Jan 2021 08:21:12 +0000 (UTC)
From: Christian Hopps <chopps@chopps.org>
Content-Type: multipart/signed;
boundary="Apple-Mail=_DC338CE9-043D-424B-BA17-A4681A7ED034";
protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\))
Message-Id: <663C5375-3BCD-4A46-944D-716BF5764E34@chopps.org>
Date: Fri, 22 Jan 2021 03:21:11 -0500
Cc: Christian Hopps <chopps@chopps.org>
To: yang-doctors@ietf.org
X-Mailer: Apple Mail (2.3654.40.0.2.32)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/be-Jg0h1SREhbqwXZx0eCsab8WU>
Subject: [yang-doctors] Question on when statment and container presence
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>,
<mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>,
<mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Jan 2021 08:21:15 -0000
Hi,
The libyang folks have made a change in their libyang2 branch. The chnage is causing containers to be implicitly marked as presence containers if they include a "when" statement i.e.,:
module main {
yang-version 1.1;
namespace "http://example.com/main";
prefix m;
leaf afi-safi-name {
type string;
}
container ipv4-flowspec {
when "../afi-safi-name = 'ipv4-flowspec'";
leaf flowspec-config {
type uint8;
}
}
}
So in this case "ipv4-flowspec" is being changed as if it had a presence statement.
On of the authors indicated that this was supported indirectly by some mail on netmod; however, my search is not turning anything up.
I think this is incorrect as the presence of the container based on the when is an "implicit" (some other leaf value is set) not "explicit" meaning.
Thoughts?
Thanks,
Chris.
- [yang-doctors] Question on when statment and cont… Christian Hopps
- Re: [yang-doctors] Question on when statment and … Martin Björklund