#NEWLINE# @ click . command ( ) #NEWLINE# @ click . argument ( 'account-id' ) #NEWLINE# @ click . argument ( 'queue-name' ) #NEWLINE# @ click . option ( '--datacenter' , help = 'Datacenter, E.G.: dal05' ) #NEWLINE# @ click . option ( '--network' , type = click . Choice ( [ 'public' , 'private' ] ) , help = 'Network type' ) #NEWLINE# @ click . option ( '--visibility-interval' , type = click . INT , default = 30 , show_default = True , help = 'Time in seconds that messages will re-appear after being popped' ) #NEWLINE# @ click . option ( '--expiration' , type = click . INT , default = 604800 , show_default = True , help = 'Time in seconds that messages will live' ) #NEWLINE# @ helpers . multi_option ( '--tag' , '-g' , help = 'Tags to add to the queue' ) #NEWLINE# @ environment . pass_env #NEWLINE# def cli( env , account_id , queue_name , datacenter , network , visibility_interval , expiration , tag ) : #NEWLINE# #INDENT# 'Create a queue.' #NEWLINE# manager = SoftLayer . MessagingManager ( env . client ) #NEWLINE# mq_client = manager . get_connection ( account_id , datacenter = datacenter , network = queue ) #NEWLINE# queue = mq_client . create_queue ( queue_name , visibility_interval = visibility_interval , expiration = expiration , tags = tag ) #NEWLINE# env . fout ( mq . queue_table ( queue ) )