mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
25 lines
653 B
Ruby
25 lines
653 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
|
|
)
|
|
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
|