Loading cloudcontrol/server/clients/cli.py +14 −0 Original line number Diff line number Diff line Loading @@ -712,6 +712,20 @@ class CliHandler(RegisteredCCHandler): stun.close() return rcode @listed def forward(self, label, login, port, destination='127.0.0.1'): """ Forward a TCP port to the client. """ # Create the tunnel to the node: try: host_client = self.server.get_client(login) except KeyError: raise KeyError('Specified client is not connected') s2n_tun = host_client.forward(port, destination) # Create tunnel to the CLI self.client.register_tunnel('forward', host_client, s2n_tun) def forward_call(self, login, func, *args, **kwargs): """ Forward a call to a connected client and return result. Loading Loading
cloudcontrol/server/clients/cli.py +14 −0 Original line number Diff line number Diff line Loading @@ -712,6 +712,20 @@ class CliHandler(RegisteredCCHandler): stun.close() return rcode @listed def forward(self, label, login, port, destination='127.0.0.1'): """ Forward a TCP port to the client. """ # Create the tunnel to the node: try: host_client = self.server.get_client(login) except KeyError: raise KeyError('Specified client is not connected') s2n_tun = host_client.forward(port, destination) # Create tunnel to the CLI self.client.register_tunnel('forward', host_client, s2n_tun) def forward_call(self, login, func, *args, **kwargs): """ Forward a call to a connected client and return result. Loading