craig-rueda commented on code in PR #22433:
URL: https://github.com/apache/superset/pull/22433#discussion_r1050130172


##########
superset/extensions/__init__.py:
##########
@@ -109,6 +111,31 @@ def init_app(self, app: Flask) -> None:
         app.wsgi_app = SupersetProfiler(app.wsgi_app, self.interval)  # type: 
ignore
 
 
+class SSHManager:  # pylint: disable=too-few-public-methods
+    local_bind_address = "127.0.0.1"
+
+    @classmethod
+    def mutator(cls, sqlalchemy_url: str, server: 
sshtunnel.SSHTunnelForwarder) -> str:
+        # override any ssh tunnel configuration object
+        url = make_url_safe(sqlalchemy_url)
+        return url.set(
+            host=cls.local_bind_address,
+            port=server.local_bind_port,
+        )
+
+    @classmethod
+    def create_tunnel(
+        cls,
+        ssh_address_or_host: str,

Review Comment:
   Instead of breaking these fields out, just pass in the SSHConfig model object



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to