Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added serial_number to system_profile per OHAI-395. The current code is
a little ugly, it sets the attribute to an array and uses the 'mini' detailLevel. I defined a hash to choose the detail level per dataType, iterate through an array for each detail level (this is to only shell out once per detail level rather than each dataType) and finally sort the array to make sure it's in the same order as before my changes compatibility. The result is this is compatible with the old structure and: node['system_profile'][10]["_items"][0]["serial_number"] will return the serial number. Changing this to: node['system_profile'][SPHardwareDataType"]["serial_number"] would be preferable but break compatibility.
- Loading branch information