Sha256: 994380bb40bb3cb9b0c5bcd412591936cb3fc02453cf0f36a53fbe35039ec7b6
Contents?: true
Size: 922 Bytes
Versions: 14
Compression:
Stored size: 922 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(1)] 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 & 2 rubygems