[netmod] Default choice case with only empty leaf - Is this allowed ?

"Beauville, Yves (Nokia - BE/Antwerp)" <yves.beauville@nokia.com> Tue, 05 November 2019 09:07 UTC

Return-Path: <yves.beauville@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 4817C120815 for <netmod@ietfa.amsl.com>; Tue, 5 Nov 2019 01:07:24 -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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 3sPxA1pIaUxy for <netmod@ietfa.amsl.com>; Tue, 5 Nov 2019 01:07:22 -0800 (PST)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0713.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::713]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 34587120810 for <netmod@ietf.org>; Tue, 5 Nov 2019 01:07:22 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R4iZWwmzZEi7yCturdtYjgO+92g8TTHxCKCo+wQCSIOykpOjhFRbxCBFJYbDxwFM0rgoe8uvM8AyRAgyMDnnAYcoxmHP+Ob7dALhjE7OdNpNdfKPmg3pNY6zXK1KDH3O4hLv95/+zJOOrtUFH1OerjkyPzJ57Jc8Ys+Gqn93tiFEYrVHFwcpf/fN9ojvcr/csOzUtrSa6OYGZ3Vy6iOXLWILZQgxrY3+b+9tXi2qM7OwHVWThtCzbH3YdKun/9Gdvk7k651yTfRIZ0edArGCSH9kn3FPb1Ny5CFwFY0ZFWAf7+leM2zSCiTWNkJqYqc/Bg4ODy/PjU4vBIphbOHIbA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lHUZJPIUt+snXOGNUgSRI4tfqYe2tadmN8cBgwqXdM4=; b=a5rksWmI5r2Vv0chXwUIOIgMzu+3HByLZ0mvIPO99aTCNQFRSjRkijS3IK/QrtKSAgv1LWVQjrSVvCF26NPTZM9zkZJa3afw0zp2Lm/xW3OVIWIAzw+niBdhqhhANDIGuFNrYqC5fk08dJdaY92z/ddRlytcadwoxV/StUQcRwEIGUD3gN+HfGqXg5avAAjKTWRUiHiv77HN39Jg93CSVE/GFtxNW7fadhnGO3wfE9T5gC2yvnUjFD1YoAlXTDDONvgczfkHto9j40rP0D0vGjDbC1DMizMMRrOw+LwbUv0aLnfsQEfNTQ5bnO45Af1olEY63gtLClR1lM9vACKx1A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lHUZJPIUt+snXOGNUgSRI4tfqYe2tadmN8cBgwqXdM4=; b=L/Hi5ghWtRlRcToeARNg2bL5WchSr1BTZ+8UfdyvUIiXr6gkZQvH2I4moaYcU9uyF/nVBlks5O/CRBhl11tC6G7hOJYdWszkcrU6K4gchqgUB0v8DR7f3nvLloATsg0KHxNCUfPG7vqPzH1YhpHbiqETrbvdwyd7CYs9l2174ik=
Received: from AM4PR07MB3508.eurprd07.prod.outlook.com (10.171.190.33) by AM4PR07MB3362.eurprd07.prod.outlook.com (10.171.189.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.13; Tue, 5 Nov 2019 09:07:19 +0000
Received: from AM4PR07MB3508.eurprd07.prod.outlook.com ([fe80::dc8a:8066:88e4:5844]) by AM4PR07MB3508.eurprd07.prod.outlook.com ([fe80::dc8a:8066:88e4:5844%5]) with mapi id 15.20.2430.014; Tue, 5 Nov 2019 09:07:19 +0000
From: "Beauville, Yves (Nokia - BE/Antwerp)" <yves.beauville@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Default choice case with only empty leaf - Is this allowed ?
Thread-Index: AQHVk7htRz74KbJBOkeMVuDQIpk5Dg==
Date: Tue, 5 Nov 2019 09:07:19 +0000
Message-ID: <e0931dbe-5478-436b-c5de-ba6820c1b73d@nokia.com>
Accept-Language: fr-BE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [131.228.32.166]
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
x-clientproxiedby: PR0P264CA0180.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::24) To AM4PR07MB3508.eurprd07.prod.outlook.com (2603:10a6:205:b::33)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=yves.beauville@nokia.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 854ad437-8cf9-47f7-6521-08d761cf8fdb
x-ms-traffictypediagnostic: AM4PR07MB3362:
x-microsoft-antispam-prvs: <AM4PR07MB3362085F1F55E51A35D36A1B897E0@AM4PR07MB3362.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 0212BDE3BE
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(346002)(366004)(136003)(39860400002)(189003)(199004)(86362001)(58126008)(14444005)(2906002)(81166006)(99286004)(31686004)(6916009)(186003)(52116002)(386003)(316002)(5640700003)(6506007)(66556008)(7736002)(25786009)(1730700003)(102836004)(8936002)(66946007)(66476007)(64756008)(71200400001)(2351001)(66446008)(305945005)(71190400001)(6116002)(3846002)(31696002)(6486002)(81156014)(8676002)(65956001)(65806001)(256004)(14454004)(6436002)(2616005)(486006)(4744005)(5660300002)(36756003)(6512007)(66066001)(2501003)(26005)(476003)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB3362; H:AM4PR07MB3508.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 3LvX1jsnPDqXp/YEYOOlwN0NocfUesXnHEEND/ZFQy2KmSEQg6E7cgxAAcAStLPRa1n7RMmy/d8S1S3szKOgxcGEjfn09WGp9y3Ll88G4FyukOrHh1VYr14reOi6pYtRFoyoeoxBID1C6FQ9rNkgqqYw8tJ+orACjJMos/XpPAf1OhRg9t2WlbxXaUgfqGZOBCt8QmJ4iitw5k0Ez+KsO3uWR6AoRWzs4VPJrPbXpaBP2wZuxRRWnQ7QFW1td5VEphRx7CIhFVeXmEZKBlZKfm2TzNG8RPVwhDQ+oEYdFH+dm7nBKtprWb8F5/RdHfW+Nw0wFWT7qW1vHImlUriQ8WItsuEBdtKUSAkGiw+ki/UkG/N9mGan688f6l5ba7i606GemTW5ebva2No4lwhzlTAPnvECuUZSGdNVqsYl/b9JPTK//F1woci9p5FvT7xM
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <430FAA14606B634EA560ADC9ED4B71CE@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 854ad437-8cf9-47f7-6521-08d761cf8fdb
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2019 09:07:19.7378 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: E/WdMRUx/nvVT1CajEEjHpxfZSsRdn/0c4ryA+N2p2657JCMyC//0WmnTwxp0jdVUy3+yO/zs89XVXqBi7q2uQbeXBq73U2MCxIWaA1Og7Q=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3362
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DCOTormwv-0Z6hAdbgaxOfwxaBs>
Subject: [netmod] Default choice case with only empty leaf - Is this allowed ?
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: Tue, 05 Nov 2019 09:07:24 -0000

Hello,

In the example provided in section 7.9.3 of RFC7950, is it legal to 
redefine the default case like below?

      container transfer {
        choice how {
          default manual;     // redefined
          case interval {
            leaf interval {
              type uint16;
              units minutes;
              default 30;
            }
          }
          case daily {
            leaf daily {
              type empty;
            }
            leaf time-of-day {
              type string;
              units 24-hour-clock;
              default "01.00";
            }
          }
          case manual {
            leaf manual {
              type empty;
            }
          }
        }
      }

What is expected to happen when an <edit-config> request creates the 
'transfer' container without providing any data for the choice 'how'?

Since an empty leaf conveys information by its presence or absence, and 
cannot have a default value, is it correct to assume that the 'manual' 
leaf will be present, even though it was not explicitly created by the 
<edit-config> request?

Can someone clarify?


Yves