aztk/client/cluster/helpers/delete.py
def delete_pool_and_job_and_table(core_cluster_operations, pool_id: str, keep_logs: bool = False):
    """
        Delete a pool and it's associated job
        :param cluster_id: the pool to add the user to
        :return bool: deleted the pool if exists and job if exists
    """
    # job id is equal to pool id
    job_exists = True

    try:
        core_cluster_operations.batch_client.job.get(pool_id)
    except BatchErrorException:
        job_exists = False

    pool_exists = core_cluster_operations.batch_client.pool.exists(pool_id)

    table_deleted = core_cluster_operations.delete_task_table(pool_id)

    if job_exists:
        delete_object(core_cluster_operations.batch_client.job.delete, pool_id)

    if pool_exists:
        delete_object(core_cluster_operations.batch_client.pool.delete, pool_id)

    if not keep_logs:
        cluster_data = core_cluster_operations.get_cluster_data(pool_id)
        cluster_data.delete_container(pool_id)

    return job_exists or pool_exists or table_deleted

        Delete a pool and it's associated job
        :param cluster_id: the pool to add the user to
        :return bool: deleted the pool if exists and job if exists
    
Delete a pool and it's associated job
Delete a pool and it ' s associated job
def delete_pool_and_job_and_table(core_cluster_operations, pool_id: str, keep_logs: bool = False):
    job_exists = True
    try:
        core_cluster_operations.batch_client.job.get(pool_id)
    except BatchErrorException:
        job_exists = False
    pool_exists = core_cluster_operations.batch_client.pool.exists(pool_id)
    table_deleted = core_cluster_operations.delete_task_table(pool_id)
    if job_exists:
        delete_object(core_cluster_operations.batch_client.job.delete, pool_id)
    if pool_exists:
        delete_object(core_cluster_operations.batch_client.pool.delete, pool_id)
    if not keep_logs:
        cluster_data = core_cluster_operations.get_cluster_data(pool_id)
        cluster_data.delete_container(pool_id)
    return job_exists or pool_exists or table_deleted
def delete_pool_and_job_and_table ( core_cluster_operations , pool_id : str , keep_logs : bool = False ) : job_exists = True try : core_cluster_operations . batch_client . job . get ( pool_id ) except BatchErrorException : job_exists = False pool_exists = core_cluster_operations . batch_client . pool . exists ( pool_id ) table_deleted = core_cluster_operations . delete_task_table ( pool_id ) if job_exists : delete_object ( core_cluster_operations . batch_client . job . delete , pool_id ) if pool_exists : delete_object ( core_cluster_operations . batch_client . pool . delete , pool_id ) if not keep_logs : cluster_data = core_cluster_operations . get_cluster_data ( pool_id ) cluster_data . delete_container ( pool_id ) return job_exists or pool_exists or table_deleted
Delete a pool and it's associated job
Delete a pool and it ' s associated job
"""
        Delete a pool and it's associated job
        :param cluster_id: the pool to add the user to
        :return bool: deleted the pool if exists and job if exists
    """ # job id is equal to pool id
deleted the pool if exists and job if exists
deleted the pool if exists and job if exists
bool
core_cluster_operations
pool_id
str
keep_logs
bool
cluster_id
the pool to add the user to
the pool to add the user to