Re: [netmod] ?= ?==?utf-8?q? mandatory choice with non-presence container cas

Ladislav Lhotka <lhotka@nic.cz> Tue, 25 June 2019 07:39 UTC

Return-Path: <lhotka@nic.cz>
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 02344120236 for <netmod@ietfa.amsl.com>; Tue, 25 Jun 2019 00:39:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAD_ENC_HEADER=0.001, BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=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 Vu-ZB2CKoxNs for <netmod@ietfa.amsl.com>; Tue, 25 Jun 2019 00:39:05 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 998011201F2 for <netmod@ietf.org>; Tue, 25 Jun 2019 00:39:04 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id 6FE7F182172E; Tue, 25 Jun 2019 09:40:23 +0200 (CEST)
Received: from localhost (unknown [172.29.2.111]) by trail.lhotka.name (Postfix) with ESMTPSA id 019E4182172C; Tue, 25 Jun 2019 09:40:21 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Kent Watsen <kent@watsen.net>, Michal =?utf-8?Q?Va=C5=A1ko?= <mvasko@cesnet.cz>
Cc: "netmod\@ietf.org" <netmod@ietf.org>
In-Reply-To: <0100016b8c38574d-9d8aad57-3e50-45c4-98bb-24091a765ded-000000@email.amazonses.com>
References: <ad3-5d110500-55-63a2bc80@40796557> <0100016b8c38574d-9d8aad57-3e50-45c4-98bb-24091a765ded-000000@email.amazonses.com>
Mail-Followup-To: Kent Watsen <kent@watsen.net>, Michal =?utf-8?Q?Va=C5=A1?= =?utf-8?Q?ko?= <mvasko@cesnet.cz>, "netmod\@ietf.org" <netmod@ietf.org>
Date: Tue, 25 Jun 2019 09:39:01 +0200
Message-ID: <87tvceunai.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/_fzjiHgnlCxFFDcNrLtGKoesW7w>
Subject: Re: [netmod] ?= ?==?utf-8?q? mandatory choice with non-presence container cas
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, 25 Jun 2019 07:39:07 -0000

Kent Watsen <kent@watsen.net> writes:

> Hi Michal, 
>  
>> I agree, but these valid data were correctly printed into 
>> invalid data. I do not think printing is allowed to change the 
>> validity of data. 
>  
> The NP-container text is unclear.

This issue IMO has more to do with the "mandatory" statement under 
"choice". Similar problems can be caused by data nodes that depend 
on "when". For example:

choice sel {
    madatory true;
    leaf foo {
        when "...";
        ...
    }
    leaf bar { ... }
    leaf baz { ... }

If "foo" exists in instance data but its when condition becomes 
false, the server is expected to remove the "foo" instance, but 
what next? The data becomes invalid, but the server can hardly 
include "bar" or "baz" on its own.

Lada

> I'm unsure if you saw the thread in NETCONF, but I filed this 
> issue over the weekend.  Please add to it, if only to include a 
> link to this thread: 
> 
> 	https://github.com/netmod-wg/yang-next/issues/88. 
> 
> Thanks, Kent 
>   
> _______________________________________________ netmod mailing 
> list netmod@ietf.org 
> https://www.ietf.org/mailman/listinfo/netmod 

-- 
Ladislav Lhotka Head, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67