lib/testlab/container/io.rb in testlab-1.12.0 vs lib/testlab/container/io.rb in testlab-1.13.0

- old
+ new

@@ -83,19 +83,14 @@ local_file = File.expand_path(local_file) root_fs_path = self.lxc.fs_root.split(File::SEPARATOR).last please_wait(:ui => @ui, :message => format_object_action(self, 'Compress', :cyan)) do self.node.bootstrap(<<-EOF) -set -x -set -e - du -sh #{self.lxc.container_root} - cd #{self.lxc.container_root} find #{root_fs_path} -depth -print0 | cpio -o0 | pbzip2 -#{compression} -vfczm#{PBZIP2_MEMORY} > #{remote_file} chown ${SUDO_USER}:${SUDO_USER} #{remote_file} - ls -lah #{remote_file} EOF end File.exists?(local_file) and FileUtils.rm_f(local_file) @@ -103,13 +98,10 @@ @total_size = self.node.ssh.sftp.stat!(remote_file).size self.node.download(remote_file, local_file, :on_progress => method(:progress_callback), :read_size => READ_SIZE) self.node.bootstrap(<<-EOF) -set -x -set -e - rm -fv #{remote_file} EOF @ui.stdout.puts(format_message("Your shipping container is now exported and available at '#{local_file}'!".green.bold)) @@ -155,20 +147,14 @@ self.node.exec(%(sudo rm -fv #{remote_file}), :silence => true, :ignore_exit_status => true) self.node.upload(local_file, remote_file, :on_progress => method(:progress_callback), :read_size => READ_SIZE) please_wait(:ui => @ui, :message => format_object_action(self, 'Expand', :cyan)) do self.node.bootstrap(<<-EOF) -set -x -set -e - ls -lah #{remote_file} - rm -rf #{self.lxc.fs_root} cd #{self.lxc.container_root} pbzip2 -vdcm#{PBZIP2_MEMORY} #{remote_file} | cpio -uid && rm -fv #{remote_file} - du -sh #{self.lxc.container_root} - rm -fv #{remote_file} EOF end self.up