#NEWLINE# def take_action( self , parsed_args ) : #NEWLINE# #INDENT# self . log . debug ( ( 'take_action(%s)' % parsed_args ) ) #NEWLINE# client = self . app . client_manager . baremetal #NEWLINE# columns = res_fields . NODE_RESOURCE #NEWLINE# params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( ( parsed_args . limit is not None ) and ( parsed_args . limit < 0 ) ) : #NEWLINE# #INDENT# raise exc . CommandError ( ( _ ( 'Expected non-negative --limit, got %s' ) % parsed_args . limit ) ) #NEWLINE# #UNINDENT# params [ 'limit' ] = parsed_args . limit #NEWLINE# params [ 'marker' ] = parsed_args . marker #NEWLINE# if parsed_args . associated : #NEWLINE# #INDENT# params [ 'associated' ] = parsed_args . associated #NEWLINE# #UNINDENT# if parsed_args . maintenance : #NEWLINE# #INDENT# params [ 'maintenance' ] = parsed_args . maintenance #NEWLINE# #UNINDENT# if parsed_args . long : #NEWLINE# #INDENT# columns = res_fields . NODE_DETAILED_RESOURCE #NEWLINE# #UNINDENT# params [ 'detail' ] = parsed_args . long #NEWLINE# self . log . debug ( ( 'params(%s)' % params ) ) #NEWLINE# data = client . node . list ( ** params ) #NEWLINE# data = oscutils . sort_items ( data , parsed_args . sort ) #NEWLINE# return ( columns . labels , ( oscutils . get_item_properties ( s , columns . fields , formatters = { #NEWLINE# #INDENT# 'Properties' : oscutils . format_dict , #NEWLINE# #UNINDENT# } ) for s in data ) )