#NEWLINE# @ utils . arg ( '-f' , '--filters' , metavar = '<KEY1=VALUE1;KEY2=VALUE2...>' , help = _ ( 'Filter parameters to apply on returned nodes. This can be specified multiple times, or once with parameters separated by a semicolon.' ) , action = 'append' ) #NEWLINE# @ utils . arg ( '-l' , '--limit' , metavar = '<LIMIT>' , help = _ ( 'Limit the number of nodes returned.' ) ) #NEWLINE# @ utils . arg ( '-m' , '--marker' , metavar = '<ID>' , help = _ ( 'Only return nodes that appear after the given node ID.' ) ) #NEWLINE# @ utils . arg ( '-F' , '--full-id' , default = False , action = 'store_true' , help = _ ( 'Print full IDs in list.' ) ) #NEWLINE# @ utils . arg ( 'id' , metavar = '<CLUSTER>' , help = _ ( 'Name or ID of cluster to nodes from.' ) ) #NEWLINE# def do_cluster_node_list( service , args ) : #NEWLINE# #INDENT# 'List nodes from cluster.' #NEWLINE# show_deprecated ( 'senlin cluster-node-list' , 'openstack cluster node members list' ) #NEWLINE# queries = { #NEWLINE# #INDENT# 'cluster_id' : args . id , #NEWLINE# 'limit' : args . limit , #NEWLINE# 'marker' : args . marker , #NEWLINE# #UNINDENT# } #NEWLINE# if args . filters : #NEWLINE# #INDENT# queries . update ( utils . format_parameters ( args . filters ) ) #NEWLINE# #UNINDENT# nodes = service . nodes ( ** queries ) #NEWLINE# if ( not args . full_id ) : #NEWLINE# #INDENT# formatters = { #NEWLINE# #INDENT# 'id' : ( lambda x : x . id [ : 8 ] ) , #NEWLINE# 'physical_id' : ( lambda x : ( x . physical_id [ : 8 ] if x . physical_id else '' ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# formatters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# fields = [ 'id' , 'name' , 'index' , 'status' , 'physical_id' , 'created_at' ] #NEWLINE# utils . print_list ( nodes , fields , formatters = formatters , sortby_index = 5 )