Re: [netmod] choice mandatory case mandatory

Martin Björklund <mbj+ietf@4668.se> Fri, 01 May 2020 10:52 UTC

Return-Path: <mbj+ietf@4668.se>
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 46C813A0EBB for <netmod@ietfa.amsl.com>; Fri, 1 May 2020 03:52:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_NAKED_TO_NUMERO=1.999, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=ofOYKT8f; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=fyFRpq60
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 1dwvGXfUURYG for <netmod@ietfa.amsl.com>; Fri, 1 May 2020 03:52:18 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 170453A0E82 for <netmod@ietf.org>; Fri, 1 May 2020 03:52:18 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 46B8F5C00E3; Fri, 1 May 2020 06:52:17 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 01 May 2020 06:52:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= S63TvPrEjIG3eV7Hys5QAMs5JUlPlv7sIiAt6xCQvz8=; b=ofOYKT8fScEtotWX TjOFMDwWwZ4awGITtUVl2YU1ccv0vlxwLCI5EcvPg904AscHmAw9YPk8IFIbbRGg PQwejAyAQrQWJnKeR2dxPLM63l7wvfRXJ/Vl+s8D8jDWJLJ6WBvMMz5UU8EnKQp0 9rzWegQ5wHTO0hnR6KC1BN5FikHJ6rpauEDn7OWN2uTQI/i46msYhjcIUS2FeMu9 vmaWsfmGk+sGw2I4rulPO8/jxocDg2VUy8hpBgvhxMIWzP1kip2fJMJDdI5kOLTD kB3NjPYte/m7/0gA/8Y+svXlXdDvzJCxfQYWMa86fO19ZmYu2znEsAE00VjYhQ1e Oo0TBg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=S63TvPrEjIG3eV7Hys5QAMs5JUlPlv7sIiAt6xCQv z8=; b=fyFRpq60VkS8i36mE1vcraKmpS8NXtDnbfbiRaAnxCi3erBINWHvLQs1s XbJ/8M3xVeHk4IOTB9DyNYO+XUSFSnXyAWX3Dl0sxLdoScLY60S5qrPUnUlS7exe cRfwm2h362TmLFj7FJl1GXN85UUDn+edVwvIiHzMUkAdv1i1nRbW09PAffLuf8oN VyJIppYByDJi73FzngvAFxWweLw0OzkHa/7S3NPrWuxczp80ZNKB2jSbmphc+qUk ggI+HXY/LGZEn0E/4jkO1oEcBYPKLO+x5EyqmQsmAn80RaddIafMn1HP+YmM0cRV jkPFE4pg55Eq0yxg/mlsh8zloTnWQ==
X-ME-Sender: <xms:YP-rXqaTXc5-chEEaji-zp_IqcUTIGKG8IqQbBhFmZdgMbJZL5wnxg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieejgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthejre dtredtvdenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpedtgefgtdduudejkeelvedvie dvveehieegfeefteefgfeffeekheffvdefveffgfenucfkphepudehkedrudejgedrgedr geegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh gsjhdoihgvthhfseegieeikedrshgv
X-ME-Proxy: <xmx:YP-rXhr3q6JaqFDJhl3mVjWfwrA-BzWn88w1nztZc0MA-RhHs0Jnvg> <xmx:YP-rXv9-3NwFOiyOLnwfEnDG1AMEY4LoIk6B0XoVW7ST_i3cuAnTjw> <xmx:YP-rXg82DmgdzsurVcX_bppHxsZnOa9XvFMDw_AXHBDHT3Kpj9TwAg> <xmx:Yf-rXjlAZwv4P8XbrtL-oyb8kHbKs2lw8BPUSTz1nFoz1KPw3vmZGw>
Received: from localhost (unknown [158.174.4.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 66DDE3065F48; Fri, 1 May 2020 06:52:16 -0400 (EDT)
Date: Fri, 01 May 2020 12:52:14 +0200
Message-Id: <20200501.125214.1680672299672620160.id@4668.se>
To: ietfc@btconnect.com
Cc: netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <DB7PR07MB4522606C24F0A91C89B78E66A0AB0@DB7PR07MB4522.eurprd07.prod.outlook.com>
References: <6D4B643D-3264-4B00-A993-A140F5C54F30@cisco.com> <20200428160140.xzmqxf6c3u47ce7m@anna.jacobs.jacobs-university.de> <DB7PR07MB4522606C24F0A91C89B78E66A0AB0@DB7PR07MB4522.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/FCTMDyBhczCPTyvTOuc24EWxiKQ>
Subject: Re: [netmod] choice mandatory case mandatory
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, 01 May 2020 10:52:20 -0000

tom petch <ietfc@btconnect.com> wrote:
> given
> rpc tunnels
>   input
>     container tunnel
>       choice filter
>          mandatory true

This means that some node from some case must be present.

>          case all
>            leaf all
>            mandatory true

I assume that this mandatory is inside "leaf all".  This means that if
this case is selected (i.e., at least some node from the case is
present), then this leaf must be present as well.

>           case one
>               leaf justone
> what does mandatory do?  I could understand one mandatory or three
> mandatory but struggle to see the point of two.

You need to look at complete model for the choice to see if it makes
sense or not.

>
> Something like this is in draft-ietf-teas-yang-te


/martin