Ejemplo n.º 1
0
 def scp(self, src, dst, download=False):
     """Use scp to copy a file from local host to remote device (if download
     is false), or from remote device to local host (if download is True)."""
     if download:
         return sshlib.scp(srchost=self.host, srcpath=src, dsthost=None, dstpath=dst,
             user=self.user, password=self.password, logfile=self._intf.fileobject().getlog())
     else:
         return sshlib.scp(srchost=None, srcpath=src, dsthost=self.host, dstpath=dst,
             user=self.user, password=self.password, logfile=self._intf.fileobject().getlog())
Ejemplo n.º 2
0
 def scp(self, rfile, dest, logfile=None):
     """Use the scp program to copy a file to or from this device."""
     from pycopia import sshlib
     sshlib.scp(self.name,
                rfile,
                dest,
                user=self.user,
                password=self.password,
                logfile=logfile)
Ejemplo n.º 3
0
 def scp(self, rfile, dest, logfile=None):
     """Use the scp program to copy a file to or from this device."""
     from pycopia import sshlib
     sshlib.scp(self.name, rfile, dest, user=self.user, password=self.password, logfile=logfile)