#NEWLINE# @ click . command ( ) #NEWLINE# @ environment . pass_env #NEWLINE# def cli( env ) : #NEWLINE# #INDENT# 'Display a list of cancellation reasons.' #NEWLINE# table = formatting . Table ( [ 'Code' , 'Reason' ] ) #NEWLINE# table . align [ 'Code' ] = 'r' #NEWLINE# table . align [ 'Reason' ] = 'l' #NEWLINE# mgr = SoftLayer . HardwareManager ( env . client ) #NEWLINE# for ( code , reason ) in mgr . get_cancellation_reasons ( ) . items ( ) : #NEWLINE# #INDENT# table . add_row ( [ code , reason ] ) #NEWLINE# #UNINDENT# env . fout ( table )