#NEWLINE# def remove_tenant_user( request , project = None , user = None , domain = None ) : #NEWLINE# #INDENT# ' Removes all roles from a user on a tenant, removing them from it. ' #NEWLINE# client = keystoneclient ( domain , admin = True ) #NEWLINE# roles = client . roles . roles_for_user ( user , project ) #NEWLINE# for role in roles : #NEWLINE# #INDENT# remove_tenant_user_role ( request , user = user , role = role . id , project = project , domain = domain )