[netmod] can a leaf of type "empty" have a "default" value?
Kent Watsen <kent+ietf@watsen.net> Fri, 17 May 2019 19:52 UTC
Return-Path: <0100016ac75aaed8-31a9e97f-4419-49ad-ab8c-700a83d5f19e-000000@amazonses.watsen.net>
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 0D09712013E for <netmod@ietfa.amsl.com>; Fri, 17 May 2019 12:52:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.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 bKkiYQxXNiWg for <netmod@ietfa.amsl.com>; Fri, 17 May 2019 12:52:52 -0700 (PDT)
Received: from a8-96.smtp-out.amazonses.com (a8-96.smtp-out.amazonses.com [54.240.8.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A8D8612016D for <netmod@ietf.org>; Fri, 17 May 2019 12:52:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1558122770; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To:Feedback-ID; bh=vBrWKd1wL3Ru6tdA0mP7MDe9EiQIUYMTp9eCNW4ybm8=; b=ZA1FpZQvUAs9P6ACuDRkK28oQLT/0+gBUn4J7HY3adr48DchmSKBfsCx2/qCGTwy pTmruuiOhlo3GVpUlta4jQwMyKSgrKGAU6ZL24dhmd2YQVXUaRTDHu3RUv6gPyXfG4O JBJGjMScOqTy2IQODBcILiFJ4wQU08u5WB0pg79I=
From: Kent Watsen <kent+ietf@watsen.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_2836BD01-6E00-4EC9-ACDE-C34A66257DD1"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Message-ID: <0100016ac75aaed8-31a9e97f-4419-49ad-ab8c-700a83d5f19e-000000@email.amazonses.com>
Date: Fri, 17 May 2019 19:52:50 +0000
To: "netmod@ietf.org" <netmod@ietf.org>
X-Mailer: Apple Mail (2.3445.102.3)
X-SES-Outgoing: 2019.05.17-54.240.8.96
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9PbMShh4PpndVaC6z1lD2tcdsUE>
Subject: [netmod] can a leaf of type "empty" have a "default" value?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 17 May 2019 19:52:55 -0000
A leaf with type "empty" is often times used to represent a boolean: present == set, not present == not set. Is there a way in YANG to specify that the "empty" type leaf is "set" by default? Perhaps like this: leaf flag { type empty; default ""; } Kent // contributor
- [netmod] can a leaf of type "empty" have a "defau… Kent Watsen
- Re: [netmod] can a leaf of type "empty" have a "d… Reshad Rahman (rrahman)
- Re: [netmod] can a leaf of type "empty" have a "d… Kent Watsen