Example #1
0
 def download(self):
     puts('*** Downloading from %s' % (self.remote_path))
     puts('*** To %s' % (self.local_path))
     download = inviqa_confirm('>>> Continue?')
     with cd(self.remote_cd_path):
         if download:
             get(self.remote_path, self.local_path)
Example #2
0
 def upload(self):
     puts('*** Uploading %s' % (self.local_path))
     puts('*** To %s' % (self.remote_path))
     upload = inviqa_confirm('>>> Continue?')
     with cd(self.remote_cd_path):
         if upload:
             put(self.local_path, self.remote_path)
Example #3
0
 def shred(self):
     RemoteTaskNotifier(self.environment)
     remotefile_location = prompt('>>> Enter file location:')
     with cd(remotefile_location):
         run('ls')
         filename = prompt('>>> Enter file name to shred:')
         confirm_shred = inviqa_confirm("*** You are about to start shredding the file '%s'. Are you sure?" % (filename), False)
         if confirm_shred:
             sudo('shred -u -v %s' % (filename))
             fdisk = inviqa_confirm("*** Do you want to overwrite the free disk space?", False)
             if fdisk:
                 with cd('~'):
                     sudo('dd if=/dev/zero of=file.txt')
                     frm = inviqa_confirm("*** Do you want to delete file.txt?", False)
                     if frm:
                         sudo('rm file.txt')