class CoalitionConnection(Connection): #os.system('ssh -Nf -L%d:localhost:%d %s@%s'%(port, port, username, hostname)) def __init__(self, hostname='tobias.socs.uoguelph.ca', port=19211, username='******', **kwargs ): self.control = CoalitionControl("http://localhost:%d" %port) Connection.__init__(self, hostname=hostname, username=username, **kwargs) forward_tunnel(port,'localhost', port, self.ssh.get_transport()) def run(self, **kwargs): return self.control.add(**kwargs)
def __init__(self, hostname='tobias.socs.uoguelph.ca', port=19211, username='******', **kwargs ): self.control = CoalitionControl("http://localhost:%d" %port) Connection.__init__(self, hostname=hostname, username=username, **kwargs) forward_tunnel(port,'localhost', port, self.ssh.get_transport())