Sha256: 6ebbe1836d1e84ca6ff78d7898a773a3236e405c6335a2a1ac5bcf5436fe87e8
Contents?: true
Size: 909 Bytes
Versions: 1
Compression:
Stored size: 909 Bytes
Contents
module Uricp::Strategy class RbdCachedPut include Uricp::Strategy::Common include Uricp::Strategy::CacheCommon def appropriate? return proposal if to.scheme == 'rbd' && rbd_snapshot_spec?(from) && rbd_cache_name.nil? && !rbd_sequence_complete? debug "#{self.class.name}: not appropriate" false end def command "rbd clone --id #{rbd_id} '#{rbd_image_spec(from)}' '#{rbd_image_spec(to)}';" end def proposal @proposed_options = options.dup @proposed_options['from_uri'] = to if options['rbd_cache_target'] @proposed_options['to_uri'] = options['rbd_cache_target'] @proposed_options['rbd_cache_name'] = rbd_image_spec(to) @proposed_options['rbd_flatten'] ||= @proposed_options['rbd_cache_name'] @proposed_options.delete('rbd_cache_target') end self end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
uricp-0.0.21 | lib/uricp/strategy/rbd_cached_put.rb |