Re: [netmod] Question on "bits" in YANG

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Thu, 25 February 2016 19:43 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8A6231B3340 for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 11:43:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.856
X-Spam-Level:
X-Spam-Status: No, score=-3.856 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.006] autolearn=ham
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 KKS8XbGPCXDy for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 11:43:39 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1E3801B333D for <netmod@ietf.org>; Thu, 25 Feb 2016 11:43:39 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id E2436191F; Thu, 25 Feb 2016 20:43:37 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id oTigPwk7r6zt; Thu, 25 Feb 2016 20:43:19 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Thu, 25 Feb 2016 20:43:37 +0100 (CET)
Received: from localhost (demetrius3.jacobs-university.de [212.201.44.48]) by hermes.jacobs-university.de (Postfix) with ESMTP id 2EFBC20036; Thu, 25 Feb 2016 20:43:37 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius3.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id hnAzsdcwE8M4; Thu, 25 Feb 2016 20:43:36 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 3A57F2002C; Thu, 25 Feb 2016 20:43:36 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id EEF3C39FE02F; Thu, 25 Feb 2016 20:43:34 +0100 (CET)
Date: Thu, 25 Feb 2016 20:43:34 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Sampathkumar Santhanakrishnan <sampathkumar.santhanakrishnan@ericsson.com>
Message-ID: <20160225194334.GA20558@elstar.local>
Mail-Followup-To: Sampathkumar Santhanakrishnan <sampathkumar.santhanakrishnan@ericsson.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <5ADC40FCE0FC7140AB4B8FD107A271C4219E9580@eusaamb109.ericsson.se>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <5ADC40FCE0FC7140AB4B8FD107A271C4219E9580@eusaamb109.ericsson.se>
User-Agent: Mutt/1.4.2.3i
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/fp-AB5A6qHQT4kkmxt5HBxoMz_g>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] Question on "bits" in YANG
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
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: Thu, 25 Feb 2016 19:43:40 -0000

On Thu, Feb 25, 2016 at 06:48:52PM +0000, Sampathkumar Santhanakrishnan wrote:

> I have a question on "bits" type in YANG. Does it make sense to use
> "bits" in "config:false" attributes ?

Yes, why would it not make sense?

> As per my understanding in the read-only uses cases, the bits
> "position" is not much useful. Please clarify.

Why do you think the position is meaningful for config true but not
for config false leafs or date that is shipped in RPCs or actions or
notifications? Here is the relevant text:

   The "position" statement, which is optional, takes as an argument a
   non-negative integer value that specifies the bit's position within a
   hypothetical bit field.  The position value MUST be in the range 0 to
   4294967295, and it MUST be unique within the bits type.  The value is
   unused by YANG and the NETCONF messages, but is carried as a
   convenience to implementors.

The position is a 'convenience to implementors' and this convenience
applies equally well to clients and servers.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>