Sha256: 5dbe87594739b070895175d01eb32a038754ca166dcf02f4ea7c7d2528c26d22
Contents?: true
Size: 704 Bytes
Versions: 40
Compression:
Stored size: 704 Bytes
Contents
module Fog module Compute class OpenStack class Real def get_image_details(image_id) request( :expects => [200, 203], :method => 'GET', :path => "images/#{image_id}.json" ) end end class Mock def get_image_details(image_id) response = Excon::Response.new if image = list_images_detail.body['images'].find {|_| _['id'] == image_id} response.status = [200, 203][rand(1)] response.body = { 'image' => image } response else raise Fog::Compute::OpenStack::NotFound end end end end end end
Version data entries
40 entries across 40 versions & 5 rubygems