class Fog::Rackspace::NetworkingV2::Mock
Public Class Methods
new(options)
click to toggle source
# File lib/fog/rackspace/networking_v2.rb, line 79 def initialize(options) @rackspace_api_key = options[:rackspace_api_key] end
Public Instance Methods
request(params)
click to toggle source
# File lib/fog/rackspace/networking_v2.rb, line 83 def request(params) Fog::Mock.not_implemented end
response(params={})
click to toggle source
# File lib/fog/rackspace/networking_v2.rb, line 87 def response(params={}) body = params[:body] || {} status = params[:status] || 200 headers = params[:headers] || {} response = Excon::Response.new(:body => body, :headers => headers, :status => status) if params.key?(:expects) && ![*params[:expects]].include?(response.status) raise(Excon::Errors.status_error(params, response)) else response end end