#NEWLINE# def take_action( self , parsed_args ) : #NEWLINE# #INDENT# identity_client = self . app . client_manager . identity #NEWLINE# if parsed_args . user : #NEWLINE# #INDENT# user = utils . find_resource ( identity_client . users , parsed_args . user ) . id #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user = self . app . client_manager . auth_ref . user_id #NEWLINE# #UNINDENT# creds = identity_client . ec2 . get ( user , parsed_args . access_key ) #NEWLINE# info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# info . update ( creds . _info ) #NEWLINE# if ( 'tenant_id' in info ) : #NEWLINE# #INDENT# info . update ( { #NEWLINE# #INDENT# 'project_id' : info . pop ( 'tenant_id' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return zip ( * sorted ( six . iteritems ( info ) ) )