Sha256: df5d6e41137cbbcac5c2efe98005673c2f44f0316d02eb230ac8d325afd01b0d
Contents?: true
Size: 1.47 KB
Versions: 4
Compression:
Stored size: 1.47 KB
Contents
require 'nexussw/lxd' require 'tempfile' module NexusSW module LXD class Transport def execute(_command, _options = {}) raise "#{self.class}#execute not implemented" end def user(_user, _options = {}) raise "#{self.class}#user not implemented" end def read_file(_path) raise "#{self.class}#read_file not implemented" end def write_file(_path, _content, _options = {}) raise "#{self.class}#write_file not implemented" end def download_file(_path, _local_path) raise "#{self.class}#download_file not implemented" end def download_folder(_path, _local_path, _options = {}) raise "#{self.class}#download_folder not implemented" end def upload_file(_local_path, _path, _options = {}) raise "#{self.class}#upload_file not implemented" end def upload_folder(_local_path, _path, _options = {}) raise "#{self.class}#upload_folder not implemented" end # kludge for windows environment def self.remote_tempname(basename) tfile = Tempfile.new(basename) "/tmp/#{File.basename tfile.path}" ensure tfile.unlink end def self.local_tempdir return ENV['TEMP'] unless !ENV['TEMP'] || ENV['TEMP'].empty? return ENV['TMP'] unless !ENV['TMP'] || ENV['TMP'].empty? return ENV['TMPDIR'] unless !ENV['TMPDIR'] || ENV['TMPDIR'].empty? '/tmp' end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lxd-common-0.9.4 | lib/nexussw/lxd/transport.rb |
lxd-common-0.9.3 | lib/nexussw/lxd/transport.rb |
lxd-common-0.9.2 | lib/nexussw/lxd/transport.rb |
lxd-common-0.9.1 | lib/nexussw/lxd/transport.rb |