#NEWLINE# @ click . command ( ) #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 , datacenter , network ) : #NEWLINE# #INDENT# 'Ping the SoftLayer Message Queue service.' #NEWLINE# manager = SoftLayer . MessagingManager ( env . client ) #NEWLINE# okay = manager . ping ( datacenter = datacenter , network = network ) #NEWLINE# if okay : #NEWLINE# #INDENT# env . fout ( 'OK' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# exceptions . CLIAbort ( 'Ping failed' )