Sha256: ec534f1dcb12dac206f15495efd001a19c8699f516705723fc079968da6fd907
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
# -*- coding: utf-8 -*- module Dcmgr::Drivers class LocalStorage < SnapshotStorage include Dcmgr::Logger include Dcmgr::Helpers::CliHelper def download(filename) from = File.join(@volume_snaphost_path, filename) to = self.snapshot(filename) logger.debug("copying #{from} to #{to}") sh("/bin/cp -p %s %s", [from, to]) end def upload(filename) sh("/bin/mv %s %s", [self.snapshot(filename), File.join(@volume_snaphost_path, filename)]) end def delete(filename) sh("rm -f %s", [File.join(@volume_snaphost_path, filename)]) end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
wakame-vdc-agents-11.12.0 | lib/dcmgr/drivers/local_storage.rb |
wakame-vdc-dcmgr-11.12.0 | lib/dcmgr/drivers/local_storage.rb |