Okay, I've reworked the patch from above to make it a (slightly?) more generic "hint system". Check: https://github.com/opscode/ohai/pull/73
The idea is that we drop JSON files in /etc/chef/ohai/hints (or other paths that you might configure). The file names are keys, the contents of the file are values. You don't have to have anything inside the file - the existence of the file may be enough depending on the hint you need, but maybe you need additional data for the hint (in which case you can populate the file with some JSON). That's really up to the plugin using the hint.
For the current situation, it seemed like enough just to have a rackspace or ec2 file, but I could imagine putting some data inside rackspace that says "oh hey we are on the v2 API so do this, not that", or in the ec2 file that says "this is ec2-vpc, and this additional value will be helpful to you".
- I needed platform_specific_path from Chef::Config so I blindly copied it in. Can we move it to mixlib-config?
- I wanted to use deep_merge to merge all possible hints for the same key together (from all the possible paths), but we don't use the deep_merge gem anymore and the deep_merge code is now locked up inside the chef code. But maybe we don't really want to merge the hints together after all.
- There are probably some more specs to be written, but someone better at TDD than me will have to give me some hints on what types of specs to write.
Okay, let me know what you think!