#NEWLINE# @ click . command ( ) #NEWLINE# @ click . argument ( 'account-id' ) #NEWLINE# @ click . option ( '--datacenter' , help = 'Datacenter, E.G.: dal05' ) #NEWLINE# @ click . option ( '--network' , type = click . Choice ( [ 'public' , 'private' ] ) , help = 'Network type' ) #NEWLINE# @ environment . pass_env #NEWLINE# def cli( env , account_id , datacenter , network ) : #NEWLINE# #INDENT# 'List all topics on an account.' #NEWLINE# manager = SoftLayer . MessagingManager ( env . client ) #NEWLINE# mq_client = manager . get_connection ( account_id , datacenter = datacenter , network = network ) #NEWLINE# topics = mq_client . get_topics ( ) [ 'items' ] #NEWLINE# table = formatting . Table ( [ 'name' ] ) #NEWLINE# for topic in topics : #NEWLINE# #INDENT# table . add_row ( [ topic [ 'name' ] ] ) #NEWLINE# #UNINDENT# env . fout ( table )