Sha256: da4be082d5e6ecdc28154662d10ec529e3af9f6d3e86b7b03be53c910eae095a
Contents?: true
Size: 928 Bytes
Versions: 14
Compression:
Stored size: 928 Bytes
Contents
module Fog module Image class OpenStack 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 Real class Mock def download_image(_image_id, _content_range = nil) response = Excon::Response.new response.status = [200, 204][rand(2)] response.body = "" response end # def list_tenants end # class Mock end # class OpenStack end end # module Identity end # module Fog
Version data entries
14 entries across 14 versions & 1 rubygems