Sha256: 5fcb27eed87d0d8a82051b15236bf850990206cb20a70ac2499b18ebc6bbe5fa

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

module Uricp::Strategy
  class RbdSweeper
    include Uricp::Strategy::Common

    def appropriate?
      return proposal if options['rbd_snapshot'] && rbd_sequence_complete?

      debug "#{self.class.name}: not appropriate"
      false
    end

    def command
      "rbd snap unprotect --id #{rbd_id} '#{options['rbd_snapshot']}' && " \
      "rbd snap rm --id #{rbd_id} '#{options['rbd_snapshot']}';"
    end

    def proposal
      @proposed_options = options.dup
      @proposed_options.delete('rbd_snapshot')
      self
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uricp-0.0.21 lib/uricp/strategy/rbd_sweeper.rb
uricp-0.0.20 lib/uricp/strategy/rbd_sweeper.rb