MCPcopy Create free account
hub / github.com/apache/cloudstack / scp

Method scp

tools/marvin/marvin/sshClient.py:192–199  ·  view source on GitHub ↗
(self, srcFile, destPath)

Source from the content-addressed store, hash-verified

190 return ret
191
192 def scp(self, srcFile, destPath):
193 transport = Transport((self.host, int(self.port)))
194 transport.connect(username=self.user, password=self.passwd)
195 sftp = SFTPClient.from_transport(transport)
196 try:
197 sftp.put(srcFile, destPath)
198 except IOError as e:
199 raise e
200
201 def __del__(self):
202 self.close()

Callers 2

stopAgentOnHostMethod · 0.95

Calls 3

intFunction · 0.85
connectMethod · 0.65
putMethod · 0.45

Tested by 2

stopAgentOnHostMethod · 0.76