OmairK commented on a change in pull request #9329:
URL: https://github.com/apache/airflow/pull/9329#discussion_r441519443



##########
File path: airflow/api_connexion/endpoints/pool_endpoint.py
##########
@@ -16,18 +16,32 @@
 # under the License.
 from flask import request
 
+from connexion import NoContent
+
 from airflow.api_connexion import parameters
-from airflow.api_connexion.exceptions import NotFound
-from airflow.api_connexion.schemas.pool_schema import PoolCollection, 
pool_collection_schema, pool_schema
+from airflow.api_connexion.exceptions import NotFound, AlreadyExists
+from airflow.api_connexion.schemas.pool_schema import (
+    PoolCollection,
+    pool_collection_schema,
+    pool_schema,
+)
 from airflow.models.pool import Pool
 from airflow.utils.session import provide_session
 
 
-def delete_pool():
+@provide_session
+def delete_pool(pool_name, session):
     """
     Delete a pool
     """
-    raise NotImplementedError("Not implemented yet.")
+    pool_id = pool_name
+    query = session.query(Pool)
+    obj = query.filter(Pool.pool == pool_id).one_or_none()
+
+    if obj is None:

Review comment:
       Thanks here is the change 00bbe23




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to