1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/joyent/requests/analytics/get_instrumentation.rb
2014-01-21 16:24:25 +00:00

26 lines
688 B
Ruby

module Fog
module Joyent
class Analytics
class Real
def get_instrumentation(id)
request(
:path => "#{@joyent_username}/analytics/instrumentations/#{id}",
:method => "GET",
:expects => 200,
:idempotent => true
)
end
end
class Mock
def get_instrumentation(id)
raise Fog::Compute::Joyent::Errors::NotFound.new('not found') unless id == self.data[:instrumentation]['id']
response = Excon::Response.new
response.status = 200
response.body = self.data[:instrumentation]
response
end
end
end
end
end