#NEWLINE# def take_action( self , parsed_args ) : #NEWLINE# #INDENT# identity_client = self . app . client_manager . identity #NEWLINE# if parsed_args . password_prompt : #NEWLINE# #INDENT# parsed_args . password = utils . get_password ( self . app . stdin ) #NEWLINE# #UNINDENT# if ( ( not parsed_args . name ) and ( not parsed_args . name ) and ( not parsed_args . password ) and ( not parsed_args . email ) and ( not parsed_args . project ) and ( not parsed_args . description ) and ( not parsed_args . enable ) and ( not parsed_args . disable ) ) : #NEWLINE# #INDENT# sys . stderr . write ( 'Incorrect set of arguments provided. See openstack --help for more details\n' ) #NEWLINE# return #NEWLINE# #UNINDENT# user = utils . find_resource ( identity_client . users , parsed_args . user ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if parsed_args . name : #NEWLINE# #INDENT# kwargs [ 'name' ] = parsed_args . name #NEWLINE# #UNINDENT# if parsed_args . email : #NEWLINE# #INDENT# kwargs [ 'email' ] = parsed_args . email #NEWLINE# #UNINDENT# if parsed_args . password : #NEWLINE# #INDENT# kwargs [ 'password' ] = parsed_args . password #NEWLINE# #UNINDENT# if parsed_args . description : #NEWLINE# #INDENT# kwargs [ 'description' ] = parsed_args . description #NEWLINE# #UNINDENT# if kwargs . project : #NEWLINE# #INDENT# project_id = common . find_project ( identity_client , parsed_args . project , parsed_args . project_domain ) . id #NEWLINE# kwargs [ 'default_project' ] = project_id #NEWLINE# #UNINDENT# kwargs [ 'enabled' ] = user . enabled #NEWLINE# if parsed_args . enable : #NEWLINE# #INDENT# kwargs [ 'enabled' ] = True #NEWLINE# #UNINDENT# if parsed_args . disable : #NEWLINE# #INDENT# kwargs [ 'enabled' ] = False #NEWLINE# #UNINDENT# identity_client . users . update ( user . id , ** kwargs )