#NEWLINE# def _show_node( service , node_id , show_details = False ) : #NEWLINE# #INDENT# 'Show detailed info about the specified node.' #NEWLINE# args = ( { #NEWLINE# #INDENT# 'show_details' : True , #NEWLINE# #UNINDENT# } if show_details else None ) #NEWLINE# try : #NEWLINE# #INDENT# node = service . get_node ( node_id , args = args ) #NEWLINE# #UNINDENT# except sdk_exc . ResourceNotFound : #NEWLINE# #INDENT# raise exc . CommandError ( ( _ ( 'Node not found: %s' ) % node_id ) ) #NEWLINE# #UNINDENT# formatters = { #NEWLINE# #INDENT# 'metadata' : utils . json_formatter , #NEWLINE# 'data' : utils . json_formatter , #NEWLINE# #UNINDENT# } #NEWLINE# data = node . to_dict ( ) #NEWLINE# if show_details : #NEWLINE# #INDENT# formatters [ 'details' ] = utils . nested_dict_formatter ( list ( node [ 'details' ] . keys ( ) ) , [ 'property' , 'value' ] ) #NEWLINE# #UNINDENT# utils . print_dict ( data , formatters = formatters )