Sha256: 7251fa5f255943e3071782f7005eaa6052aba65a5f90e34afca387d9185d0e4d

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 Bytes

Contents

# -*- coding: utf-8 -*-

module Dcmgr::Drivers
  
  class S3Storage < SnapshotStorage
    include Dcmgr::Logger
    include Dcmgr::Helpers::SnapshotStorageHelper

    def download(filename) 
      cmd = "get %s %s %s" 
      args = [@bucket, key(filename), self.snapshot(filename)]
      execute(cmd, args)
    end

    def upload(filename)
      cmd = "put %s %s %s"
      args = [@bucket, key(filename), self.snapshot(filename)]
      execute(cmd, args)
    end

    def delete(filename)
      cmd = "rm %s %s"
      args = [@bucket, key(filename)]
      execute(cmd, args)
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.12.0 lib/dcmgr/drivers/s3_storage.rb
wakame-vdc-dcmgr-11.12.0 lib/dcmgr/drivers/s3_storage.rb