Re: [netmod] Question on range for parent-rel-pos in ietf-hatrdware.yang versus RFC 6933 entPhysicalParentRelPos

2018-02-08 Thread Bogaert, Bart (Nokia - BE/Antwerp)
Thanks Martin, this makes sense.

Regards, Bart

-Original Message-
From: Martin Bjorklund [mailto:m...@tail-f.com] 
Sent: Thursday, February 8, 2018 9:24 AM
To: Bogaert, Bart (Nokia - BE/Antwerp) 
Cc: netmod@ietf.org
Subject: Re: [netmod] Question on range for parent-rel-pos in 
ietf-hatrdware.yang versus RFC 6933 entPhysicalParentRelPos

"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> During implementation we came across the following anomaly:
> 
> According to RFC 6933 entPhysicalParentRelPos the value should be set 
> to -1 in case there is no parent.
> The hardware YANG model defines this leaf as int32 with range "0 .. 
> 2147483647",  To be in-line with the referred RFC, shouldn't the range 
> be extended as "-1 .. 2147483647"?

In MIBs, people often use special values to indicate that the underlying thing 
doesn't exist.  In YANG we try to avoid this, and instead not instantiate the 
node.  This should probably have been clarified in the YANG module.


/martin

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question on range for parent-rel-pos in ietf-hatrdware.yang versus RFC 6933 entPhysicalParentRelPos

2018-02-08 Thread Martin Bjorklund
"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> During implementation we came across the following anomaly:
> 
> According to RFC 6933 entPhysicalParentRelPos the value should be
> set to -1 in case there is no parent.
> The hardware YANG model defines this leaf as int32 with range "0
> .. 2147483647",  To be in-line with the referred RFC, shouldn't the
> range be extended as "-1 .. 2147483647"?

In MIBs, people often use special values to indicate that the
underlying thing doesn't exist.  In YANG we try to avoid this, and
instead not instantiate the node.  This should probably have been
clarified in the YANG module.


/martin

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod