コード例 #1
0
ファイル: test_integration.py プロジェクト: jfurrow/dcos
def test_ssh_tunnel_collection(sshd_manager):
    with sshd_manager.run(10) as sshd_ports:
        tunnel_args = {
            'user': getpass.getuser(),
            'key_path': sshd_manager.key_path,
            'host_names': ['127.0.0.1:' + str(i) for i in sshd_ports]}
        with tunnel_collection(**tunnel_args) as tunnels:
            for t in tunnels:
                tunnel_write_and_run(t.write_to_remote, t.remote_cmd)
コード例 #2
0
def test_ssh_tunnel_collection(sshd_manager):
    with sshd_manager.run(10) as sshd_ports:
        tunnel_args = {
            'user': getpass.getuser(),
            'key': sshd_manager.key,
            'host_names': ['127.0.0.1:' + str(i) for i in sshd_ports]}
        with tunnel_collection(**tunnel_args) as tunnels:
            for t in tunnels:
                tunnel_write_and_run(t.write_to_remote, t.remote_cmd)
コード例 #3
0
 def tunnels(self, hosts):
     hostports = [host.public_ip + ':22' for host in hosts]
     with tunnel_collection(self.user, self.key, hostports) as tunnels:
         yield tunnels
コード例 #4
0
ファイル: cluster.py プロジェクト: cmaloney/dcos
 def tunnels(self, hosts):
     hostports = [host.public_ip + ':22' for host in hosts]
     with tunnel_collection(self.user, self.key, hostports) as tunnels:
         yield tunnels