class NexusSW::LXD::Transport
Public Class Methods
chdir_mutex()
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 54 def self.chdir_mutex @chdir_mutex ||= Mutex.new end
local_tempdir()
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 47 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
remote_tempname(basename)
click to toggle source
kludge for windows environment
# File lib/nexussw/lxd/transport.rb, line 40 def self.remote_tempname(basename) tfile = Tempfile.new(basename) "/tmp/#{File.basename tfile.path}" ensure tfile.unlink end
Public Instance Methods
download_file(_path, _local_path)
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 23 def download_file(_path, _local_path) raise "#{self.class}#download_file not implemented" end
download_folder(_path, _local_path, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 27 def download_folder(_path, _local_path, _options = {}) raise "#{self.class}#download_folder not implemented" end
execute(_command, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 7 def execute(_command, _options = {}) raise "#{self.class}#execute not implemented" end
read_file(_path)
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 15 def read_file(_path) raise "#{self.class}#read_file not implemented" end
upload_file(_local_path, _path, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 31 def upload_file(_local_path, _path, _options = {}) raise "#{self.class}#upload_file not implemented" end
upload_folder(_local_path, _path, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 35 def upload_folder(_local_path, _path, _options = {}) raise "#{self.class}#upload_folder not implemented" end
user(_user, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 11 def user(_user, _options = {}) raise "#{self.class}#user not implemented" end
write_file(_path, _content, _options = {})
click to toggle source
# File lib/nexussw/lxd/transport.rb, line 19 def write_file(_path, _content, _options = {}) raise "#{self.class}#write_file not implemented" end