Sha256: 6a5f258592c1ae0a5359f6fcd8400abed0fe960dd43a9c9804943e8526fb4088
Contents?: true
Size: 834 Bytes
Versions: 22
Compression:
Stored size: 834 Bytes
Contents
module Fog module OpenStack class Image class V2 class Real def download_image(image_id, _content_range = nil, params) # TODO: implement content range handling request_hash = { :expects => [200, 204], :method => 'GET', :raw_body => true, :path => "images/#{image_id}/file", } request_hash[:response_block] = params[:response_block] if params[:response_block] request(request_hash).body end end class Mock def download_image(_image_id, _content_range = nil) response = Excon::Response.new response.status = [200, 204][rand(2)] response.body = "" response end end end end end end
Version data entries
22 entries across 22 versions & 3 rubygems