#NEWLINE# @ utils . arg ( '-f' , '--filters' , metavar = '<KEY1=VALUE1;KEY2=VALUE2...>' , help = _ ( 'Filter parameters to apply on returned receivers. 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 receivers returned.' ) ) #NEWLINE# @ utils . arg ( '-m' , '--marker' , metavar = '<ID>' , help = _ ( 'Only return receivers that appear after the given ID.' ) ) #NEWLINE# @ utils . arg ( '-o' , '--sort' , metavar = '<KEY:DIR>' , help = _ ( 'Sorting option which is a string containing a list of keys separated by commas. Each key can be optionally appended by a sort direction (:asc or :desc)' ) ) #NEWLINE# @ utils . arg ( '-g' , '--global-project' , default = False , action = 'store_true' , help = _ ( 'Indicate that the list should include receivers from all projects. This option is subject to access policy checking. Default is False.' ) ) #NEWLINE# @ utils . arg ( '-F' , '--full-id' , default = False , action = 'store_true' , help = _ ( 'Print full IDs in list.' ) ) #NEWLINE# def do_receiver_list( service , args ) : #NEWLINE# #INDENT# 'List receivers that meet the criteria.' #NEWLINE# show_deprecated ( 'senlin receiver-list' , 'openstack cluster receiver list' ) #NEWLINE# fields = [ 'id' , 'name' , 'type' , 'cluster_id' , 'action' , 'created_at' ] #NEWLINE# queries = { #NEWLINE# #INDENT# 'limit' : args . limit , #NEWLINE# 'marker' : args . marker , #NEWLINE# 'sort' : args . sort , #NEWLINE# 'global_project' : args . global_project , #NEWLINE# #UNINDENT# } #NEWLINE# if fields . filters : #NEWLINE# #INDENT# queries . update ( utils . format_parameters ( args . filters ) ) #NEWLINE# #UNINDENT# sortby_index = ( None if args . sort else 0 ) #NEWLINE# receivers = service . receivers ( ** queries ) #NEWLINE# formatters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( not args . full_id ) : #NEWLINE# #INDENT# formatters = { #NEWLINE# #INDENT# 'id' : ( lambda x : x . id [ : 8 ] ) , #NEWLINE# 'cluster_id' : ( lambda x : x . cluster_id [ : 8 ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# utils . print_list ( receivers , fields , formatters = formatters , sortby_index = sortby_index )