# File lib/ohai/mixin/ec2_metadata.rb, line 108 def metadata_get(id, api_version) path = "/#{api_version}/meta-data/#{id}" response = http_client.get(path) case response.code when '200' response.body when '404' Ohai::Log.debug("Encountered 404 response retreiving EC2 metadata path: #{path} ; continuing.") nil else raise "Encountered error retrieving EC2 metadata (#{path} returned #{response.code} response)" end end