On Wed, Jan 10, 2018 at 10:55:46PM -0800, Adam Roach wrote:
> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
> 
> I have one correction and one question about the ietf-hardware YANG module.
> 
>          enum exa {
>            value 14;
>            description
>              "Data scaling factor of 10^15.";
>          }
>          enum peta {
>            value 15;
>            description
>              "Data scaling factor of 10^18.";
>          }
> 
> I believe this is backwards -- "peta" should be 10^15, while "exa" should be 
> 10^18.

I agree this is wrong. This bug was most likely inherited from RFC
3433 but luckily there is a confirmed errata for RFC 3433. So Martin
should fix this in the YANG module (and his copy of the MIB module).

>      typedef sensor-value-precision {
>        type int32 {
>          range "-8 .. 9";
>        }
> 
> Why is this an int32 rather than an int8?

Likely because they way this was defined in the MIB module:

   SYNTAX Integer32 (-8..9)

I assume using int8 would be fine as well. (Note that YANG update
rules allow to expand the range restriction but they do not allow to
replace int8 with int32; so the range resulting from the type is a
hard limit, the range restriction is an expandable limit. I guess in
this case using int8 would be safe but then this is a slight (but
likely not important) departure from the MIB module.)

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

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to