2013-12-12 19:45:05 +00:00
|
|
|
module Fog
|
|
|
|
module Joyent
|
|
|
|
class Analytics
|
|
|
|
class Real
|
|
|
|
def get_instrumentation(id)
|
|
|
|
request(
|
|
|
|
:path => "#{@joyent_username}/analytics/instrumentations/#{id}",
|
|
|
|
:method => "GET",
|
|
|
|
:expects => 200
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
2014-01-03 15:12:25 -05:00
|
|
|
|
|
|
|
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
|
2013-12-12 19:45:05 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|