softlayer/fog-softlayer — pull request #7 by fernandes (2014-06-17 14:54:39+00:00)
Title: [Compute] Improved how bare metal flag is handled

Problem:
As discussed on https://github.com/softlayer/fog-softlayer/commit/db7a5ddd3bf49f5e75b82504e78cd13bd86b623f#diff-b0b4d908705742a03395a3c19814d530R25 bare_metal flag was being set being "guessing" what kind of server was in the response.

Resolution purposed:
As @SLsthompson suggested, bare_metal flag would be set on a request, so after every request I'm injecting a bare_metal flag on Excon response body, so the Fog::Compute::Server model is able to set the right bare_metal flag

To ensure the correct behavior on setting bare_metal flag, I created some triggers:
* Fog::Compute::Server.new raise Exception if no bare_metal attribute is set (will be really useful when @cphrmky runs the tests against the SoftLayer API, I only made the mocks)
* Created the tests to ensure the Exception and behavior of bare_metal flag
* Set bare_metal setter to private, It can only be called internally by initializer