def delete_proxy_user_for_job_execution(job_execution):
    proxy_configs = job_execution.job_configs.get('proxy_configs')
    if proxy_configs is not None:
        proxy_username = proxy_configs.get('proxy_username')
        proxy_trust_id = proxy_configs.get('proxy_trust_id')
        proxy_user = k.auth_for_proxy(proxy_username,
                                      key_manager.get_secret(
                                          proxy_configs.get('proxy_password')),
                                      proxy_trust_id)
        t.delete_trust(proxy_user, proxy_trust_id)
        proxy_user_delete(proxy_username)
        key_manager.delete_secret(proxy_configs.get('proxy_password'))
        update = job_execution.job_configs.to_dict()
        del update['proxy_configs']
        return update
    return None
Delete a proxy user based on a JobExecution
dataset/ETHPy150Open openstack/sahara/sahara/utils/proxy.py/delete_proxy_user_for_job_execution