当前位置: 首页>>代码示例>>Python>>正文


Python RemoteMachineShellConnection.copy_file_local_to_remote方法代码示例

本文整理汇总了Python中remote.remote_util.RemoteMachineShellConnection.copy_file_local_to_remote方法的典型用法代码示例。如果您正苦于以下问题:Python RemoteMachineShellConnection.copy_file_local_to_remote方法的具体用法?Python RemoteMachineShellConnection.copy_file_local_to_remote怎么用?Python RemoteMachineShellConnection.copy_file_local_to_remote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在remote.remote_util.RemoteMachineShellConnection的用法示例。


在下文中一共展示了RemoteMachineShellConnection.copy_file_local_to_remote方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: load_with_ops

# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import copy_file_local_to_remote [as 别名]
 def load_with_ops(self):
     self.setup_xdcr()
     for cluster in self.get_cb_clusters():
         for node in cluster.get_nodes():
             shell = RemoteMachineShellConnection(node)
             shell.copy_file_local_to_remote("pytests/sg/resources/sg_localhost_default_xattrs.conf",
                                             "/home/sync_gateway/sync_gateway.json")
             # TODO: works for Centos6 only now
             shell.execute_command('initctl stop sync_gateway')
             shell.execute_command('initctl start sync_gateway')
     self.load_data_topology()
     self.verify_results(sg_run=True)
开发者ID:arod1987,项目名称:testrunner,代码行数:14,代码来源:xdcr_xattr_sdk.py

示例2: writeFile

# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import copy_file_local_to_remote [as 别名]
 def writeFile(self, host):
     shell = RemoteMachineShellConnection(host)
     try:
         result = shell.copy_file_local_to_remote(self.PATH_SASLAUTHD_LOCAL + self.FILE_SASLAUTHD, \
                                                  self.PATH_SASLAUTHD + self.FILE_SASLAUTHD)
     finally:
         shell.disconnect()
开发者ID:prasanna135,项目名称:testrunner,代码行数:9,代码来源:rbacmain.py

示例3: writeFile

# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import copy_file_local_to_remote [as 别名]
 def writeFile(self, pathAuditFile=None, fileName=None, lines=None):
     if (pathAuditFile is None):
         pathAuditFile = self.getAuditConfigPathInitial()
     if (fileName is None):
         fileName = audit.AUDITCONFIGFILENAME
     shell = RemoteMachineShellConnection(self.host)
     try:
         with open ("/tmp/audit.json", 'w') as outfile:
             json.dump(lines, outfile)
         result = shell.copy_file_local_to_remote('/tmp/audit.json', pathAuditFile + fileName)
     finally:
         shell.disconnect()
开发者ID:EricACooper,项目名称:testrunner,代码行数:14,代码来源:auditmain.py

示例4: webHookMutipleWebHooks

# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import copy_file_local_to_remote [as 别名]
 def webHookMutipleWebHooks(self):
     for server in self.servers:
         shell = RemoteMachineShellConnection(server)
         type = shell.extract_remote_info().type.lower()
         shell.copy_file_local_to_remote("pytests/sg/simpleServe.go", "{0}/tmp/simpleServe2.go".format(self.folder_prefix))
         self.log.info('=== Starting SimpleServe second instances')
         if type == 'windows':
             shell.terminate_process(process_name='simpleServe2.exe')
             output, error = shell.execute_command_raw('c:/Go/bin/go.exe run c:/tmp/simpleServe2.go 8082'
                                   ' >{0}/tmp/simpleServe2.txt 2>&1 &'.format(self.folder_prefix))
         else:
             shell.terminate_process(process_name='simpleServe2')
             shell.execute_command("kill $(ps aux | grep '8082' | awk '{print $2}')")
             output, error = shell.execute_command_raw('go run /tmp/simpleServe2.go 8082'
                                               '  >/tmp/simpleServe2.txt 2>&1 &')
         self.start_sync_gateway(shell, self.configfile)
         shell.log_command_output(output, error)
         success, revision, status = self.create_doc_logfiles(shell, self.doc_id, self.doc_content,
                                     ['{0}/tmp/simpleServe.txt'.format(self.folder_prefix),
                                      '{0}/tmp/simpleServe2.txt'.format(self.folder_prefix)])
         self.assertTrue(success)
         shell.disconnect()
开发者ID:EricACooper,项目名称:testrunner,代码行数:24,代码来源:sgwebhooktests.py

示例5: _copy_node_key_chain_cert

# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import copy_file_local_to_remote [as 别名]
 def _copy_node_key_chain_cert(self,host,src_path,dest_path):
     shell = RemoteMachineShellConnection(host)
     shell.copy_file_local_to_remote(src_path,dest_path)
开发者ID:chethanrao,项目名称:testrunner-archive,代码行数:5,代码来源:x509main.py


注:本文中的remote.remote_util.RemoteMachineShellConnection.copy_file_local_to_remote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。