Entity-Manager's Configuration Generation leaves address as string

Patrick Venture venture at google.com
Thu Aug 29 00:27:06 AEST 2019


I think I've figured out what's happening.

If a configuration has no fields that are changed by the template code
(or possibly even in that case), nothing happens to the values.  So,
the property Address is left "0x54" if that's what it is.  And the
code is templated, so it just adds that property of type string to the
dbus sensor configuration.  As this is definitely what I'm seeing.
Json doesn't support ints that are written raw as hex, so wrapping
them as strings is what's required to make the json parse.  I've
worked around this problem by just using decimal everywhere, but
that's harder to read when comparing to schematics.

Would it make sense to make the add property code less field agnostic
so that if the field is Address and the Interface for
configuration.XXX that it checks to see if it's a hex string?  Or,
maybe the templateChar replace -- if that supports converting the hex
string to a raw integer value type should always get hit?

Thanks,
Patrick


More information about the openbmc mailing list