Sha256: dcd0d37a05e3a65562d996b6d2f1ce0c2dcf08725370403a09a35b0653f1d3c5
Contents?: true
Size: 856 Bytes
Versions: 11
Compression:
Stored size: 856 Bytes
Contents
# frozen_string_literal: true module Uricp::Strategy class RbdCacheUpload include Uricp::Strategy::Common def appropriate? if compression_required? || conversion_required? debug "#{self.class.name}: not ready to upload" return false end if rbd_cache_upload_available? case from.scheme when 'pipe', 'file' return proposal if to.scheme == 'rbd' end end debug "#{self.class.name}: not appropriate" false end def command "rbd import --no-progress --id #{rbd_id} -#{data_source} '#{rbd_cache_name}';" end def proposal @proposed_options = options.dup @proposed_options['from_uri'] = rbd_uri(rbd_cache_name) self end def data_source return if from.scheme == 'pipe' " <'#{from.path}'" end end end
Version data entries
11 entries across 11 versions & 1 rubygems