This is unlikely to be an issue specific to the REST server implementation, but we do need somewhere to track potential issues with multiple objects exposed over REST. We may want to move this bug, or create dependencies within other packages. Anyway:
We have a few cases of incorrect types being reported over REST. Two examples I've seen:
Inventory items: the fault and present properties are reported as strings, rather than booleans:
(So a serialisation doing a check on data.present will return true here; necessitating a string comparison for some values, but not others)
Boot options: the boot_flags value under settings/host0 is a hex string, rather than a number. Although this can also be "Default", we can represent that as null or 0 instead.
Also, power cap is a number, but represented as a string
This is unlikely to be an issue specific to the REST server implementation, but we do need somewhere to track potential issues with multiple objects exposed over REST. We may want to move this bug, or create dependencies within other packages. Anyway:
We have a few cases of incorrect types being reported over REST. Two examples I've seen:
Inventory items: the
fault
andpresent
properties are reported as strings, rather than booleans:(So a serialisation doing a check on
data.present
will returntrue
here; necessitating a string comparison for some values, but not others)Boot options: the boot_flags value under
settings/host0
is a hex string, rather than a number. Although this can also be "Default", we can represent that asnull
or0
instead.Also, power cap is a number, but represented as a string