1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

create instrumentations, handle errors better, get an individual instrumentation

This commit is contained in:
Kevin Olbrich 2013-12-12 19:44:51 +00:00
parent 6f42542600
commit df73f445d7
5 changed files with 13 additions and 0 deletions

View file

@ -18,6 +18,8 @@ module Fog
request :describe_analytics
request :list_instrumentations
request :get_instrumentation
request :create_instrumentation
model_path 'fog/joyent/models/analytics'
@ -132,6 +134,9 @@ module Fog
response
rescue Excon::Errors::HTTPStatusError => e
if e.response.headers["Content-Type"] == "application/json"
e.response.body = json_decode(e.response.body)
end
raise_if_error!(e.request, e.response)
end

View file

@ -173,6 +173,9 @@ module Fog
response
rescue Excon::Errors::HTTPStatusError => e
if e.response.headers["Content-Type"] == "application/json"
e.response.body = json_decode(e.response.body)
end
raise_if_error!(e.request, e.response)
end

View file

@ -12,6 +12,11 @@ module Fog
load(data)
end
def get(id)
data = service.get_instrumentation(id).body
new(data)
end
end
end
end