[netmod] leaf-list with default(s), no way to have explicitly empty list

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Mon, 19 March 2018 12:50 UTC

Return-Path: <jason.sterne@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 B5B3A12D880 for <netmod@ietfa.amsl.com>; Mon, 19 Mar 2018 05:50:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.91
X-Spam-Level:
X-Spam-Status: No, score=-2.91 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, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 VBm_6NoQZf_6 for <netmod@ietfa.amsl.com>; Mon, 19 Mar 2018 05:50:18 -0700 (PDT)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00096.outbound.protection.outlook.com [40.107.0.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 38716127601 for <netmod@ietf.org>; Mon, 19 Mar 2018 05:50:18 -0700 (PDT)
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=n42Tmz4C8iCeem+RwwZfJqiM+aC+Fm/m7W8ZED/qjfg=; b=oQjzlYZO9aae23lxEQlT5ns4r4SG/5UNdxKFj+afUxoc/0AwmGvAwRDQ8uArPLgYqXUal6XLiIrP+dRPfg27vMG7XBFsHuUhKPdQQAfRuBuCX0cF5No7EKLRjqwsRzj4DRDgGBQ4DfLmZT0ILQD749t7ZRfwDB0N2ouRnVZRBm0=
Received: from AM3PR07MB1124.eurprd07.prod.outlook.com (10.163.187.158) by AM3PR07MB0535.eurprd07.prod.outlook.com (10.141.47.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Mon, 19 Mar 2018 12:50:15 +0000
Received: from AM3PR07MB1124.eurprd07.prod.outlook.com ([fe80::10f9:c880:5c9b:c105]) by AM3PR07MB1124.eurprd07.prod.outlook.com ([fe80::10f9:c880:5c9b:c105%7]) with mapi id 15.20.0609.009; Mon, 19 Mar 2018 12:50:14 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: leaf-list with default(s), no way to have explicitly empty list
Thread-Index: AdO/gCoMRKqxbwvsRWOnfVJB/1VAMA==
Date: Mon, 19 Mar 2018 12:50:14 +0000
Message-ID: <AM3PR07MB11243E053FD5F76411FE28259BD40@AM3PR07MB1124.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jason.sterne@nokia.com;
x-originating-ip: [135.245.212.28]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM3PR07MB0535; 7:xeWI7BoDG0Uc//TOenoNYucOJdTJvrNORfYNzU6laMl6CjFXdsjo5P0DUh4SljEWAC8osNUV7qkLLnOJ0UtCXYnWNCgxzACM4KkWz+nxMKMJBXg3gobiAKpUiU4mxuWKZbExUvFzXRSTgtfAb9kDvlGb0VdJcFYyOy7XqNppTh3ZVaUFGneOBNzn8Xa165KtdBDOSeaAH9VXZQNxSrtA7DAcoDLdrff0vuVuutj808Gu+7rX/hlP+FOsje5x9iGm
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: a08e01e4-ef5c-4f7b-76f6-08d58d97f5ef
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:AM3PR07MB0535;
x-ms-traffictypediagnostic: AM3PR07MB0535:
x-microsoft-antispam-prvs: <AM3PR07MB0535863A8CD5C748E4710E619BD40@AM3PR07MB0535.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231221)(11241501184)(806099)(944501244)(52105095)(10201501046)(6055026)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:AM3PR07MB0535; BCL:0; PCL:0; RULEID:; SRVR:AM3PR07MB0535;
x-forefront-prvs: 06167FAD59
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(346002)(39380400002)(396003)(39860400002)(189003)(199004)(53754006)(478600001)(2900100001)(99286004)(14454004)(86362001)(74316002)(6116002)(790700001)(33656002)(2351001)(3846002)(2906002)(7696005)(25786009)(6506007)(8676002)(66066001)(53936002)(105586002)(55016002)(6306002)(5640700003)(54896002)(9686003)(8936002)(6916009)(81166006)(81156014)(1730700003)(7736002)(3280700002)(5250100002)(2501003)(6436002)(97736004)(5660300001)(186003)(68736007)(5630700001)(3660700001)(26005)(106356001)(316002)(102836004)(43043002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM3PR07MB0535; H:AM3PR07MB1124.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: dBJQwL7haOt5vDd0DfJvmLSgvRa/nw94j/joph49YHTeVdgT8RdnQQ5aZarphE6iGPYcO98s/LdDLbf8QFYMz5kbnx387xXmyGS+t20TCZQl/Y7aCxRCKLV7g88KU9cLfx/wSz+wTrxo3wIo0vthxN9QzpYnaOBP6aNVysqo+2ma9xV1wob5/cz3QIJkIssydvQ9bKFtvmpEkzXtM/mV3sGNLLUQpVG9r3fDLxcjYe/v6PbA9L7FO/ehxMopRU7uasMFUIKJloMd5VrS6kJTbgevBe49flETVg5c3x55op77HVRvVM3JN9zuRevIkI3sAGP9ipkKe4tnSbQXoYsPiqRg51EGWnu5qvrYPwf6pNqU1kNQNISkAuost5yOEKI7
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_AM3PR07MB11243E053FD5F76411FE28259BD40AM3PR07MB1124eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a08e01e4-ef5c-4f7b-76f6-08d58d97f5ef
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 12:50:14.7842 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR07MB0535
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/CL5C2lujIGpCAX-A4-Vf6sINo6s>
Subject: [netmod] leaf-list with default(s), no way to have explicitly empty list
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: Mon, 19 Mar 2018 12:50:22 -0000

Hi all,

In YANG 1.1 we can specify defaults for leaf-lists.

I assume that means there is no way for a NETCONF client to explicitly create/declare an empty list (i.e. a list with no values) when there is a default (i.e. declare that no values are to be in use) ?

In that case, if the ability to explicitly say "no values are in use" in a leaf-list with defaults would have to be done in some other way, e.g. perhaps using a choice like this:

choice source {
    case source {
        leaf-list source { ...  default "x"; }
    }
    case none {
        leaf no-sources { type empty; }
    }
}

Rgds,
Jason