lib/fog/rackspace/compute.rb in fog-maestrodev-1.14.0.20130806165225 vs lib/fog/rackspace/compute.rb in fog-maestrodev-1.15.0.20130829165835
- old
+ new
@@ -4,10 +4,14 @@
module Fog
module Compute
class Rackspace < Fog::Service
include Fog::Rackspace::Errors
+ class ServiceError < Fog::Rackspace::Errors::ServiceError; end
+ class InternalServerError < Fog::Rackspace::Errors::InternalServerError; end
+ class BadRequest < Fog::Rackspace::Errors::BadRequest; end
+
requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
recognizes :rackspace_auth_token, :rackspace_management_url, :rackspace_compute_v1_url, :rackspace_region
model_path 'fog/rackspace/models/compute'
@@ -202,16 +206,16 @@
end
def request(params, parse_json = true, &block)
super(params, parse_json, &block)
rescue Excon::Errors::NotFound => error
- raise NotFound.slurp(error, region)
+ raise NotFound.slurp(error, self)
rescue Excon::Errors::BadRequest => error
- raise BadRequest.slurp error
+ raise BadRequest.slurp(error, self)
rescue Excon::Errors::InternalServerError => error
- raise InternalServerError.slurp error
+ raise InternalServerError.slurp(error, self)
rescue Excon::Errors::HTTPStatusError => error
- raise ServiceError.slurp error
+ raise ServiceError.slurp(error, self)
end
def service_net?
@rackspace_servicenet == true
end