Exemple #1
0
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)
Exemple #2
0
 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())