airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] caddac commented on a change in pull request #3684: [AIRFLOW-2840] - add update connections cli option
Date Sun, 02 Dec 2018 03:59:56 GMT
caddac commented on a change in pull request #3684: [AIRFLOW-2840] - add update connections
cli option
URL: https://github.com/apache/incubator-airflow/pull/3684#discussion_r238084129
 
 

 ##########
 File path: airflow/api/client/local_client.py
 ##########
 @@ -51,3 +51,83 @@ def create_pool(self, name, slots, description):
     def delete_pool(self, name):
         p = pool.delete_pool(name=name)
         return p.pool, p.slots, p.description
+
+    def add_connection(self, conn_id,
+                       conn_uri=None,
+                       conn_type=None,
+                       conn_host=None,
+                       conn_login=None,
+                       conn_password=None,
+                       conn_schema=None,
+                       conn_port=None,
+                       conn_extra=None):
+        """
+
+        :param conn_id:
+        :param conn_uri:
+        :param conn_type:
+        :param conn_host:
+        :param conn_login:
+        :param conn_password:
+        :param conn_schema:
+        :param conn_port:
+        :param conn_extra:
+        :return: The new Connection
+        """
+        return connections.add_connection(conn_id,
 
 Review comment:
   So the idea here was the client(s) would return the same objects (regardless of client
type) and leave formatting the response to the api (cli or http). What about returning the
json representation from the client, (which the local and json clients could do) and still
leaving formatting to the API. TBH, the differences in clients confuses me and I'm still not
sure what  or why we have two different clients given that the end users seem to interact
with the API rather than the client directly. Any clarity you could provide there would be
appreciated.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message