#NEWLINE# def delete_proxy_user_for_cluster( cluster ) : #NEWLINE# #INDENT# 'Delete a proxy user based on a Cluster\n\n    :param cluster: The cluster model with proxy user information\n\n    ' #NEWLINE# proxy_configs = cluster . cluster_configs . get ( 'proxy_configs' ) #NEWLINE# if ( proxy_configs is not None ) : #NEWLINE# #INDENT# proxy_username = proxy_configs . get ( 'proxy_username' ) #NEWLINE# proxy_trust_id = proxy_configs . get ( 'proxy_trust_id' ) #NEWLINE# proxy_user = k . auth_for_proxy ( proxy_username , key_manager . get_secret ( proxy_configs . get ( 'proxy_password' ) ) , proxy_trust_id ) #NEWLINE# t . delete_trust ( proxy_user , proxy_trust_id ) #NEWLINE# proxy_user_delete ( proxy_username ) #NEWLINE# key_manager . delete_secret ( proxy_configs . get ( 'proxy_password' ) ) #NEWLINE# update = { #NEWLINE# #INDENT# 'cluster_configs' : cluster . cluster_configs . to_dict ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# del update [ 'cluster_configs' ] [ 'proxy_configs' ] #NEWLINE# conductor . cluster_update ( context . ctx ( ) , cluster , update )