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

Sampathkumar Santhanakrishnan <sampathkumar.santhanakrishnan@ericsson.com> Fri, 26 February 2016 23:20 UTC

Return-Path: <sampathkumar.santhanakrishnan@ericsson.com>
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 D76C91B32D5 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2016 15:20:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 19bwOG1aQzy6 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2016 15:20:36 -0800 (PST)
Received: from usplmg21.ericsson.net (usplmg21.ericsson.net [198.24.6.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DF11D1B32CB for <netmod@ietf.org>; Fri, 26 Feb 2016 15:20:35 -0800 (PST)
X-AuditID: c6180641-f799c6d000007d66-8e-56d0dda7d2a9
Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id C9.F9.32102.8ADD0D65; Sat, 27 Feb 2016 00:20:08 +0100 (CET)
Received: from EUSAAMB109.ericsson.se ([147.117.188.126]) by EUSAAHC005.ericsson.se ([147.117.188.87]) with mapi id 14.03.0248.002; Fri, 26 Feb 2016 18:20:34 -0500
From: Sampathkumar Santhanakrishnan <sampathkumar.santhanakrishnan@ericsson.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Thread-Topic: [netmod] Question on "bits" in YANG
Thread-Index: AdFvp4yPrlpBi+eWRxun0pzcY5uwwQAhywgAAC8lU+A=
Date: Fri, 26 Feb 2016 23:20:33 +0000
Message-ID: <5ADC40FCE0FC7140AB4B8FD107A271C4219E99FF@eusaamb109.ericsson.se>
References: <5ADC40FCE0FC7140AB4B8FD107A271C4219E9580@eusaamb109.ericsson.se> <20160225194334.GA20558@elstar.local>
In-Reply-To: <20160225194334.GA20558@elstar.local>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [147.117.188.10]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsUyuXRPuO6KuxfCDD4eEbK4uvEno8X8i42s DkweS5b8ZPLYcMAzgCmKyyYlNSezLLVI3y6BK+PUlK3MBZP5Kjb0XWBpYJzG3cXIySEhYCLx u3k+I4QtJnHh3nq2LkYuDiGBI4wS9y+9AksICSxnlJh93AzEZhMIkpj3dzELiC0i4CDRv62b DcRmFlCXuHPqMZgtLGAgseL7GiaIGkOJxWc/MUPYVhJbLv9iBbFZBFQllh7ezA5i8wr4Snxu PM4OsatU4uPSr0BzODg4BYwkfvQbg4QZBWQlvjSuZoZYJS5x68l8JoibBSSW7DnPDGGLSrx8 /I8VwlaSmLT0HCtEvY7Egt2foM7Ulli28DUzxFpBiZMzn7BMYBSbhWTsLCQts5C0zELSsoCR ZRUjR2lxQU5uupHhJkZghByTYHPcwbi31/MQowAHoxIP74cbF8KEWBPLiitzDzFKcDArifCG LAMK8aYkVlalFuXHF5XmpBYfYpTmYFES553rvD5MSCA9sSQ1OzW1ILUIJsvEwSnVwGi+7kRF p+aEouMi/NkvFx8s2HDbvHarg967LSfXLEj+L5LQJaF1yn33rf+Ffr+a7qw+sqiznfvko+9n T/mUR5yateV2MJdkYLjR+7/iW/7dutumsuZC8y2u31FzH9w/l2aveer1V546g5x1Gw5mNQr9 Y7FedMbsefyeJhndLdVcdx8t/xq+3zBXiaU4I9FQi7moOBEAl1Fmr4wCAAA=
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/O3ggzAz65v9i9t_JPd6d7gYqwco>
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
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, 26 Feb 2016 23:20:40 -0000

My assumption was "position" will help the implementers on the server side as they can map it directly to their bitmask implementation.
When "position" is carried north bound in read-only data,  the client may not be using it right ?

Thanks & Regards,
Sampath

-----Original Message-----
From: Juergen Schoenwaelder [mailto:j.schoenwaelder@jacobs-university.de] 
Sent: Thursday, February 25, 2016 11:44 AM
To: Sampathkumar Santhanakrishnan
Cc: netmod@ietf.org
Subject: Re: [netmod] Question on "bits" in YANG

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/>