#NEWLINE# def take_action( self , parsed_args ) : #NEWLINE# #INDENT# volume_client = self . app . client_manager . volume #NEWLINE# identity_client = self . app . client_manager . identity #NEWLINE# volume_type = utils . find_resource ( volume_client . volume_types , parsed_args . volume_type ) #NEWLINE# if ( ( not parsed_args . property ) and ( not parsed_args . project ) ) : #NEWLINE# #INDENT# self . app . log . error ( 'No changes requested\n' ) #NEWLINE# return #NEWLINE# #UNINDENT# result = 0 #NEWLINE# if parsed_args . property : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# volume_type . unset_keys ( parsed_args . property ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . app . log . error ( ( 'Failed to unset volume type property: ' + str ( e ) ) ) #NEWLINE# result += 1 #NEWLINE# #UNINDENT# #UNINDENT# if parsed_args . project : #NEWLINE# #INDENT# project_info = None #NEWLINE# try : #NEWLINE# #INDENT# project_info = identity_common . find_project ( identity_client , parsed_args . project , parsed_args . project_domain ) #NEWLINE# volume_client . volume_type_access . remove_project_access ( volume_type . id , project_info . id ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . app . log . error ( ( 'Failed to remove volume type access from project: ' + str ( e ) ) ) #NEWLINE# result += 1 #NEWLINE# #UNINDENT# #UNINDENT# if ( result > 0 ) : #NEWLINE# #INDENT# raise exceptions . CommandError ( 'Command Failed: One or more of the operations failed' )