lib/fog/rackspace/monitoring.rb in fog-maestrodev-1.15.0.20130829165835 vs lib/fog/rackspace/monitoring.rb in fog-maestrodev-1.15.0.20130927082724

- old
+ new

@@ -38,10 +38,12 @@ collection :metrics model :data_point collection :data_points model :check_type collection :check_types + model :notification + collection :notifications request_path 'fog/rackspace/requests/monitoring' request :list_agent_tokens request :list_alarms request :list_alarm_examples @@ -50,30 +52,35 @@ request :list_metrics request :list_data_points request :list_check_types request :list_overview request :list_notification_plans + request :list_notifications request :get_agent_token request :get_alarm request :get_alarm_example request :get_check request :get_entity + request :get_notification request :create_agent_token request :create_alarm request :create_check request :create_entity + request :create_notification request :update_check request :update_entity request :update_alarm + request :update_notification request :delete_agent_token request :delete_alarm request :delete_check request :delete_entity + request :delete_notification request :evaluate_alarm_example class Mock < Fog::Rackspace::Service @@ -120,23 +127,23 @@ "X-Response-Id" end private - def request(params, parse_json = true, &block) - super(params, parse_json, &block) - rescue Excon::Errors::BadRequest => error - raise BadRequest.slurp(error, self) - rescue Excon::Errors::Conflict => error - raise Conflict.slurp(error, self) - rescue Excon::Errors::NotFound => error - raise NotFound.slurp(error, self) - rescue Excon::Errors::ServiceUnavailable => error - raise ServiceUnavailable.slurp(error, self) - rescue Excon::Errors::InternalServerError => error - raise InternalServerError.slurp(error, self) - rescue Excon::Errors::HTTPStatusError => error - raise ServiceError.slurp(error, self) + def request(params, parse_json = true) + super + rescue Excon::Errors::BadRequest => error + raise BadRequest.slurp(error, self) + rescue Excon::Errors::Conflict => error + raise Conflict.slurp(error, self) + rescue Excon::Errors::NotFound => error + raise NotFound.slurp(error, self) + rescue Excon::Errors::ServiceUnavailable => error + raise ServiceUnavailable.slurp(error, self) + rescue Excon::Errors::InternalServerError => error + raise InternalServerError.slurp(error, self) + rescue Excon::Errors::HTTPStatusError => error + raise ServiceError.slurp(error, self) end def authenticate options = { :rackspace_api_key => @rackspace_api_key,