bugraoz93 commented on code in PR #45300:
URL: https://github.com/apache/airflow/pull/45300#discussion_r1978278986
##########
airflow/cli/commands/remote_commands/connection_command.py:
##########
@@ -108,18 +110,54 @@ def _connection_to_dict(conn: Connection) -> dict:
}
-def create_default_connections(args):
- db_create_default_connections()
+@provide_cli_api_client
+def create_default_connections(args, cli_api_client=NEW_CLI_API_CLIENT):
+ """Create default connections."""
+ cli_api_client.connections.create_defaults()
+ print("Default connections have been created.")
+
+
+def _response_to_connection(response: ConnectionResponse) -> Connection:
+ # TODO: Return is_encrypted from API to properly convert to Connection,
otherwise it will be None
Review Comment:
`is_encrypted` is a column in the database and a parameter for `connection`.
Normally, the direct database call returns this but we need to include this
functionality if we want to bring back `is_encrypted`. This TODO is making that
happen after this PR. I have updated the TODO :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]