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

From: Sampathkumar Santhanakrishnan <[email-masked]>
Date: Thu, 25 Feb 2016 18:48:52 +0000

Hello,
I have a question on "bits" type in YANG. Does it make sense to use "bits" in "config:false" attributes ?
As per my understanding in the read-only uses cases, the bits "position" is not much useful. Please clarify.

Thanks & Regards,
Sampath

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 25 Feb 2016 20:43:34 +0100

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

---

From: Sampathkumar Santhanakrishnan <[email-masked]>
Date: Fri, 26 Feb 2016 23:20:33 +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:[email-masked]] 
Sent: Thursday, February 25, 2016 11:44 AM
To: Sampathkumar Santhanakrishnan
Cc: [email-masked]
Subject: Re: [netmod] Question on "bits" in YANG

> "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 is a 'convenience to implementors' and this convenience applies equally well to clients and servers.

/js

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Sat, 27 Feb 2016 09:55:04 +0100

On Fri, Feb 26, 2016 at 11:20:33PM +0000, Sampathkumar Santhanakrishnan wrote:

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

Either side can use or ignore the bit positions.

/js